From: Mike Rapoport <rppt@linux.vnet.ibm.com>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: udp failures traced to e858fae2b0b8
Date: Mon, 13 Jun 2016 09:42:03 +0300 [thread overview]
Message-ID: <20160613064202.GA14048@rapoport-lnx> (raw)
In-Reply-To: <84272f6d-8c68-6b84-7f0a-6ef4ad8b9e03@cumulusnetworks.com>
Hi David,
On Sun, Jun 12, 2016 at 08:47:20PM -0600, David Ahern wrote:
> Mike:
>
> UDP tests in my vrf unit test suite are failing. git bisect points to:
Are you testing host or guest kernel?
If it's the host, can you please check if the patch below helps?
> dsa@kenny:~/kernel-2.git$ git bisect good
> e858fae2b0b8f41f0bed2cdffde25e7c97da38a7 is the first bad commit
> commit e858fae2b0b8f41f0bed2cdffde25e7c97da38a7
> Author: Mike Rapoport <rppt@linux.vnet.ibm.com>
>
> virtio_net: use common code for virtio_net_hdr and skb GSO conversion
>
> On console I get the following:
>
> [ 80.414134] skbuff: bad partial csum: csum=34/6 len=40
> [ 80.416105] eth1: bad gso: type: 0, size: 0
>
> Networking arg:
>
> -netdev
> type=tap,vhost=on,ifname=vm01-eth1,script=no,downscript=no,id=netdev1
> -device virtio-net-pci,mac=02:e0:f9:1c:b9:74,netdev=netdev1,romfile=
>
> tap device is connected to a bridge.
>
> David
>
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 8cc6bf4..4884802 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1254,6 +1254,13 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
return -EFAULT;
}
+ err = virtio_net_hdr_to_skb(skb, &gso, tun_is_little_endian(tun));
+ if (err) {
+ this_cpu_inc(tun->pcpu_stats->rx_frame_errors);
+ kfree_skb(skb);
+ return -EINVAL;
+ }
+
switch (tun->flags & TUN_TYPE_MASK) {
case IFF_TUN:
if (tun->flags & IFF_NO_PI) {
@@ -1280,13 +1287,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
break;
}
- err = virtio_net_hdr_to_skb(skb, &gso, tun_is_little_endian(tun));
- if (err) {
- this_cpu_inc(tun->pcpu_stats->rx_frame_errors);
- kfree_skb(skb);
- return -EINVAL;
- }
-
/* copy skb_ubuf_info for callback when skb has no error */
if (zerocopy) {
skb_shinfo(skb)->destructor_arg = msg_control;
next prev parent reply other threads:[~2016-06-13 6:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-13 2:47 udp failures traced to e858fae2b0b8 David Ahern
2016-06-13 6:42 ` Mike Rapoport [this message]
2016-06-13 13:48 ` David Ahern
2016-06-13 18:40 ` Mike Rapoport
2016-06-13 19:56 ` David Ahern
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=20160613064202.GA14048@rapoport-lnx \
--to=rppt@linux.vnet.ibm.com \
--cc=dsa@cumulusnetworks.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox