Re: [bpf-next V2 PATCH 11/14] virtio_net: setup xdp_rxq_info
From: Jesper Dangaard Brouer <hidden>
Date: 2017-12-26 11:21:03
From: Jesper Dangaard Brouer <hidden>
Date: 2017-12-26 11:21:03
On Fri, 22 Dec 2017 18:12:31 +0100 Jesper Dangaard Brouer [off-list ref] 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" <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Cc: virtualization@lists.linux-foundation.org Signed-off-by: Jesper Dangaard Brouer <redacted> --- 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