xdp-tutorial icon indicating copy to clipboard operation
xdp-tutorial copied to clipboard

advanced03-AF_XDP: Gotcha by RX-queue id binding

Open simonhf opened this issue 5 years ago • 1 comments

Section [1] warns about multiple NIC queues, but AFAICT veth, at least by default, does not use multiple queues. So now to the question: Is there a way to make veth use multiple queue for testing XDP code (I Googled hard but nothing was coming up...)? Or is the only way to test that code with real hardware NICs which also use multiple queues?

[1] https://github.com/xdp-project/xdp-tutorial/tree/master/advanced03-AF_XDP#gotcha-by-rx-queue-id-binding

simonhf avatar Mar 02 '20 18:03 simonhf

Simon Hardy-Francis [email protected] writes:

Section [1] warns about multiple NIC queues, but AFAICT veth, at least by default, does not use multiple queues. So now to the question: Is there a way to make veth use multiple queue for testing XDP code (I Googled hard but nothing was coming up...)? Or is the only way to test that code with real hardware NICs which also use multiple queues?

You can set the number of veth queues when you create the device using the numtxqueues and numrxqueues parameters to 'ip link'. See 'man ip-link'. I think you probably need to have the same number of TX and RX queues for things to work the way you expect with XDP...

tohojo avatar Mar 02 '20 22:03 tohojo