net/mlx5e: Again mutually exclude RX-FCS and RX-port-timestamp
PATCH 1/1 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.
---
For what it's worth, regardless of this change the PCMR register behaves unexpectedly in our testing on NICs where rx_ts_over_crc_cap is 1 (i.e. where rx_ts_over_crc is supported), such as ConnectX-7 running firmware 28.37.1014. For example, fcs_chk is always 0, and rx_ts_over_crc can never be set to 1 after being set to 0. On ConnectX-5, where rx_ts_over_crc_cap is 0, fcs_chk behaves as expected.
We'll probably be opening a support case about that after we test more, but I mention it here because it makes FCS-related testing confusing.
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 -1
@@ -3952,13 +3952,14 @@ static int set_feature_rx_fcs(struct net_device *netdev, bool enable)struct mlx5e_channels *chs = &priv->channels;struct mlx5e_params new_params;int err; +bool rx_ts_over_crc = !enable;mutex_lock (&priv->state_lock); new_params = chs->params; new_params.scatter_fcs_en = enable; err =mlx5e_safe_switch_params (priv, &new_params, mlx5e_set_rx_port_ts_wrap, - &new_params.scatter_fcs_en, true); + &rx_ts_over_crc, true);mutex_unlock (&priv->state_lock);return err; }
Signature · 1 line
2.34.1
Quoted 8 lines · Will Mortensen
Commit
1e66220948df8("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change") seems to have accidentally inverted the logic added in commit0bc73ad46a76("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.
Thanks for your patch.
Quoted 17 lines
Fixes 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change")Tested-by Charlotte Tan <[email protected]>Reviewed-by Charlotte Tan <[email protected]>Cc Adham Faris <[email protected]>Cc Aya Levin <[email protected]>Cc Tariq Toukan <[email protected]>Cc Moshe Shemesh <[email protected]>Cc Saeed Mahameed <[email protected]>Signed-off-by Will Mortensen <[email protected]>---
For what it's worth, regardless of this change the PCMR register behaves unexpectedly in our testing on NICs whererx_ts_over_crc_capis 1 (i.e. whererx_ts_over_crcis supported), such as ConnectX-7 running firmware 28.37.1014. For example,fcs_chkis always 0, andrx_ts_over_crccan never be set to 1 after being set to 0. On ConnectX-5, whererx_ts_over_crc_capis 0,fcs_chkbehaves as expected.
Quoted 3 lines
We'll probably be opening a support case about that after we test more, but I mention it here because it makes FCS-related testing confusing.
Please open the case and we'll analyze.
drivers/net/ethernet/mellanox/mlx5/core/en_main.c static int set_feature_rx_fcs(struct net_device *netdev, bool enable) · line 3955
Quoted 12 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1
-0@@ -3952,13 +3952,14 @@ static int set_feature_rx_fcs(struct net_device *netdev, bool enable)struct mlx5e_channels *chs = &priv->channels;struct mlx5e_params new_params;int err; +bool rx_ts_over_crc = !enable;
nit: Please maintain the reserved Christmas tree.
drivers/net/ethernet/mellanox/mlx5/core/en_main.c static int set_feature_rx_fcs(struct net_device *netdev, bool enable) · line 3965
Quoted 11 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1
-1mutex_lock (&priv->state_lock); new_params = chs->params; new_params.scatter_fcs_en = enable; err =mlx5e_safe_switch_params (priv, &new_params, mlx5e_set_rx_port_ts_wrap, - &new_params.scatter_fcs_en, true); + &rx_ts_over_crc, true);mutex_unlock (&priv->state_lock);return err; }
Regards,
Tariq
Paolo Abeni
maintainerQuoted 54 lines · Tariq Toukan
Quoted 8 lines · Will Mortensen
Commit
1e66220948df8("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change") seems to have accidentally inverted the logic added in commit0bc73ad46a76("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.
Thanks for your patch.
Quoted 17 lines
Fixes 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change")Tested-by Charlotte Tan <[email protected]>Reviewed-by Charlotte Tan <[email protected]>Cc Adham Faris <[email protected]>Cc Aya Levin <[email protected]>Cc Tariq Toukan <[email protected]>Cc Moshe Shemesh <[email protected]>Cc Saeed Mahameed <[email protected]>Signed-off-by Will Mortensen <[email protected]>---
For what it's worth, regardless of this change the PCMR register behaves unexpectedly in our testing on NICs whererx_ts_over_crc_capis 1 (i.e. whererx_ts_over_crcis supported), such as ConnectX-7 running firmware 28.37.1014. For example,fcs_chkis always 0, andrx_ts_over_crccan never be set to 1 after being set to 0. On ConnectX-5, whererx_ts_over_crc_capis 0,fcs_chkbehaves as expected.Quoted 3 lines
We'll probably be opening a support case about that after we test more, but I mention it here because it makes FCS-related testing confusing.
Please open the case and we'll analyze.
drivers/net/ethernet/mellanox/mlx5/core/en_main.c static int set_feature_rx_fcs(struct net_device *netdev, bool enable) · line 3955
Quoted 12 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1
-0@@ -3952,13 +3952,14 @@ static int set_feature_rx_fcs(struct net_device *netdev, bool enable)struct mlx5e_channels *chs = &priv->channels;struct mlx5e_params new_params;int err; +bool rx_ts_over_crc = !enable;nit: Please maintain the reserved Christmas tree.
Quoted 3 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +0
-0mutex_lock (&priv->state_lock);
Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c static int set_feature_rx_fcs(struct net_device *netdev, bool enable) · line 3965
Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1
-1new_params = chs->params; new_params.scatter_fcs_en = enable; err =mlx5e_safe_switch_params (priv, &new_params, mlx5e_set_rx_port_ts_wrap, - &new_params.scatter_fcs_en, true); + &rx_ts_over_crc, true);mutex_unlock (&priv->state_lock);return err; }Reviewed-by Tariq Toukan <[email protected]>
@Tariq: do you prefer we will take this patch directly, or do you prefer send it with a later PR?
Thanks,
Paolo
Quoted 66 lines · Paolo Abeni
Quoted 54 lines · Tariq Toukan
Quoted 8 lines · Will Mortensen
Commit
1e66220948df8("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change") seems to have accidentally inverted the logic added in commit0bc73ad46a76("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.
Thanks for your patch.
Quoted 17 lines
Fixes 1e66220948df8 ("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change")Tested-by Charlotte Tan <[email protected]>Reviewed-by Charlotte Tan <[email protected]>Cc Adham Faris <[email protected]>Cc Aya Levin <[email protected]>Cc Tariq Toukan <[email protected]>Cc Moshe Shemesh <[email protected]>Cc Saeed Mahameed <[email protected]>Signed-off-by Will Mortensen <[email protected]>---
For what it's worth, regardless of this change the PCMR register behaves unexpectedly in our testing on NICs whererx_ts_over_crc_capis 1 (i.e. whererx_ts_over_crcis supported), such as ConnectX-7 running firmware 28.37.1014. For example,fcs_chkis always 0, andrx_ts_over_crccan never be set to 1 after being set to 0. On ConnectX-5, whererx_ts_over_crc_capis 0,fcs_chkbehaves as expected.Quoted 3 lines
We'll probably be opening a support case about that after we test more, but I mention it here because it makes FCS-related testing confusing.
Please open the case and we'll analyze.
drivers/net/ethernet/mellanox/mlx5/core/en_main.c static int set_feature_rx_fcs(struct net_device *netdev, bool enable) · line 3955
Quoted 12 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1
-0@@ -3952,13 +3952,14 @@ static int set_feature_rx_fcs(struct net_device *netdev, bool enable)struct mlx5e_channels *chs = &priv->channels;struct mlx5e_params new_params;int err; +bool rx_ts_over_crc = !enable;nit: Please maintain the reserved Christmas tree.
Quoted 3 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +0
-0mutex_lock (&priv->state_lock);Quoted 10 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c static int set_feature_rx_fcs(struct net_device *netdev, bool enable) · line 3965
Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +1
-1new_params = chs->params; new_params.scatter_fcs_en = enable; err =mlx5e_safe_switch_params (priv, &new_params, mlx5e_set_rx_port_ts_wrap, - &new_params.scatter_fcs_en, true); + &rx_ts_over_crc, true);mutex_unlock (&priv->state_lock);return err; }Reviewed-by Tariq Toukan <[email protected]>
Quoted 7 lines
@Tariq: do you prefer we will take this patch directly, or do you prefer send it with a later PR?
Thanks,
Paolo
Please take it.
Thanks,
Tariq
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 9 lines · On Thu, 5 Oct 2023 22:37:06 -0700 you wrote:
Commit
1e66220948df8("net/mlx5e: Update rx ring hw mtu upon each rx-fcs flag change") seems to have accidentally inverted the logic added in commit0bc73ad46a76("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.
[...]
Here is the summary with links:
- net/mlx5e: Again mutually exclude RX-FCS and RX-port-timestamp
https://git.kernel.org/netdev/net/c/da6192ca72d5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html