[dpdk-dev] mlx5 reta size is dynamic

Yongseok Koh yskoh at mellanox.com
Wed Mar 21 22:47:50 CET 2018


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