Re: [linux-next:master 10573/11438] drivers/net/vrf.c:1447:9: error: implicit declaration of function 'vrf_add_mac_header_if_unset'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Dec 2020 14:35:45 +0800
kernel test robot <lkp@xxxxxxxxx> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   15ac8fdb74403772780be1a8c4f7c1eff1040fc4
> commit: 048939088220278b8ee5bbf3769fd2f803ca9e3e [10573/11438] vrf: add mac header for tunneled packets when sniffer is attached
> config: arm-randconfig-r033-20201208 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project a2f922140f5380571fb74179f2bf622b3b925697)
> reproduce (this is a W=1 build):
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # install arm cross compiling tool for clang build
>         # apt-get install binutils-arm-linux-gnueabi
>         # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=048939088220278b8ee5bbf3769fd2f803ca9e3e
>         git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>         git fetch --no-tags linux-next master
>         git checkout 048939088220278b8ee5bbf3769fd2f803ca9e3e
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> 
> All errors (new ones prefixed by >>):
> 
> >> drivers/net/vrf.c:1447:9: error: implicit declaration of function 'vrf_add_mac_header_if_unset' [-Werror,-Wimplicit-function-declaration]
>                    err = vrf_add_mac_header_if_unset(skb, vrf_dev, ETH_P_IP);
>                          ^
>    1 error generated.
> 
> vim +/vrf_add_mac_header_if_unset +1447 drivers/net/vrf.c
> 
>   1423	
>   1424	static struct sk_buff *vrf_ip_rcv(struct net_device *vrf_dev,
>   1425					  struct sk_buff *skb)
>   1426	{
>   1427		skb->dev = vrf_dev;
>   1428		skb->skb_iif = vrf_dev->ifindex;
>   1429		IPCB(skb)->flags |= IPSKB_L3SLAVE;
>   1430	
>   1431		if (ipv4_is_multicast(ip_hdr(skb)->daddr))
>   1432			goto out;
>   1433	
>   1434		/* loopback traffic; do not push through packet taps again.
>   1435		 * Reset pkt_type for upper layers to process skb
>   1436		 */
>   1437		if (skb->pkt_type == PACKET_LOOPBACK) {
>   1438			skb->pkt_type = PACKET_HOST;
>   1439			goto out;
>   1440		}
>   1441	
>   1442		vrf_rx_stats(vrf_dev, skb->len);
>   1443	
>   1444		if (!list_empty(&vrf_dev->ptype_all)) {
>   1445			int err;
>   1446	
> > 1447			err = vrf_add_mac_header_if_unset(skb, vrf_dev, ETH_P_IP);
>   1448			if (likely(!err)) {
>   1449				skb_push(skb, skb->mac_len);
>   1450				dev_queue_xmit_nit(skb, vrf_dev);
>   1451				skb_pull(skb, skb->mac_len);
>   1452			}
>   1453		}
>   1454	
>   1455		skb = vrf_rcv_nfhook(NFPROTO_IPV4, NF_INET_PRE_ROUTING, skb, vrf_dev);
>   1456	out:
>   1457		return skb;
>   1458	}
>   1459	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Hi all,

The vrf_add_mac_header_if_unset() is wrongly defined within a conditional
compilation block which depends on the CONFIG_IPV6 macro. Therefore, when the
CONFIG_IPV6 is not set, the function vrf_add_mac_header_if_unset() is missing
and the build process stops reporting the error.

The problem is easily solved by moving the function vrf_add_mac_header_if_unset()
out of the conditional block.

Shortly I will send the fix patch directly to "net-next".

Sorry for the inconvenience, thank you all.
Andrea




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux