Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5e: Again mutually exclude RX-FCS and RX-port-timestamp

Commit 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs
flag change") seems to have accidentally inverted the logic added in
commit 0bc73ad46a76 ("net/mlx5e: Mutually exclude RX-FCS and
RX-port-timestamp").

The impact of this is a little unclear since it seems the FCS scattered
with RX-FCS is (usually?) correct regardless.

Fixes: 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change")
Tested-by: Charlotte Tan <charlotte@extrahop.com>
Reviewed-by: Charlotte Tan <charlotte@extrahop.com>
Cc: Adham Faris <afaris@nvidia.com>
Cc: Aya Levin <ayal@nvidia.com>
Cc: Tariq Toukan <tariqt@nvidia.com>
Cc: Moshe Shemesh <moshe@nvidia.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Will Mortensen <will@extrahop.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://lore.kernel.org/r/20231006053706.514618-1-will@extrahop.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Will Mortensen and committed by
Paolo Abeni
da6192ca a72178cf

+2 -1
+2 -1
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
··· 3952 3952 struct mlx5e_channels *chs = &priv->channels; 3953 3953 struct mlx5e_params new_params; 3954 3954 int err; 3955 + bool rx_ts_over_crc = !enable; 3955 3956 3956 3957 mutex_lock(&priv->state_lock); 3957 3958 3958 3959 new_params = chs->params; 3959 3960 new_params.scatter_fcs_en = enable; 3960 3961 err = mlx5e_safe_switch_params(priv, &new_params, mlx5e_set_rx_port_ts_wrap, 3961 - &new_params.scatter_fcs_en, true); 3962 + &rx_ts_over_crc, true); 3962 3963 mutex_unlock(&priv->state_lock); 3963 3964 return err; 3964 3965 }