[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 29 Oct 2017 16:46:03 +0800
From: kbuild test robot <lkp@...el.com>
To: Michael Chan <michael.chan@...adcom.com>
Cc: kbuild-all@...org, davem@...emloft.net, netdev@...r.kernel.org,
Sathya Perla <sathya.perla@...adcom.com>
Subject: Re: [PATCH net-next 11/14] bnxt_en: add support for Flower based
vxlan encap/decap offload
Hi Sathya,
Thank you for the patch! Yet we hit a small issue.
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Michael-Chan/bnxt_en-Updates-for-net-next/20171029-105709
config: i386-randconfig-x0-10291556 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c: In function 'bnxt_tc_resolve_tunnel_hdrs':
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:882:32: error: implicit declaration of function 'vlan_dev_priv' [-Werror=implicit-function-declaration]
struct vlan_dev_priv *vlan = vlan_dev_priv(dst_dev);
^~~~~~~~~~~~~
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:882:32: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
In file included from include/uapi/linux/stddef.h:1:0,
from include/linux/stddef.h:4,
from include/uapi/linux/posix_types.h:4,
from include/uapi/linux/types.h:13,
from include/linux/types.h:5,
from include/linux/list.h:4,
from include/linux/timer.h:4,
from include/linux/netdevice.h:28,
from drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:10:
drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:884:11: error: dereferencing pointer to incomplete type 'struct vlan_dev_priv'
if (vlan->real_dev != real_dst_dev) {
^
include/linux/compiler.h:156:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^~~~
>> drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c:884:3: note: in expansion of macro 'if'
if (vlan->real_dev != real_dst_dev) {
^~
cc1: some warnings being treated as errors
vim +/if +884 drivers/net/ethernet/broadcom/bnxt/bnxt_tc.c
855
856 static int bnxt_tc_resolve_tunnel_hdrs(struct bnxt *bp,
857 struct ip_tunnel_key *tun_key,
858 struct bnxt_tc_l2_key *l2_info,
859 struct net_device *real_dst_dev)
860 {
861 struct flowi4 flow = { {0} };
862 struct net_device *dst_dev;
863 struct neighbour *nbr;
864 struct rtable *rt;
865 int rc;
866
867 flow.flowi4_proto = IPPROTO_UDP;
868 flow.fl4_dport = tun_key->tp_dst;
869 flow.daddr = tun_key->u.ipv4.dst;
870
871 rt = ip_route_output_key(dev_net(real_dst_dev), &flow);
872 if (IS_ERR(rt)) {
873 netdev_info(bp->dev, "no route to %pI4b", &flow.daddr);
874 return -EOPNOTSUPP;
875 }
876
877 /* The route must either point to the real_dst_dev or a dst_dev that
878 * uses the real_dst_dev.
879 */
880 dst_dev = rt->dst.dev;
881 if (is_vlan_dev(dst_dev)) {
882 struct vlan_dev_priv *vlan = vlan_dev_priv(dst_dev);
883
> 884 if (vlan->real_dev != real_dst_dev) {
885 netdev_info(bp->dev,
886 "dst_dev(%s) doesn't use PF-if(%s)",
887 netdev_name(dst_dev),
888 netdev_name(real_dst_dev));
889 rc = -EOPNOTSUPP;
890 goto put_rt;
891 }
892 l2_info->inner_vlan_tci = htons(vlan->vlan_id);
893 l2_info->inner_vlan_tpid = vlan->vlan_proto;
894 l2_info->num_vlans = 1;
895 } else if (dst_dev != real_dst_dev) {
896 netdev_info(bp->dev,
897 "dst_dev(%s) for %pI4b is not PF-if(%s)",
898 netdev_name(dst_dev), &flow.daddr,
899 netdev_name(real_dst_dev));
900 rc = -EOPNOTSUPP;
901 goto put_rt;
902 }
903
904 nbr = dst_neigh_lookup(&rt->dst, &flow.daddr);
905 if (!nbr) {
906 netdev_info(bp->dev, "can't lookup neighbor for %pI4b",
907 &flow.daddr);
908 rc = -EOPNOTSUPP;
909 goto put_rt;
910 }
911
912 tun_key->u.ipv4.src = flow.saddr;
913 tun_key->ttl = ip4_dst_hoplimit(&rt->dst);
914 neigh_ha_snapshot(l2_info->dmac, nbr, dst_dev);
915 ether_addr_copy(l2_info->smac, dst_dev->dev_addr);
916 neigh_release(nbr);
917 ip_rt_put(rt);
918
919 return 0;
920 put_rt:
921 ip_rt_put(rt);
922 return rc;
923 }
924
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (32576 bytes)
Powered by blists - more mailing lists