mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
net/mlx5e: advertise max RSS indirection table size to ethtool
Set rxfh_indir_space to the maximum indirection table size the driver can support: the next power of two above MLX5E_MAX_NUM_CHANNELS times MLX5E_UNIFORM_SPREAD_RQT_FACTOR. Without this, ethtool_rxfh_ctxs_can_resize() returns -EINVAL, blocking non-default RSS contexts from tracking indirection table size changes when the channel count changes. Signed-off-by: Yael Chemla <ychemla@nvidia.com> Reviewed-by: Nimrod Oren <noren@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20260511172719.330490-3-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
f7c35c6685
commit
05ebdbaded
|
|
@ -168,8 +168,6 @@ int mlx5e_rqt_init_indir(struct mlx5e_rqt *rqt, struct mlx5_core_dev *mdev,
|
|||
return err;
|
||||
}
|
||||
|
||||
#define MLX5E_UNIFORM_SPREAD_RQT_FACTOR 2
|
||||
|
||||
u32 mlx5e_rqt_size(struct mlx5_core_dev *mdev, unsigned int num_channels)
|
||||
{
|
||||
u32 rqt_size = max_t(u32, MLX5E_INDIR_MIN_RQT_SIZE,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/kernel.h>
|
||||
|
||||
#define MLX5E_INDIR_MIN_RQT_SIZE (BIT(8))
|
||||
#define MLX5E_UNIFORM_SPREAD_RQT_FACTOR 2
|
||||
|
||||
struct mlx5_core_dev;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@
|
|||
|
||||
#define LANES_UNKNOWN 0
|
||||
|
||||
#define MLX5E_MAX_INDIR_RQT_SIZE \
|
||||
roundup_pow_of_two(MLX5E_MAX_NUM_CHANNELS * \
|
||||
MLX5E_UNIFORM_SPREAD_RQT_FACTOR)
|
||||
|
||||
void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
|
||||
struct ethtool_drvinfo *drvinfo)
|
||||
{
|
||||
|
|
@ -2692,6 +2696,7 @@ const struct ethtool_ops mlx5e_ethtool_ops = {
|
|||
.supported_input_xfrm = RXH_XFRM_SYM_OR_XOR,
|
||||
.supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT |
|
||||
ETHTOOL_RING_USE_HDS_THRS,
|
||||
.rxfh_indir_space = MLX5E_MAX_INDIR_RQT_SIZE,
|
||||
.get_drvinfo = mlx5e_get_drvinfo,
|
||||
.get_link = ethtool_op_get_link,
|
||||
.get_link_ext_state = mlx5e_get_link_ext_state,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user