On Tue, Oct 14, 2025 at 08:45:14AM +0000, Ciara Loftus wrote:
> The scalar bulk alloc rx burst function supports both legacy and
> flexible rx descriptors. The rx path selection infrastructure introduced
> in commit 91e3205d72d8 ("net/iavf: use common Rx path selection
> infrastructure") cannot define a path that supports both descriptor
> formats. To solve this problem, have two rx path definitions which both
> point to the same rx burst function but report different descriptor
> formats. This allows the rx path selection function to choose the
> correct path.
> 
> Fixes: 91e3205d72d8 ("net/iavf: use common Rx path selection infrastructure")
> Cc: [email protected]
> 
> Signed-off-by: Ciara Loftus <[email protected]>

I find it strange that both point to the one function but have different
offload capabilities. However, I realise that the code path bifurcates
again later in the function, so doing it this way is correct!

Acked-by: Bruce Richardson <[email protected]>


> ---
>  drivers/net/intel/iavf/iavf.h      | 1 +
>  drivers/net/intel/iavf/iavf_rxtx.c | 3 +++
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/net/intel/iavf/iavf.h b/drivers/net/intel/iavf/iavf.h
> index 435902fbc2..4e76162337 100644
> --- a/drivers/net/intel/iavf/iavf.h
> +++ b/drivers/net/intel/iavf/iavf.h
> @@ -327,6 +327,7 @@ enum iavf_rx_func_type {
>       IAVF_RX_FLEX_RXD,
>       IAVF_RX_SCATTERED_FLEX_RXD,
>       IAVF_RX_BULK_ALLOC,
> +     IAVF_RX_BULK_ALLOC_FLEX_RXD,
>       IAVF_RX_SSE,
>       IAVF_RX_SSE_SCATTERED,
>       IAVF_RX_SSE_FLEX_RXD,
> diff --git a/drivers/net/intel/iavf/iavf_rxtx.c 
> b/drivers/net/intel/iavf/iavf_rxtx.c
> index 67c73f9ad6..bbf3a1737e 100644
> --- a/drivers/net/intel/iavf/iavf_rxtx.c
> +++ b/drivers/net/intel/iavf/iavf_rxtx.c
> @@ -3734,6 +3734,9 @@ static const struct ci_rx_path_info 
> iavf_rx_path_infos[] = {
>                               {.scattered = true, .flex_desc = true}}},
>       [IAVF_RX_BULK_ALLOC] = {iavf_recv_pkts_bulk_alloc, "Scalar Bulk Alloc",
>               {IAVF_RX_SCALAR_OFFLOADS, RTE_VECT_SIMD_DISABLED, {.bulk_alloc 
> = true}}},
> +     [IAVF_RX_BULK_ALLOC_FLEX_RXD] = {iavf_recv_pkts_bulk_alloc, "Scalar 
> Bulk Alloc Flex",
> +                     {IAVF_RX_SCALAR_FLEX_OFFLOADS, RTE_VECT_SIMD_DISABLED,
> +                     {.flex_desc = true, .bulk_alloc = true}}},
>  #ifdef RTE_ARCH_X86
>       [IAVF_RX_SSE] = {iavf_recv_pkts_vec, "Vector SSE",
>               {IAVF_RX_VECTOR_OFFLOAD_OFFLOADS, RTE_VECT_SIMD_128, 
> {.bulk_alloc = true}}},
> -- 
> 2.34.1
> 

Reply via email to