diff options
author | Jason Wang <jasowang@redhat.com> | 2016-12-23 22:37:28 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-23 13:48:54 -0500 |
commit | b00f70b0dacb3d2e009afce860ebc90219072f5c (patch) | |
tree | 75329d0261d2d61d2e391cb4317588503c6f8256 /drivers | |
parent | 1830f8935f3b173d229b86e9927b3b6d599aa1f6 (diff) | |
download | linux-stable-b00f70b0dacb3d2e009afce860ebc90219072f5c.tar.gz linux-stable-b00f70b0dacb3d2e009afce860ebc90219072f5c.tar.bz2 linux-stable-b00f70b0dacb3d2e009afce860ebc90219072f5c.zip |
virtio-net: unbreak csumed packets for XDP_PASS
We drop csumed packet when do XDP for packets. This breaks
XDP_PASS when GUEST_CSUM is supported. Fix this by allowing csum flag
to be set. With this patch, simple TCP works for XDP_PASS.
Cc: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/virtio_net.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 470293e2b84d..0778dc88597e 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -440,7 +440,7 @@ static struct sk_buff *receive_big(struct net_device *dev, struct virtio_net_hdr_mrg_rxbuf *hdr = buf; u32 act; - if (unlikely(hdr->hdr.gso_type || hdr->hdr.flags)) + if (unlikely(hdr->hdr.gso_type)) goto err_xdp; act = do_xdp_prog(vi, rq, xdp_prog, page, 0, len); switch (act) { @@ -572,7 +572,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, * the receive path after XDP is loaded. In practice I * was not able to create this condition. */ - if (unlikely(hdr->hdr.gso_type || hdr->hdr.flags)) + if (unlikely(hdr->hdr.gso_type)) goto err_xdp; act = do_xdp_prog(vi, rq, xdp_prog, xdp_page, offset, len); |