Re: [PATCH nf-next 02/11] netfilter: ipv6: avoid indirect calls for IPV6=y case

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

 



Hi Florian,

I love your patch! Yet something to improve:

[auto build test ERROR on nf-next/master]

url:    https://github.com/0day-ci/linux/commits/Florian-Westphal/netfilter-nat-merge-ipv4-and-ipv6-nat-modules/20190201-082027
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git master
config: x86_64-randconfig-x012-201904 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-14) 8.2.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   net//openvswitch/actions.c: In function 'ovs_fragment':
>> net//openvswitch/actions.c:932:3: error: implicit declaration of function 'nf_ip6_fragment'; did you mean 'ip_is_fragment'? [-Werror=implicit-function-declaration]
      nf_ip6_fragment(net, skb->sk, skb, ovs_vport_output);
      ^~~~~~~~~~~~~~~
      ip_is_fragment
   cc1: some warnings being treated as errors

vim +932 net//openvswitch/actions.c

   884	
   885	static void ovs_fragment(struct net *net, struct vport *vport,
   886				 struct sk_buff *skb, u16 mru,
   887				 struct sw_flow_key *key)
   888	{
   889		u16 orig_network_offset = 0;
   890	
   891		if (eth_p_mpls(skb->protocol)) {
   892			orig_network_offset = skb_network_offset(skb);
   893			skb->network_header = skb->inner_network_header;
   894		}
   895	
   896		if (skb_network_offset(skb) > MAX_L2_LEN) {
   897			OVS_NLERR(1, "L2 header too long to fragment");
   898			goto err;
   899		}
   900	
   901		if (key->eth.type == htons(ETH_P_IP)) {
   902			struct dst_entry ovs_dst;
   903			unsigned long orig_dst;
   904	
   905			prepare_frag(vport, skb, orig_network_offset,
   906				     ovs_key_mac_proto(key));
   907			dst_init(&ovs_dst, &ovs_dst_ops, NULL, 1,
   908				 DST_OBSOLETE_NONE, DST_NOCOUNT);
   909			ovs_dst.dev = vport->dev;
   910	
   911			orig_dst = skb->_skb_refdst;
   912			skb_dst_set_noref(skb, &ovs_dst);
   913			IPCB(skb)->frag_max_size = mru;
   914	
   915			ip_do_fragment(net, skb->sk, skb, ovs_vport_output);
   916			refdst_drop(orig_dst);
   917		} else if (key->eth.type == htons(ETH_P_IPV6)) {
   918			unsigned long orig_dst;
   919			struct rt6_info ovs_rt;
   920	
   921			prepare_frag(vport, skb, orig_network_offset,
   922				     ovs_key_mac_proto(key));
   923			memset(&ovs_rt, 0, sizeof(ovs_rt));
   924			dst_init(&ovs_rt.dst, &ovs_dst_ops, NULL, 1,
   925				 DST_OBSOLETE_NONE, DST_NOCOUNT);
   926			ovs_rt.dst.dev = vport->dev;
   927	
   928			orig_dst = skb->_skb_refdst;
   929			skb_dst_set_noref(skb, &ovs_rt.dst);
   930			IP6CB(skb)->frag_max_size = mru;
   931	
 > 932			nf_ip6_fragment(net, skb->sk, skb, ovs_vport_output);
   933			refdst_drop(orig_dst);
   934		} else {
   935			WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",
   936				  ovs_vport_name(vport), ntohs(key->eth.type), mru,
   937				  vport->dev->mtu);
   938			goto err;
   939		}
   940	
   941		return;
   942	err:
   943		kfree_skb(skb);
   944	}
   945	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux