]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
virtio_net: add dedicated XDP transmit queues
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 15 Dec 2016 20:13:49 +0000 (12:13 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Dec 2016 16:48:55 +0000 (11:48 -0500)
commit672aafd5d88a951f394334802b938b502010d9eb
tree2b00528d8dc79276f234c766ad708ce978c3828f
parentf600b690501550b94e83e07295d9c8b9c4c39f4e
virtio_net: add dedicated XDP transmit queues

XDP requires using isolated transmit queues to avoid interference
with normal networking stack (BQL, NETDEV_TX_BUSY, etc). This patch
adds a XDP queue per cpu when a XDP program is loaded and does not
expose the queues to the OS via the normal API call to
netif_set_real_num_tx_queues(). This way the stack will never push
an skb to these queues.

However virtio/vhost/qemu implementation only allows for creating
TX/RX queue pairs at this time so creating only TX queues was not
possible. And because the associated RX queues are being created I
went ahead and exposed these to the stack and let the backend use
them. This creates more RX queues visible to the network stack than
TX queues which is worth mentioning but does not cause any issues as
far as I can tell.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c