From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] virtio-net: keep vnet header zeroed after processing XDP Date: Fri, 30 Nov 2018 17:25:46 -0800 (PST) Message-ID: <20181130.172546.127269245503154590.davem@davemloft.net> References: <20181129055316.24090-1-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: mst@redhat.com, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: jasowang@redhat.com Return-path: In-Reply-To: <20181129055316.24090-1-jasowang@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Jason Wang Date: Thu, 29 Nov 2018 13:53:16 +0800 > We copy vnet header unconditionally in page_to_skb() this is wrong > since XDP may modify the packet data. So let's keep a zeroed vnet > header for not confusing the conversion between vnet header and skb > metadata. > > In the future, we should able to detect whether or not the packet was > modified and keep using the vnet header when packet was not touched. > > Fixes: f600b6905015 ("virtio_net: Add XDP support") > Reported-by: Pavel Popa > Signed-off-by: Jason Wang Applied and queued up for -stable, thanks.