net/mlx5e: Redirect RQT refactoring
authorSaeed Mahameed <saeedm@mellanox.com>
Mon, 19 Dec 2016 21:20:17 +0000 (23:20 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 27 Mar 2017 12:08:15 +0000 (15:08 +0300)
commita5f97fee743cd7ee9932036583dbe05298ff2648
tree04d9719ce184c4c8751321ecd1190ea64fafe340
parentff9c852f91d14d11a35514dda495999cfdb41a7a
net/mlx5e: Redirect RQT refactoring

RQ Tables are always created once (on netdev creation) pointing to drop RQ
and at that stage, RQ tables (indirection tables) are always directed to
drop RQ.

We don't need to use mlx5e_fill_{direct,indir}_rqt_rqns to fill the drop
RQ in create RQT procedure.

Instead of having separate flows to redirect direct and indirect RQ Tables
to the current active channels Receive Queues (RQs), we unify the two
flows by introducing mlx5e_redirect_rqt function and redirect_rqt_param
struct. Combined, they provide one generic logic to fill the RQ table RQ
numbers regardless of the RQ table purpose (direct/indirect).

Demonstrated the usage with mlx5e_redirect_rqts_to_channels which will
be called on mlx5e_open and with mlx5e_redirect_rqts_to_drop which will
be called on mlx5e_close.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c