From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [bpf-next V2 PATCH 11/14] virtio_net: setup xdp_rxq_info Date: Tue, 26 Dec 2017 12:20:50 +0100 Message-ID: <20171226122050.3a453cd7@redhat.com> References: <151396262289.20006.1429172971820409456.stgit@firesoul> <151396275093.20006.9684557344807016870.stgit@firesoul> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , netdev@vger.kernel.org, Jason Wang , dsahern@gmail.com, virtualization@lists.linux-foundation.org, gospo@broadcom.com, bjorn.topel@intel.com, michael.chan@broadcom.com, brouer@redhat.com To: Daniel Borkmann , Alexei Starovoitov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:46104 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbdLZLVD (ORCPT ); Tue, 26 Dec 2017 06:21:03 -0500 In-Reply-To: <151396275093.20006.9684557344807016870.stgit@firesoul> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 22 Dec 2017 18:12:31 +0100 Jesper Dangaard Brouer wrote: > The virtio_net driver doesn't dynamically change the RX-ring queue > layout and backing pages, but instead reject XDP setup if all the > conditions for XDP is not meet. Thus, the xdp_rxq_info also remains > fairly static. This allow us to simply add the reg/unreg to > net_device open/close functions. > > Driver hook points for xdp_rxq_info: > * reg : virtnet_open > * unreg: virtnet_close > > Cc: "Michael S. Tsirkin" > Cc: Jason Wang > Cc: virtualization@lists.linux-foundation.org > Signed-off-by: Jesper Dangaard Brouer > --- > drivers/net/virtio_net.c | 12 +++++++++++- Found a bug while testing this... I forgot to update receive_mergeable() too. I'll send a V3 -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer