* udp failures traced to e858fae2b0b8
@ 2016-06-13 2:47 David Ahern
2016-06-13 6:42 ` Mike Rapoport
0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2016-06-13 2:47 UTC (permalink / raw)
To: rppt, netdev@vger.kernel.org
Mike:
UDP tests in my vrf unit test suite are failing. git bisect points to:
dsa@kenny:~/kernel-2.git$ git bisect good
e858fae2b0b8f41f0bed2cdffde25e7c97da38a7 is the first bad commit
commit e858fae2b0b8f41f0bed2cdffde25e7c97da38a7
Author: Mike Rapoport <rppt@linux.vnet.ibm.com>
Date: Wed Jun 8 16:09:21 2016 +0300
virtio_net: use common code for virtio_net_hdr and skb GSO conversion
Replace open coded conversion between virtio_net_hdr to skb GSO
info with
virtio_net_hdr_{from,to}_skb
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
:040000 040000 7e53f434e2d3a50ac685ce153dd92fc1a207de0e
470864c731ae7dd680f9807d2a1a359c715a4270 M drivers
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
Nothing special on the setup -- shell scripts and qemu commands that
have worked fine for years. Host OS is debian/jessie:
dsa@kenny:dsa-ns:~$ /usr/bin/qemu-system-x86_64 --version
QEMU emulator version 2.1.2 (Debian 1:2.1+dfsg-12+deb8u6), Copyright (c)
2003-2008 Fabrice Bellard
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udp failures traced to e858fae2b0b8
2016-06-13 2:47 udp failures traced to e858fae2b0b8 David Ahern
@ 2016-06-13 6:42 ` Mike Rapoport
2016-06-13 13:48 ` David Ahern
0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2016-06-13 6:42 UTC (permalink / raw)
To: David Ahern; +Cc: netdev@vger.kernel.org
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;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: udp failures traced to e858fae2b0b8
2016-06-13 6:42 ` Mike Rapoport
@ 2016-06-13 13:48 ` David Ahern
2016-06-13 18:40 ` Mike Rapoport
0 siblings, 1 reply; 5+ messages in thread
From: David Ahern @ 2016-06-13 13:48 UTC (permalink / raw)
To: Mike Rapoport; +Cc: netdev@vger.kernel.org
On 6/13/16 12:42 AM, Mike Rapoport wrote:
> 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?
Problem is with guest. Guest is running net-next kernel.
host is running 4.6.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: udp failures traced to e858fae2b0b8
2016-06-13 13:48 ` David Ahern
@ 2016-06-13 18:40 ` Mike Rapoport
2016-06-13 19:56 ` David Ahern
0 siblings, 1 reply; 5+ messages in thread
From: Mike Rapoport @ 2016-06-13 18:40 UTC (permalink / raw)
To: David Ahern; +Cc: netdev@vger.kernel.org
On Mon, Jun 13, 2016 at 07:48:39AM -0600, David Ahern wrote:
> On 6/13/16 12:42 AM, Mike Rapoport wrote:
> >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?
>
> Problem is with guest. Guest is running net-next kernel.
Can you please check with the below patch?
> host is running 4.6.
>
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 9af0a98..9f8be96 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -482,10 +482,6 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
skb->ip_summed = CHECKSUM_UNNECESSARY;
- skb->protocol = eth_type_trans(skb, dev);
- pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
- ntohs(skb->protocol), skb->len, skb->pkt_type);
-
if (virtio_net_hdr_to_skb(skb, &hdr->hdr,
virtio_is_little_endian(vi->vdev))) {
net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n",
@@ -494,6 +490,10 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
goto frame_err;
}
+ skb->protocol = eth_type_trans(skb, dev);
+ pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
+ ntohs(skb->protocol), skb->len, skb->pkt_type);
+
napi_gro_receive(&rq->napi, skb);
return;
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: udp failures traced to e858fae2b0b8
2016-06-13 18:40 ` Mike Rapoport
@ 2016-06-13 19:56 ` David Ahern
0 siblings, 0 replies; 5+ messages in thread
From: David Ahern @ 2016-06-13 19:56 UTC (permalink / raw)
To: Mike Rapoport; +Cc: netdev@vger.kernel.org
On 6/13/16 12:40 PM, Mike Rapoport wrote:
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 9af0a98..9f8be96 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -482,10 +482,6 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
> if (hdr->hdr.flags & VIRTIO_NET_HDR_F_DATA_VALID)
> skb->ip_summed = CHECKSUM_UNNECESSARY;
>
> - skb->protocol = eth_type_trans(skb, dev);
> - pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
> - ntohs(skb->protocol), skb->len, skb->pkt_type);
> -
> if (virtio_net_hdr_to_skb(skb, &hdr->hdr,
> virtio_is_little_endian(vi->vdev))) {
> net_warn_ratelimited("%s: bad gso: type: %u, size: %u\n",
> @@ -494,6 +490,10 @@ static void receive_buf(struct virtnet_info *vi, struct receive_queue *rq,
> goto frame_err;
> }
>
> + skb->protocol = eth_type_trans(skb, dev);
> + pr_debug("Receiving skb proto 0x%04x len %i type %i\n",
> + ntohs(skb->protocol), skb->len, skb->pkt_type);
> +
> napi_gro_receive(&rq->napi, skb);
> return;
>
>
Fixes the problem.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-13 19:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13 2:47 udp failures traced to e858fae2b0b8 David Ahern
2016-06-13 6:42 ` Mike Rapoport
2016-06-13 13:48 ` David Ahern
2016-06-13 18:40 ` Mike Rapoport
2016-06-13 19:56 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox