Re: [PATCH v3 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Jakub Kicinski
On Sun, 28 Feb 2021 16:22:47 +0800 Xuan Zhuo wrote: > +static void virtnet_put_xdp_sq(struct virtnet_info *vi, struct send_queue > *sq) > +{ > + struct netdev_queue *txq; > + unsigned int qp; > + > + if (vi->curr_queue_pairs <= nr_cpu_ids) { > + qp = sq - vi->sq; > +

[PATCH v3 net-next] virtio-net: support XDP_TX when not more queues

2021-02-28 Thread Xuan Zhuo
The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX. This patch allows XDP_TX to run by reuse the existing SQ with __netif_tx_lock() hold when there a