Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932828AbcL0DIo (ORCPT ); Mon, 26 Dec 2016 22:08:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52554 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932595AbcL0DIk (ORCPT ); Mon, 26 Dec 2016 22:08:40 -0500 Subject: Re: [PATCH net 1/9] virtio-net: remove the warning before XDP linearizing To: Daniel Borkmann , 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-2-git-send-email-jasowang@redhat.com> <585D7BA9.50509@iogearbox.net> Cc: john.r.fastabend@intel.com From: Jason Wang Message-ID: Date: Tue, 27 Dec 2016 11:08:34 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <585D7BA9.50509@iogearbox.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 27 Dec 2016 03:08:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1461 Lines: 43 On 2016年12月24日 03:31, Daniel Borkmann wrote: > 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 >> Signed-off-by: Jason Wang >> --- >> 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. Posted. Thanks