[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1680247235.3085878-2-xuanzhuo@linux.alibaba.com>
Date: Fri, 31 Mar 2023 15:20:35 +0800
From: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: "Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
virtualization@...ts.linux-foundation.org, bpf@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 8/8] virtio_net: introduce receive_small_xdp()
On Thu, 30 Mar 2023 12:48:22 +0200, Paolo Abeni <pabeni@...hat.com> wrote:
> On Tue, 2023-03-28 at 20:04 +0800, Xuan Zhuo wrote:
> > @@ -949,15 +1042,11 @@ static struct sk_buff *receive_small(struct net_device *dev,
> > {
> > struct sk_buff *skb;
> > struct bpf_prog *xdp_prog;
> > - unsigned int xdp_headroom = (unsigned long)ctx;
> > - unsigned int header_offset = VIRTNET_RX_PAD + xdp_headroom;
> > + unsigned int header_offset = VIRTNET_RX_PAD;
> > unsigned int headroom = vi->hdr_len + header_offset;
>
> This changes (reduces) the headroom for non-xpd-pass skbs.
>
> [...]
> > + buf += header_offset;
> > + memcpy(skb_vnet_hdr(skb), buf, vi->hdr_len);
>
> AFAICS, that also means that receive_small(), for such packets, will
> look for the virtio header in a different location. Is that expected?
That is a mistake.
Will fix.
Thanks.
>
> Thanks.
>
> Paolo
>
Powered by blists - more mailing lists