Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965774AbcLWP61 (ORCPT ); Fri, 23 Dec 2016 10:58:27 -0500 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32927 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938908AbcLWP6X (ORCPT ); Fri, 23 Dec 2016 10:58:23 -0500 Subject: Re: [PATCH net 5/9] virtio-net: unbreak csumed packets for XDP_PASS To: Jason Wang , mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1482503852-12438-1-git-send-email-jasowang@redhat.com> <1482503852-12438-6-git-send-email-jasowang@redhat.com> Cc: john.r.fastabend@intel.com From: John Fastabend Message-ID: <585D498E.6020000@gmail.com> Date: Fri, 23 Dec 2016 07:58:06 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1482503852-12438-6-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1381 Lines: 36 On 16-12-23 06:37 AM, Jason Wang wrote: > 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 > Signed-off-by: Jason Wang > --- > drivers/net/virtio_net.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 470293e..0778dc8 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); > Acked-by: John Fastabend