[PATCH v3 05/10] net/idpf: use common Tx path selection infrastructure
Bruce Richardson
bruce.richardson at intel.com
Fri Dec 12 16:26:25 CET 2025
On Fri, Dec 12, 2025 at 11:06:23AM +0000, Ciara Loftus wrote:
> Replace the existing complicated logic with the use of the common
> function. Let the primary process select the Tx path to be used by all
> processes using the given device.
>
> Introduce a new feature "single queue" to the common infrastructure
> which represents whether single or split queue mode is used in the given
> path.
>
> Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
> v2:
> * removed unnecessary tx_vec_allowed
> ---
> drivers/net/intel/common/tx.h | 5 +
> drivers/net/intel/idpf/idpf_common_device.h | 10 ++
> drivers/net/intel/idpf/idpf_common_rxtx.c | 49 ++++++++
> drivers/net/intel/idpf/idpf_common_rxtx.h | 12 ++
> drivers/net/intel/idpf/idpf_rxtx.c | 118 ++++++------------
> drivers/net/intel/idpf/idpf_rxtx_vec_common.h | 10 --
> 6 files changed, 112 insertions(+), 92 deletions(-)
>
> diff --git a/drivers/net/intel/common/tx.h b/drivers/net/intel/common/tx.h
> index 60b1bd642a..24fcfbe225 100644
> --- a/drivers/net/intel/common/tx.h
> +++ b/drivers/net/intel/common/tx.h
> @@ -124,6 +124,7 @@ struct ci_tx_path_features {
> bool simple_tx;
> bool ctx_desc;
> bool disabled;
> + bool single_queue;
> };
>
> struct ci_tx_path_info {
> @@ -318,6 +319,10 @@ ci_tx_path_select(const struct ci_tx_path_features *req_features,
> if (!path_features->ctx_desc && req_features->ctx_desc)
> continue;
>
> + /* If requested, ensure the path supports single queue TX. */
> + if (path_features->single_queue != req_features->single_queue)
> + continue;
> +
> /* Ensure the path supports the requested TX offloads. */
> if ((path_features->tx_offloads & req_features->tx_offloads) !=
> req_features->tx_offloads)
> diff --git a/drivers/net/intel/idpf/idpf_common_device.h b/drivers/net/intel/idpf/idpf_common_device.h
> index c32dcfbb12..eff04a83eb 100644
> --- a/drivers/net/intel/idpf/idpf_common_device.h
> +++ b/drivers/net/intel/idpf/idpf_common_device.h
> @@ -75,6 +75,15 @@ enum idpf_rx_func_type {
> IDPF_RX_MAX
> };
>
> +enum idpf_tx_func_type {
> + IDPF_TX_DEFAULT,
> + IDPF_TX_SINGLEQ,
> + IDPF_TX_SINGLEQ_AVX2,
> + IDPF_TX_AVX512,
> + IDPF_TX_SINGLEQ_AVX512,
> + IDPF_TX_MAX
Following up offline with Ciara about the need for this MAX value - it's
necessary due to the fact that the function type array needs to be shared
with the cpfl driver, but array definition itself is in an idpf C file, so
cpfl cannot use RTE_DIM to find the size.
Will add a comment to explain this a little, on apply.
More information about the dev
mailing list