Skip to content

Fix multi process path selection in Intel drivers

Ciara Loftus dpdk-dev 3 versions – Applied

Status from this message: Applied to next-net-intel.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 11 repliesApplied
  2. v210 patches 2 repliesSuperseded
  3. v110 patches 0 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/10net/i40e: permit secondary process Rx path selectiondrivers/net/intel/i40e/i40e_rxtx.c+2 -21 reply
2/10net/iavf: permit secondary process Rx path selectiondrivers/net/intel/iavf/iavf_rxtx.c+2 -21 reply
3/10net/ice: permit secondary process Rx path selectiondrivers/net/intel/ice/ice_rxtx.c+2 -21 reply
4/10net/idpf: prevent Rx path selection after device startdrivers/net/intel/idpf/idpf_rxtx.c+8 -11 reply
5/10net/cpfl: prevent Rx path selection after device startdrivers/net/intel/cpfl/cpfl_rxtx.c+8 -11 reply
6/10net/i40e: permit secondary process Tx path selectiondrivers/net/intel/i40e/i40e_rxtx.c+2 -21 reply
7/10net/iavf: permit secondary process Tx path selectiondrivers/net/intel/iavf/iavf_ethdev.c drivers/net/intel/iavf/iavf_rxtx.c+7 -21 reply
8/10net/ice: permit secondary process Tx path selectiondrivers/net/intel/ice/ice_rxtx.c+2 -21 reply
9/10net/idpf: permit secondary process Tx path selectiondrivers/net/intel/idpf/idpf_rxtx.c+2 -21 reply
10/10net/cpfl: permit secondary process Tx path selectiondrivers/net/intel/cpfl/cpfl_rxtx.c+2 -21 reply

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchBruce Richardson
1/10A-b
2/10A-b
3/10A-b
4/10A-b
5/10A-b
6/10A-b
7/10A-b
8/10A-b
9/10A-b
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/10] Fix multi process path selection in Intel drivers

This series fixes and makes consistent the approach to selecting Rx and Tx paths in a multi process scenario across the Intel drivers that use the common path selection framework.

In v25.11 the i40e, iavf and ice drivers prevented Rx path selection by secondary processes, in favour of simply selecting the path chosen by the primary process. However, this model does not work if the primary process hasn't started the device before the secondary process encounters the path selection logic. To address this, permit path selection by any process, so long as the device has not yet been started. This allows for the use case where the secondary process is the process that starts the device.
The idpf and cpfl drivers are updated to follow this model as well.

The same issue exists for the Tx path selection for i40e, iavf, ice, idpf and cpfl, so implement the same logic when selecting a Tx path as well ie. permit path selection if the device has not been started.

If two processes were to call the path selection at the same time, in most cases they should both land on the same result. Both would be using the same information from dev->data to build up the structure that is used as input to the path selection function. The effect would be both writing the same values to shared variables eg. rx_func_type in dev->data->dev_private. For this reason I did not add any locking around the path selection logic. The only exception would be the case where the primary and secondary processes are configured with different maximum SIMD bitwidths however this is an invalid use case IMO.

I kept the patches for fixing the Rx and Tx path selection separate, as the patches that target the Rx side will need to be backported to v25.11 whereas the patches for the Tx side do not as that logic was introduced post v25.11.

v3: In iavf ensure a secondary process can see if the primary process has enabled LLDP, which ensures that the correct Tx path will be chosen ie. one with context descriptor support if LLDP is enabled.

Ciara Loftus (10):
net/i40e: permit secondary process Rx path selection net/iavf: permit secondary process Rx path selection net/ice: permit secondary process Rx path selection net/idpf: prevent Rx path selection after device start net/cpfl: prevent Rx path selection after device start net/i40e: permit secondary process Tx path selection net/iavf: permit secondary process Tx path selection net/ice: permit secondary process Tx path selection net/idpf: permit secondary process Tx path selection net/cpfl: permit secondary process Tx path selection

 drivers/net/intel/cpfl/cpfl_rxtx.c   | 13 ++++++++++---
 drivers/net/intel/i40e/i40e_rxtx.c   |  8 ++++----
 drivers/net/intel/iavf/iavf_ethdev.c |  5 +++++
 drivers/net/intel/iavf/iavf_rxtx.c   |  8 ++++----
 drivers/net/intel/ice/ice_rxtx.c     |  8 ++++----
 drivers/net/intel/idpf/idpf_rxtx.c   | 13 ++++++++++---
 6 files changed, 37 insertions(+), 18 deletions(-)
Signature · 1 line
2.43.0