All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: kbuild-all@lists.01.org, steffen.klassert@secunet.com,
	davem@davemloft.net, netdev@vger.kernel.org,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>
Subject: Re: [PATCH ipsec] vti[6]: fix packet tx through bpf_redirect() in XinY cases
Date: Tue, 4 Feb 2020 15:56:13 +0800	[thread overview]
Message-ID: <202002041523.F56NC2Bi%lkp@intel.com> (raw)
In-Reply-To: <20200203164659.3799-1-nicolas.dichtel@6wind.com>

[-- Attachment #1: Type: text/plain, Size: 4662 bytes --]

Hi Nicolas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ipsec/master]
[also build test ERROR on v5.5 next-20200203]
[cannot apply to ipsec-next/master sparc-next/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/vti-6-fix-packet-tx-through-bpf_redirect-in-XinY-cases/20200204-072439
base:   https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master
config: x86_64-randconfig-s2-20200204 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   net//ipv4/ip_vti.c: In function 'vti_xmit':
>> net//ipv4/ip_vti.c:208:4: error: implicit declaration of function 'ip6_route_output' [-Werror=implicit-function-declaration]
       dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6);
       ^
>> net//ipv4/ip_vti.c:208:8: warning: assignment makes pointer from integer without a cast
       dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6);
           ^
   cc1: some warnings being treated as errors

vim +/ip6_route_output +208 net//ipv4/ip_vti.c

   177	
   178	static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,
   179				    struct flowi *fl)
   180	{
   181		struct ip_tunnel *tunnel = netdev_priv(dev);
   182		struct ip_tunnel_parm *parms = &tunnel->parms;
   183		struct dst_entry *dst = skb_dst(skb);
   184		struct net_device *tdev;	/* Device to other host */
   185		int pkt_len = skb->len;
   186		int err;
   187		int mtu;
   188	
   189		if (!dst) {
   190			switch (skb->protocol) {
   191			case htons(ETH_P_IP): {
   192				struct rtable *rt;
   193	
   194				fl->u.ip4.flowi4_oif = dev->ifindex;
   195				fl->u.ip4.flowi4_flags |= FLOWI_FLAG_ANYSRC;
   196				rt = __ip_route_output_key(dev_net(dev), &fl->u.ip4);
   197				if (IS_ERR(rt)) {
   198					dev->stats.tx_carrier_errors++;
   199					goto tx_error_icmp;
   200				}
   201				dst = &rt->dst;
   202				skb_dst_set(skb, dst);
   203				break;
   204			}
   205			case htons(ETH_P_IPV6):
   206				fl->u.ip6.flowi6_oif = dev->ifindex;
   207				fl->u.ip6.flowi6_flags |= FLOWI_FLAG_ANYSRC;
 > 208				dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6);
   209				if (dst->error) {
   210					dst_release(dst);
   211					dst = NULL;
   212					dev->stats.tx_carrier_errors++;
   213					goto tx_error_icmp;
   214				}
   215				skb_dst_set(skb, dst);
   216				break;
   217			default:
   218				dev->stats.tx_carrier_errors++;
   219				goto tx_error_icmp;
   220			}
   221		}
   222	
   223		dst_hold(dst);
   224		dst = xfrm_lookup(tunnel->net, dst, fl, NULL, 0);
   225		if (IS_ERR(dst)) {
   226			dev->stats.tx_carrier_errors++;
   227			goto tx_error_icmp;
   228		}
   229	
   230		if (!vti_state_check(dst->xfrm, parms->iph.daddr, parms->iph.saddr)) {
   231			dev->stats.tx_carrier_errors++;
   232			dst_release(dst);
   233			goto tx_error_icmp;
   234		}
   235	
   236		tdev = dst->dev;
   237	
   238		if (tdev == dev) {
   239			dst_release(dst);
   240			dev->stats.collisions++;
   241			goto tx_error;
   242		}
   243	
   244		mtu = dst_mtu(dst);
   245		if (skb->len > mtu) {
   246			skb_dst_update_pmtu_no_confirm(skb, mtu);
   247			if (skb->protocol == htons(ETH_P_IP)) {
   248				icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
   249					  htonl(mtu));
   250			} else {
   251				if (mtu < IPV6_MIN_MTU)
   252					mtu = IPV6_MIN_MTU;
   253	
   254				icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
   255			}
   256	
   257			dst_release(dst);
   258			goto tx_error;
   259		}
   260	
   261		skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(dev)));
   262		skb_dst_set(skb, dst);
   263		skb->dev = skb_dst(skb)->dev;
   264	
   265		err = dst_output(tunnel->net, skb->sk, skb);
   266		if (net_xmit_eval(err) == 0)
   267			err = pkt_len;
   268		iptunnel_xmit_stats(dev, err);
   269		return NETDEV_TX_OK;
   270	
   271	tx_error_icmp:
   272		dst_link_failure(skb);
   273	tx_error:
   274		dev->stats.tx_errors++;
   275		kfree_skb(skb);
   276		return NETDEV_TX_OK;
   277	}
   278	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30007 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH ipsec] vti[6]: fix packet tx through bpf_redirect() in XinY cases
Date: Tue, 04 Feb 2020 15:56:13 +0800	[thread overview]
Message-ID: <202002041523.F56NC2Bi%lkp@intel.com> (raw)
In-Reply-To: <20200203164659.3799-1-nicolas.dichtel@6wind.com>

