net/mlx5e: Unify constants for WQE_EMPTY_DS_COUNT
authorMaxim Mikityanskiy <maximmi@mellanox.com>
Thu, 9 Jul 2020 11:05:31 +0000 (14:05 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Tue, 22 Sep 2020 02:41:15 +0000 (19:41 -0700)
commit97e3afd64dc2918f79026986c575f3343197e7c8
tree2db35d53ee1bafc48d1a24284835ec5e15a4b271
parent388a2b56e5b042e0d1ad4d309f875a944b1d1c11
net/mlx5e: Unify constants for WQE_EMPTY_DS_COUNT

A constant for the number of DS in an empty WQE (i.e. a WQE without data
segments) is needed in multiple places (normal TX data path, MPWQE in
XDP), but currently we have a constant for XDP and an inline formula in
normal TX. This patch introduces a common constant.

Additionally, mlx5e_xdp_mpwqe_session_start is converted to use struct
assignment, because the code nearby is touched.

Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/txrx.h
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c