net/mlx5: optimize Rx queue creation
authorMichael Baum <michaelba@nvidia.com>
Mon, 14 Feb 2022 09:00:10 +0000 (11:00 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 23 Feb 2022 14:57:36 +0000 (15:57 +0100)
commitf685878a56e991fdf7846139f098997460d4d799
treefcedea71a62351890a3961c140e917b3876b6e97
parent0ad12a8090d4f34b0308cdbb4cd34750f841d7f9
net/mlx5: optimize Rx queue creation

Recently shared RxQ has been introduced. All shared Rx queues with same
group and queue ID share the same rxq_ctrl, but each one has
mlx5_rxq_priv structure.
The mlx5_rx_queue_setup generates a new rxq_priv structure, and looks
for a rxq_ctrl structure to refer to. If there is already a compatible
rxq_ctrl structure it refers it, otherwise it calls the mlx5_rxq_new
function that generates a new one.

This patch makes mlx5_rxq_new function "standalone", it generates a
rxq_ctrl structure regardless to specific rxq_priv structure. All
operations on the rxq_ctrl structure that depend on the new rxq_priv
structure are performed in the mlx5_rx_queue_setup function, at the same
place for either a new rxq_ctrl structure or an existing rxq_ctrl
structure.

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_rx.h
drivers/net/mlx5/mlx5_rxq.c