[dpdk-dev] mlx5 reta size is dynamic

Hanoch Haim (hhaim) hhaim at cisco.com
Thu Mar 22 07:52:53 CET 2018


Hi Yongseok, 


RSS has a DPDK API,application can ask for the reta table size and configure it. In your case you are assuming specific use case and change the size dynamically which solve 90% of the use-cases but break the 10% use-case. 
Instead, you could provide the application a consistent API and with that 100% of the applications can work with no issue. This is what happen with Intel (ixgbe/i40e)
Another minor issue the rss_key_size return as zero but internally it is 40 bytes

Thanks,
Hanoh

-----Original Message-----
From: Yongseok Koh [mailto:yskoh at mellanox.com] 
Sent: Wednesday, March 21, 2018 11:48 PM
To: Hanoch Haim (hhaim)
Cc: dev at dpdk.org
Subject: Re: [dpdk-dev] mlx5 reta size is dynamic

On Wed, Mar 21, 2018 at 06:56:33PM +0000, Hanoch Haim (hhaim) wrote:
> Hi mlx5 driver expert,
> 
> DPDK: 17.11
> Any reason mlx5 driver change the rate table size dynamically based on 
> the rx- queues# ?

The device only supports 2^n-sized indirection table. For example, if the number of Rx queues is 6, device can't have 1-1 mapping but the size of ind tbl could be 8, 16, 32 and so on. If we configure it as 8 for example, 2 out of 6 queues will have 1/4 of traffic while the rest 4 queues receives 1/8. We thought it was too much disparity and preferred setting the max size in order to mitigate the imbalance.

> There is a hidden assumption that the user wants to distribute the 
> packets evenly which is not always correct.

But it is mostly correct because RSS is used for uniform distribution. The decision wasn't made based on our speculation but by many request from multiple customers.

> /* If the requested number of RX queues is not a power of two, use the
>           * maximum indirection table size for better balancing.
>           * The result is always rounded to the next power of two. */
>           reta_idx_n = (1 << log2above((rxqs_n & (rxqs_n - 1)) ?
>                                            priv->ind_table_max_size :
>                                            rxqs_n));

Thanks,
Yongseok


More information about the dev mailing list