[-- Attachment #1: Type: text/plain, Size: 4805 bytes --]

Hi Nicolas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on ipsec/master]
[also build test ERROR on v5.5 next-20200203]
[cannot apply to ipsec-next/master sparc-next/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Nicolas-Dichtel/vti-6-fix-packet-tx-through-bpf_redirect-in-XinY-cases/20200204-072439
base:   https://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master
config: x86_64-randconfig-s2-20200204 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.2-10+deb8u1) 4.9.2
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   net//ipv4/ip_vti.c: In function 'vti_xmit':
>> net//ipv4/ip_vti.c:208:4: error: implicit declaration of function 'ip6_route_output' [-Werror=implicit-function-declaration]
       dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6);
       ^
>> net//ipv4/ip_vti.c:208:8: warning: assignment makes pointer from integer without a cast
       dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6);
           ^
   cc1: some warnings being treated as errors

vim +/ip6_route_output +208 net//ipv4/ip_vti.c

   177	
   178	static netdev_tx_t vti_xmit(struct sk_buff *skb, struct net_device *dev,
   179				    struct flowi *fl)
   180	{
   181		struct ip_tunnel *tunnel = netdev_priv(dev);
   182		struct ip_tunnel_parm *parms = &tunnel->parms;
   183		struct dst_entry *dst = skb_dst(skb);
   184		struct net_device *tdev;	/* Device to other host */
   185		int pkt_len = skb->len;
   186		int err;
   187		int mtu;
   188	
   189		if (!dst) {
   190			switch (skb->protocol) {
   191			case htons(ETH_P_IP): {
   192				struct rtable *rt;
   193	
   194				fl->u.ip4.flowi4_oif = dev->ifindex;
   195				fl->u.ip4.flowi4_flags |= FLOWI_FLAG_ANYSRC;
   196				rt = __ip_route_output_key(dev_net(dev), &fl->u.ip4);
   197				if (IS_ERR(rt)) {
   198					dev->stats.tx_carrier_errors++;
   199					goto tx_error_icmp;
   200				}
   201				dst = &rt->dst;
   202				skb_dst_set(skb, dst);
   203				break;
   204			}
   205			case htons(ETH_P_IPV6):
   206				fl->u.ip6.flowi6_oif = dev->ifindex;
   207				fl->u.ip6.flowi6_flags |= FLOWI_FLAG_ANYSRC;
 > 208				dst = ip6_route_output(dev_net(dev), NULL, &fl->u.ip6);
   209				if (dst->error) {
   210					dst_release(dst);
   211					dst = NULL;
   212					dev->stats.tx_carrier_errors++;
   213					goto tx_error_icmp;
   214				}
   215				skb_dst_set(skb, dst);
   216				break;
   217			default:
   218				dev->stats.tx_carrier_errors++;
   219				goto tx_error_icmp;
   220			}
   221		}
   222	
   223		dst_hold(dst);
   224		dst = xfrm_lookup(tunnel->net, dst, fl, NULL, 0);
   225		if (IS_ERR(dst)) {
   226			dev->stats.tx_carrier_errors++;
   227			goto tx_error_icmp;
   228		}
   229	
   230		if (!vti_state_check(dst->xfrm, parms->iph.daddr, parms->iph.saddr)) {
   231			dev->stats.tx_carrier_errors++;
   232			dst_release(dst);
   233			goto tx_error_icmp;
   234		}
   235	
   236		tdev = dst->dev;
   237	
   238		if (tdev == dev) {
   239			dst_release(dst);
   240			dev->stats.collisions++;
   241			goto tx_error;
   242		}
   243	
   244		mtu = dst_mtu(dst);
   245		if (skb->len > mtu) {
   246			skb_dst_update_pmtu_no_confirm(skb, mtu);
   247			if (skb->protocol == htons(ETH_P_IP)) {
   248				icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
   249					  htonl(mtu));
   250			} else {
   251				if (mtu < IPV6_MIN_MTU)
   252					mtu = IPV6_MIN_MTU;
   253	
   254				icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu);
   255			}
   256	
   257			dst_release(dst);
   258			goto tx_error;
   259		}
   260	
   261		skb_scrub_packet(skb, !net_eq(tunnel->net, dev_net(dev)));
   262		skb_dst_set(skb, dst);
   263		skb->dev = skb_dst(skb)->dev;
   264	
   265		err = dst_output(tunnel->net, skb->sk, skb);
   266		if (net_xmit_eval(err) == 0)
   267			err = pkt_len;
   268		iptunnel_xmit_stats(dev, err);
   269		return NETDEV_TX_OK;
   270	
   271	tx_error_icmp:
   272		dst_link_failure(skb);
   273	tx_error:
   274		dev->stats.tx_errors++;
   275		kfree_skb(skb);
   276		return NETDEV_TX_OK;
   277	}
   278	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30007 bytes --]

  reply	other threads:[~2020-02-04  7:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 16:46 [PATCH ipsec] vti[6]: fix packet tx through bpf_redirect() in XinY cases Nicolas Dichtel
2020-02-04  7:56 ` kbuild test robot [this message]
2020-02-04  7:56   ` kbuild test robot
2020-02-04 10:52   ` [PATCH ipsec v2] " Nicolas Dichtel
2020-02-04 11:46     ` Sabrina Dubroca
2020-02-04 13:10       ` Nicolas Dichtel
2020-02-04 16:00       ` [PATCH ipsec v3] " Nicolas Dichtel
2020-02-07  9:42         ` Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202002041523.F56NC2Bi%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=steffen.klassert@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.