From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:34516 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750716AbeBUUJu (ORCPT ); Wed, 21 Feb 2018 15:09:50 -0500 Date: Wed, 21 Feb 2018 15:09:48 -0500 (EST) Message-Id: <20180221.150948.578721398775156876.davem@davemloft.net> To: brouer@redhat.com Cc: jasowang@redhat.com, mst@redhat.com, netdev@vger.kernel.org, john.fastabend@gmail.com, alexei.starovoitov@gmail.com, saeedm@mellanox.com, borkmann@iogearbox.net, tariqt@mellanox.com Subject: Re: [net PATCH 0/4] virtio_net: several bugs in XDP code for driver virtio_net From: David Miller In-Reply-To: <151913348634.28247.17519468037896960567.stgit@firesoul> References: <151913348634.28247.17519468037896960567.stgit@firesoul> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Jesper Dangaard Brouer Date: Tue, 20 Feb 2018 14:31:59 +0100 > The virtio_net driver actually violates the original memory model of > XDP causing hard to debug crashes. Per request of John Fastabend, > instead of removing the XDP feature I'm fixing as much as possible. > While testing virtio_net with XDP_REDIRECT I found 4 different bugs. > > Patch-1: not enough tail-room for build_skb in receive_mergeable() > only option is to disable XDP_REDIRECT in receive_mergeable() > > Patch-2: XDP in receive_small() basically never worked (check wrong flag) > > Patch-3: fix memory leak for XDP_REDIRECT in error cases > > Patch-4: avoid crash when ndo_xdp_xmit is called on dev not ready for XDP > > In the longer run, we should consider introducing a separate receive > function when attaching an XDP program, and also change the memory > model to be compatible with XDP when attaching an XDP prog. Series applied, thanks Jesper.