Hi Sathya, I love your patch! Perhaps something to improve:
[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: x86_64-randconfig-it0-10300113 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 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:10: 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 struct vlan_dev_priv *vlan = vlan_dev_priv(dst_dev); ^ drivers/net//ethernet/broadcom/bnxt/bnxt_tc.c:884:11: error: dereferencing pointer to incomplete type if (vlan->real_dev != real_dst_dev) { ^ In file included from include/linux/swab.h:4:0, from include/uapi/linux/byteorder/little_endian.h:12, from include/linux/byteorder/little_endian.h:4, from arch/x86/include/uapi/asm/byteorder.h:4, from include/asm-generic/bitops/le.h:5, from arch/x86/include/asm/bitops.h:517, from include/linux/bitops.h:37, from include/linux/kernel.h:10, from include/linux/list.h:8, 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:892:39: error: dereferencing pointer to incomplete type l2_info->inner_vlan_tci = htons(vlan->vlan_id); ^ include/uapi/linux/swab.h:100:54: note: in definition of macro '__swab16' #define __swab16(x) (__u16)__builtin_bswap16((__u16)(x)) ^ include/linux/byteorder/generic.h:134:21: note: in expansion of macro '__cpu_to_be16' #define ___htons(x) __cpu_to_be16(x) ^ include/linux/byteorder/generic.h:140:18: note: in expansion of macro '___htons' #define htons(x) ___htons(x) ^ >> drivers/net//ethernet/broadcom/bnxt/bnxt_tc.c:892:29: note: in expansion of >> macro 'htons' l2_info->inner_vlan_tci = htons(vlan->vlan_id); ^ drivers/net//ethernet/broadcom/bnxt/bnxt_tc.c:893:34: error: dereferencing pointer to incomplete type l2_info->inner_vlan_tpid = vlan->vlan_proto; ^ cc1: some warnings being treated as errors vim +/htons +892 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
.config.gz
Description: application/gzip