Thread (21 messages) flat view 21 messages, 3 authors, 2016-11-28

Re: [net-next PATCH v2 4/5] virtio_net: add dedicated XDP transmit queues

From: John Fastabend <john.fastabend@gmail.com>
Date: 2016-11-22 08:18:03

On 16-11-21 03:13 PM, Michael S. Tsirkin wrote:
On Sat, Nov 19, 2016 at 06:51:04PM -0800, John Fastabend wrote:
quoted
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 <redacted>
FYI what's supposed to happen is packets from the same
flow going in the reverse direction will go on the
same queue.

This might come in handy when implementing RX XDP.
Yeah but if its the first packet not part of a flow then presumably it
can pick any queue but its worth keeping in mind certainly.

.John
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help