diff options
author | Tariq Toukan | 2019-07-14 10:43:43 +0200 |
---|---|---|
committer | Saeed Mahameed | 2019-07-25 22:30:59 +0200 |
commit | 694826e366349d5b27599f591d3bd3a53512306e (patch) | |
tree | 20912ea6509c0b292544e459b6c96612522ea647 /drivers/net/ethernet/mellanox/mlx5/core/en | |
parent | net/mlx5: Fix modify_cq_in alignment (diff) | |
download | kernel-qcow2-linux-694826e366349d5b27599f591d3bd3a53512306e.tar.gz kernel-qcow2-linux-694826e366349d5b27599f591d3bd3a53512306e.tar.xz kernel-qcow2-linux-694826e366349d5b27599f591d3bd3a53512306e.zip |
net/mlx5e: Fix wrong max num channels indication
No XSK support in the enhanced IPoIB driver and representors.
Add a profile property to specify this, and enhance the logic
that calculates the max number of channels to take it into
account.
Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/params.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.h b/drivers/net/ethernet/mellanox/mlx5/core/en/params.h index bd882b5ee9a7..3a615d663d84 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.h @@ -66,9 +66,10 @@ static inline void mlx5e_qid_get_ch_and_group(struct mlx5e_params *params, *group = qid / nch; } -static inline bool mlx5e_qid_validate(struct mlx5e_params *params, u64 qid) +static inline bool mlx5e_qid_validate(const struct mlx5e_profile *profile, + struct mlx5e_params *params, u64 qid) { - return qid < params->num_channels * MLX5E_NUM_RQ_GROUPS; + return qid < params->num_channels * profile->rq_groups; } /* Parameter calculations */ |