net/af_xdp: update doc with information on queue setup

Message ID 20220222143148.14502-1-ciara.loftus@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/af_xdp: update doc with information on queue setup |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Loftus, Ciara Feb. 22, 2022, 2:31 p.m. UTC
  When an AF_XDP PMD is created without specifying the 'start_queue', the
default Rx queue associated with the socket will be Rx queue 0. A common
scenario encountered by users new to AF_XDP is that they create the
socket on queue 0 however their interface is configured with many more
queues. In this case, traffic might land on for example queue 18 which
means it will never reach the socket.

This commit updates the AF_XDP documentation with instructions on how to
configure the interface to ensure the traffic will land on queue 0 and
thus reach the socket successfully.

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 doc/guides/nics/af_xdp.rst | 10 ++++++++++
 1 file changed, 10 insertions(+)
  

Comments

Ferruh Yigit Feb. 23, 2022, 12:40 p.m. UTC | #1
On 2/22/2022 2:31 PM, Ciara Loftus wrote:
> When an AF_XDP PMD is created without specifying the 'start_queue', the
> default Rx queue associated with the socket will be Rx queue 0. A common
> scenario encountered by users new to AF_XDP is that they create the
> socket on queue 0 however their interface is configured with many more
> queues. In this case, traffic might land on for example queue 18 which
> means it will never reach the socket.
> 
> This commit updates the AF_XDP documentation with instructions on how to
> configure the interface to ensure the traffic will land on queue 0 and
> thus reach the socket successfully.
> 
> Signed-off-by: Ciara Loftus<ciara.loftus@intel.com>

This is useful, thanks.

Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/doc/guides/nics/af_xdp.rst b/doc/guides/nics/af_xdp.rst
index ee1e146a9e..ba3ee6a2f0 100644
--- a/doc/guides/nics/af_xdp.rst
+++ b/doc/guides/nics/af_xdp.rst
@@ -64,6 +64,16 @@  The following example will set up an af_xdp interface in DPDK:
 
     --vdev net_af_xdp,iface=ens786f1
 
+If 'start_queue' is not specified in the vdev arguments, the socket will by
+default be created on Rx queue 0. To ensure traffic lands on this queue, one can
+use flow steering if the network card supports it. Or, a simpler way is to
+reduce the number of configured queues for the device which will ensure that all
+traffic will land on queue 0 and thus reach the socket:
+
+.. code-block:: console
+
+    ethtool -L ens786f1 combined 1
+
 Limitations
 -----------