virtio_net: don't set NETIF_F_FRAGLIST
Subsystems (3)
PATCH 1/1 virtio_net: don't set NETIF_F_FRAGLIST
We don't handle skb_shared_info->frag_list, so we shouldn't be setting the NETIF_F_FRAGLIST flag.
--- drivers/net/virtio_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/virtio_net.c +1 -1
@@ -505,7 +505,7 @@ static int virtnet_probe(struct virtio_device *vdev)/* Do we support "hardware" checksums? */ if (csum &&virtio_has_feature (vdev,VIRTIO_NET_F_CSUM )) {/* This opens up the world of extra features. */ - dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (gso &&virtio_has_feature (vdev,VIRTIO_NET_F_GSO )) { dev->features |=NETIF_F_TSO |NETIF_F_UFO |NETIF_F_TSO_ECN |NETIF_F_TSO6 ;
Signature · 1 line
1.5.4.3
Quoted 2 lines · On Wednesday 05 November 2008 23:34:46 Mark McLoughlin wrote:
We don't handle
skb_shared_info->frag_list, so we shouldn't be setting theNETIF_F_FRAGLISTflag.
We don't?
skb_to_sgvec() should handle it OK, is there some subtlety I'm missing?
Rusty.
Quoted 7 lines · Rusty Russell
Quoted 2 lines · On Wednesday 05 November 2008 23:34:46 Mark McLoughlin wrote:
We don't handle
skb_shared_info->frag_list, so we shouldn't be setting theNETIF_F_FRAGLISTflag.We don't?
skb_to_sgvec()should handle it OK, is there some subtlety I'm missing?
Good grief ... yes, sorry.
Same is true for the tun patch, but I wonder ... could a fraglist skb exceed 64k? i.e. we need to know the max possible size of a packet before reading it from the tap.
Cheers,
Mark.
Quoted 13 lines · Mark McLoughlin
We don't handle
skb_shared_info->frag_list, so we shouldn't be setting theNETIF_F_FRAGLISTflag.Signed-off-by Mark McLoughlin <[email protected]>--- drivers/net/virtio_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/virtio_net.c +0
-0
drivers/net/virtio_net.c static int virtnet_probe(struct virtio_device *vdev) · line 511
Quoted 8 lines
drivers/net/virtio_net.c +1
-1@@ -505,7 +505,7 @@ static int virtnet_probe(struct virtio_device *vdev)/* Do we support "hardware" checksums? */ if (csum &&virtio_has_feature (vdev,VIRTIO_NET_F_CSUM )) {/* This opens up the world of extra features. */ - dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (gso &&virtio_has_feature (vdev,VIRTIO_NET_F_GSO )) { dev->features |=NETIF_F_TSO |NETIF_F_UFO |NETIF_F_TSO_ECN |NETIF_F_TSO6 ;
applied this and tun patch
Quoted 9 lines · Jeff Garzik
Quoted 8 lines · Mark McLoughlin
We don't handle
skb_shared_info->frag_list, so we shouldn't be setting theNETIF_F_FRAGLISTflag.Signed-off-by Mark McLoughlin <[email protected]>--- drivers/net/virtio_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines
drivers/net/virtio_net.c static int virtnet_probe(struct virtio_device *vdev) · line 511
Quoted 13 lines
drivers/net/virtio_net.c +1
-1@@ -505,7 +505,7 @@ static int virtnet_probe(struct virtio_device *vdev)/* Do we support "hardware" checksums? */ if (csum &&virtio_has_feature (vdev,VIRTIO_NET_F_CSUM )) {/* This opens up the world of extra features. */ - dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (gso &&virtio_has_feature (vdev,VIRTIO_NET_F_GSO )) { dev->features |=NETIF_F_TSO |NETIF_F_UFO |NETIF_F_TSO_ECN |NETIF_F_TSO6 ;applied this and tun patch
Sorry Jeff, Rusty correctly points out that we do in fact handle shinfo->frags; just a moment of blindness on my part.
Thanks,
Mark.
Quoted 25 lines · Mark McLoughlin
Quoted 9 lines · Jeff Garzik
Quoted 8 lines · Mark McLoughlin
We don't handle
skb_shared_info->frag_list, so we shouldn't be setting theNETIF_F_FRAGLISTflag.Signed-off-by Mark McLoughlin <[email protected]>--- drivers/net/virtio_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)Quoted 14 lines
drivers/net/virtio_net.c static int virtnet_probe(struct virtio_device *vdev) · line 511
Quoted 13 lines
drivers/net/virtio_net.c +1
-1@@ -505,7 +505,7 @@ static int virtnet_probe(struct virtio_device *vdev)/* Do we support "hardware" checksums? */ if (csum &&virtio_has_feature (vdev,VIRTIO_NET_F_CSUM )) {/* This opens up the world of extra features. */ - dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (gso &&virtio_has_feature (vdev,VIRTIO_NET_F_GSO )) { dev->features |=NETIF_F_TSO |NETIF_F_UFO |NETIF_F_TSO_ECN |NETIF_F_TSO6 ;applied this and tun patch
Quoted 2 lines
Sorry Jeff, Rusty correctly points out that we do in fact handle
shinfo->frags; just a moment of blindness on my part.
but what about frag_list ?
Quoted 26 lines · Jeff Garzik
Quoted 25 lines · Mark McLoughlin
Quoted 23 lines · Jeff Garzik
Quoted 13 lines · Mark McLoughlin
We don't handle
skb_shared_info->frag_list, so we shouldn't be setting theNETIF_F_FRAGLISTflag.Signed-off-by Mark McLoughlin <[email protected]>--- drivers/net/virtio_net.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/virtio_net.c +0
-0drivers/net/virtio_net.c static int virtnet_probe(struct virtio_device *vdev) · line 511
Quoted 8 lines
drivers/net/virtio_net.c +1
-1@@ -505,7 +505,7 @@ static int virtnet_probe(struct virtio_device *vdev)/* Do we support "hardware" checksums? */ if (csum &&virtio_has_feature (vdev,VIRTIO_NET_F_CSUM )) {/* This opens up the world of extra features. */ - dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG |NETIF_F_FRAGLIST ; + dev->features |=NETIF_F_HW_CSUM |NETIF_F_SG ;if (gso &&virtio_has_feature (vdev,VIRTIO_NET_F_GSO )) { dev->features |=NETIF_F_TSO |NETIF_F_UFO |NETIF_F_TSO_ECN |NETIF_F_TSO6 ;applied this and tun patch
Quoted 4 lines
Quoted 2 lines
Sorry Jeff, Rusty correctly points out that we do in fact handle
shinfo->frags; just a moment of blindness on my part.but what about
frag_list?
Yeah, I meant shinfo->frag_list.
virtio_net uses skb_to_sgvec() and tun uses skb_copy_datagram_iovec()
Both handle shinfo->frag_list correctly.
Thanks,
Mark.