From: Daniel Borkmann <daniel@iogearbox•net>
To: Jason Wang <jasowang@redhat•com>,
mst@redhat•com, virtualization@lists•linux-foundation.org,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Cc: john.r.fastabend@intel•com
Subject: Re: [PATCH net 1/9] virtio-net: remove the warning before XDP linearizing
Date: Fri, 23 Dec 2016 20:31:53 +0100 [thread overview]
Message-ID: <585D7BA9.50509@iogearbox.net> (raw)
In-Reply-To: <1482503852-12438-2-git-send-email-jasowang@redhat.com>
Hi Jason,
On 12/23/2016 03:37 PM, Jason Wang wrote:
> Since we use EWMA to estimate the size of rx buffer. When rx buffer
> size is underestimated, it's usual to have a packet with more than one
> buffers. Consider this is not a bug, remove the warning and correct
> the comment before XDP linearizing.
>
> Cc: John Fastabend <john.r.fastabend@intel•com>
> Signed-off-by: Jason Wang <jasowang@redhat•com>
> ---
> drivers/net/virtio_net.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 08327e0..1067253 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -552,14 +552,8 @@ static struct sk_buff *receive_mergeable(struct net_device *dev,
> struct page *xdp_page;
> u32 act;
>
> - /* No known backend devices should send packets with
> - * more than a single buffer when XDP conditions are
> - * met. However it is not strictly illegal so the case
> - * is handled as an exception and a warning is thrown.
> - */
> + /* This happens when rx buffer size is underestimated */
> if (unlikely(num_buf > 1)) {
> - bpf_warn_invalid_xdp_buffer();
Could you also remove the bpf_warn_invalid_xdp_buffer(), which got added
just for this?
Thanks.
> /* linearize data for XDP */
> xdp_page = xdp_linearize_page(rq, num_buf,
> page, offset, &len);
>
next prev parent reply other threads:[~2016-12-23 19:31 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-23 14:37 [PATCH net 0/9] several fixups for virtio-net XDP Jason Wang
2016-12-23 14:37 ` [PATCH net 1/9] virtio-net: remove the warning before XDP linearizing Jason Wang
2016-12-23 19:31 ` Daniel Borkmann [this message]
2016-12-27 3:08 ` Jason Wang
2016-12-23 14:37 ` [PATCH net 2/9] virtio-net: correctly xmit linearized page on XDP_TX Jason Wang
2016-12-23 15:47 ` John Fastabend
2016-12-23 14:37 ` [PATCH net 3/9] virtio-net: fix page miscount during XDP linearizing Jason Wang
2016-12-23 15:54 ` John Fastabend
2016-12-26 2:30 ` Jason Wang
2016-12-23 14:37 ` [PATCH net 4/9] virtio-net: correctly handle XDP_PASS for linearized packets Jason Wang
2016-12-23 15:57 ` John Fastabend
2016-12-26 2:34 ` Jason Wang
2016-12-23 14:37 ` [PATCH net 5/9] virtio-net: unbreak csumed packets for XDP_PASS Jason Wang
2016-12-23 15:58 ` John Fastabend
2016-12-23 14:37 ` [PATCH net 6/9] virtio-net: make rx buf size estimation works for XDP Jason Wang
2016-12-23 16:02 ` John Fastabend
2016-12-23 14:37 ` [PATCH net 7/9] virtio-net: forbid XDP when VIRTIO_NET_F_GUEST_UFO is support Jason Wang
2016-12-23 16:02 ` John Fastabend
2016-12-23 16:10 ` John Fastabend
2016-12-26 2:38 ` Jason Wang
2016-12-23 14:37 ` [PATCH net 8/9] virtio-net: remove big packet XDP codes Jason Wang
2016-12-23 14:37 ` [PATCH net 9/9] virtio-net: XDP support for small buffers Jason Wang
2016-12-23 16:51 ` John Fastabend
2017-01-02 22:43 ` John Fastabend
2017-01-03 6:16 ` Jason Wang
2017-01-03 16:40 ` John Fastabend
2017-01-04 3:05 ` Jason Wang
2016-12-23 17:10 ` [PATCH net 0/9] several fixups for virtio-net XDP John Fastabend
2016-12-26 2:39 ` Jason Wang
2016-12-23 18:49 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=585D7BA9.50509@iogearbox.net \
--to=daniel@iogearbox$(echo .)net \
--cc=jasowang@redhat$(echo .)com \
--cc=john.r.fastabend@intel$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=mst@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=virtualization@lists$(echo .)linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox