[PATCH 4/6] net/iavf: reformat the Rx path infos array

Bruce Richardson bruce.richardson at intel.com
Tue Oct 14 16:38:11 CEST 2025


On Tue, Oct 14, 2025 at 08:45:15AM +0000, Ciara Loftus wrote:
> In order to improve readability, reformat the rx path infos array.
> 
> Signed-off-by: Ciara Loftus <ciara.loftus at intel.com>
> ---

Thanks, I find this format much more readable.

Some comments inline below.

Acked-by: Bruce Richardson <bruce.richardson at intel.com>


>  drivers/net/intel/iavf/iavf_rxtx.c | 289 +++++++++++++++++++++--------
>  1 file changed, 210 insertions(+), 79 deletions(-)
> 
> diff --git a/drivers/net/intel/iavf/iavf_rxtx.c b/drivers/net/intel/iavf/iavf_rxtx.c
> index bbf3a1737e..58d5747c40 100644
> --- a/drivers/net/intel/iavf/iavf_rxtx.c
> +++ b/drivers/net/intel/iavf/iavf_rxtx.c
> @@ -3720,99 +3720,230 @@ iavf_xmit_pkts_no_poll(void *tx_queue, struct rte_mbuf **tx_pkts,
>  				uint16_t nb_pkts);
>  
>  static const struct ci_rx_path_info iavf_rx_path_infos[] = {
> -	[IAVF_RX_DISABLED] = {iavf_recv_pkts_no_poll, "Disabled",
> -		{IAVF_RX_NO_OFFLOADS, RTE_VECT_SIMD_DISABLED, {.disabled = true}}},
> -	[IAVF_RX_DEFAULT] = {iavf_recv_pkts, "Scalar",
> -		{IAVF_RX_SCALAR_OFFLOADS, RTE_VECT_SIMD_DISABLED}},
> -	[IAVF_RX_SCATTERED] = {iavf_recv_scattered_pkts, "Scalar Scattered",
> -		{IAVF_RX_SCALAR_OFFLOADS | RTE_ETH_RX_OFFLOAD_SCATTER, RTE_VECT_SIMD_DISABLED,
> -			{.scattered = true}}},
> -	[IAVF_RX_FLEX_RXD] = {iavf_recv_pkts_flex_rxd, "Scalar Flex",
> -		{IAVF_RX_SCALAR_FLEX_OFFLOADS, RTE_VECT_SIMD_DISABLED, {.flex_desc = true}}},
> -	[IAVF_RX_SCATTERED_FLEX_RXD] = {iavf_recv_scattered_pkts_flex_rxd, "Scalar Scattered Flex",
> -		{IAVF_RX_SCALAR_FLEX_OFFLOADS | RTE_ETH_RX_OFFLOAD_SCATTER, RTE_VECT_SIMD_DISABLED,
> -				{.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}}},
> +	[IAVF_RX_DISABLED] = {
> +		.pkt_burst = iavf_recv_pkts_no_poll,
> +		.info = "Disabled",
> +		.features = {
> +			.rx_offloads = IAVF_RX_NO_OFFLOADS,

This is zero, so I would tend to omit it.

> +			.simd_width = RTE_VECT_SIMD_DISABLED,

Can our logic selection all work, if we have the simd_width set as zero for
these paths, also indicating SIMD is disabled? Again, it would allow us to
omit the SIMD value altogether for non-vector paths.

> +			.extra.disabled = true}},

Space before the closing braces? Maybe put them on new line?

> +	[IAVF_RX_DEFAULT] = {
> +		.pkt_burst = iavf_recv_pkts,
> +		.info = "Scalar",
> +		.features = {
> +			.rx_offloads = IAVF_RX_SCALAR_OFFLOADS,
> +			.simd_width = RTE_VECT_SIMD_DISABLED}},
<snip>


More information about the dev mailing list