• John Fastabend's avatar
    virtio_net: add dedicated XDP transmit queues · 672aafd5
    John Fastabend authored
    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: default avatarJohn Fastabend <john.r.fastabend@intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    672aafd5
virtio_net.c 58.5 KB