From: Saeed Mahameed <saeedm@nvidia.com>
Hi Dave, Jakub,
This series introduces some fixes to mlx5 driver.
Please pull and let me know if there is any problem.
Included here, a patch which solves a build warning reported on
linux-kernel mailing list [1]:
Fix commit ("net/mlx5: Bridge, fix uninitialized variable usage")
I hope this series can make it to rc1.
[1] https://www.spinics.net/lists/netdev/msg765481.html
Thanks,
Saeed.
---
The following changes since commit 0f77f2defaf682eb7e7ef623168e49c74ae529e3:
ieee802154: Remove redundant initialization of variable ret (2021-09-07 14:06:08 +0100)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git tags/mlx5-fixes-2021-09-07
for you to fetch changes up to 8db6a54f3cae6a803b2cbf5390662bca641f7da8:
net/mlx5e: Fix condition when retrieving PTP-rqn (2021-09-07 14:17:02 -0700)
----------------------------------------------------------------
mlx5-fixes-2021-09-07
----------------------------------------------------------------
Aya Levin (2):
net/mlx5e: Fix mutual exclusion between CQE compression and HW TS
net/mlx5e: Fix condition when retrieving PTP-rqn
Maor Gottlieb (1):
net/mlx5: Fix potential sleeping in atomic context
Mark Bloch (1):
net/mlx5: Lag, don't update lag if lag isn't supported
Parav Pandit (1):
net/mlx5: Fix rdma aux device on devlink reload
Saeed Mahameed (1):
net/mlx5: FWTrace, cancel work on alloc pd error flow
Vlad Buslov (1):
net/mlx5: Bridge, fix uninitialized variable usage
drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 7 ++-----
drivers/net/ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 3 ++-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 ++++++-----
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++--
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 5 ++---
drivers/net/ethernet/mellanox/mlx5/core/lag.c | 10 ++++++++--
9 files changed, 26 insertions(+), 22 deletions(-)
From: Parav Pandit <redacted>
RDMA auxdev parameter registration was skipped for eswitch manager PCI PF.
Due to this when devlink parameter is read, it reads as false in below
code flow.
$ devlink dev reload pci/0000:06:00.0
devlink_reload()
mlx5_load_one()
mlx5_attach_device()
is_ib_enabled()
devlink_param_driverinit_value_get()
Due to this, is_ib_enabled() returns false for the RDMA auxiliary
device. This results into a skipping RDMA auxiliary device creation on
reload.
There is no need to check for eswitch manager capability to support RDMA
auxiliary device. Hence, fix it by skipping eswitch manager capability.
Fixes: 87158cedf00e ("net/mlx5: Support enable_rdma devlink dev param")
Signed-off-by: Parav Pandit <redacted>
Reviewed-by: Shay Drory <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
From: Vlad Buslov <redacted>
In some conditions variable 'err' is not assigned with value in
mlx5_esw_bridge_port_obj_attr_set() and mlx5_esw_bridge_port_changeupper()
functions after recent changes to support LAG. Initialize the variable with
zero value in both cases.
Reported-by: Colin King <redacted>
Reported-by: Tim Gardner <redacted>
Reported-by: Naresh Kamboju <redacted>
CC: linux-kernel@vger.kernel.org
Fixes: ff9b7521468b ("net/mlx5: Bridge, support LAG")
Signed-off-by: Vlad Buslov <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
From: Mark Bloch <mbloch@nvidia.com>
In NICs that don't support LAG, the LAG control structure won't be
allocated. If it wasn't allocated it means LAG doesn't exists and can be
skipped.
Fixes: cac1eb2cf2e3 ("net/mlx5: Lag, properly lock eswitch if needed")
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Maor Gottlieb <redacted>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/lag.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
From: Aya Levin <redacted>
Some profiles of the driver don't support a dedicated PTP-RQ, hence can't
support HW TS and CQE compression simultaneously. When HW TS is enabled
the COE compression is disabled, and should be restored when the HW TS
is turned off. Add rx_filter as an input to modifying CQE compression to
enforce this restriction.
Fixes: 256f79d13c1d ("net/mlx5e: Fix HW TS with CQE compression according to profile")
Signed-off-by: Aya Levin <redacted>
Reviewed-by: Moshe Shemesh <redacted>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 11 ++++++-----
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 4 ++--
3 files changed, 9 insertions(+), 8 deletions(-)
@@ -1896,8 +1896,7 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_valif(curr_val==new_val)return0;-if(new_val&&!priv->profile->rx_ptp_support&&-priv->tstamp.rx_filter!=HWTSTAMP_FILTER_NONE){+if(new_val&&!priv->profile->rx_ptp_support&&rx_filter){netdev_err(priv->netdev,"Profile doesn't support enabling of CQE compression while hardware time-stamping is enabled.\n");return-EINVAL;
@@ -1905,7 +1904,7 @@ int mlx5e_modify_rx_cqe_compression_locked(struct mlx5e_priv *priv, bool new_valnew_params=priv->channels.params;MLX5E_SET_PFLAG(&new_params,MLX5E_PFLAG_RX_CQE_COMPRESS,new_val);-if(priv->tstamp.rx_filter!=HWTSTAMP_FILTER_NONE)+if(rx_filter)new_params.ptp_rx=new_val;if(new_params.ptp_rx==priv->channels.params.ptp_rx)
@@ -1928,12 +1927,14 @@ static int set_pflag_rx_cqe_compress(struct net_device *netdev,{structmlx5e_priv*priv=netdev_priv(netdev);structmlx5_core_dev*mdev=priv->mdev;+boolrx_filter;interr;if(!MLX5_CAP_GEN(mdev,cqe_compression))return-EOPNOTSUPP;-err=mlx5e_modify_rx_cqe_compression_locked(priv,enable);+rx_filter=priv->tstamp.rx_filter!=HWTSTAMP_FILTER_NONE;+err=mlx5e_modify_rx_cqe_compression_locked(priv,enable,rx_filter);if(err)returnerr;
From: Aya Levin <redacted>
When activating the PTP-RQ, redirect the RQT from drop-RQ to PTP-RQ.
Use mlx5e_channels_get_ptp_rqn to retrieve the rqn. This helper returns
a boolean (not status), hence caller should consider return value 0 as a
fail. Change the caller interpretation of the return value.
Fixes: 43ec0f41fa73 ("net/mlx5e: Hide all implementation details of mlx5e_rx_res")
Signed-off-by: Aya Levin <redacted>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/rx_res.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Hello:
This series was applied to netdev/net.git (refs/heads/master):
On Tue, 7 Sep 2021 14:24:14 -0700 you wrote:
From: Vlad Buslov <redacted>
In some conditions variable 'err' is not assigned with value in
mlx5_esw_bridge_port_obj_attr_set() and mlx5_esw_bridge_port_changeupper()
functions after recent changes to support LAG. Initialize the variable with
zero value in both cases.
[...]
From: Jakub Kicinski <kuba@kernel.org> Date: 2021-09-08 16:40:03
On Tue, 7 Sep 2021 14:24:20 -0700 Saeed Mahameed wrote:
From: Aya Levin <redacted>
When activating the PTP-RQ, redirect the RQT from drop-RQ to PTP-RQ.
Use mlx5e_channels_get_ptp_rqn to retrieve the rqn. This helper returns
a boolean (not status), hence caller should consider return value 0 as a
fail. Change the caller interpretation of the return value.
It would be really great to turn down the dial on the abbreviations and
add some user-visible impact, as is best practice (some would say a
requirement) for fixes.
I've been following the PTP work in mlx5 a little bit but I have no idea
what a RQT is and what kind of issues to expect without this patch.
On Wed, 2021-09-08 at 09:39 -0700, Jakub Kicinski wrote:
On Tue, 7 Sep 2021 14:24:20 -0700 Saeed Mahameed wrote:
quoted
From: Aya Levin <redacted>
When activating the PTP-RQ, redirect the RQT from drop-RQ to PTP-
RQ.
Use mlx5e_channels_get_ptp_rqn to retrieve the rqn. This helper
returns
a boolean (not status), hence caller should consider return value 0
as a
fail. Change the caller interpretation of the return value.
It would be really great to turn down the dial on the abbreviations
and
add some user-visible impact, as is best practice (some would say a
requirement) for fixes.
Ack and agreed ! I will enforce this.
I've been following the PTP work in mlx5 a little bit but I have no
idea
what a RQT is and what kind of issues to expect without this patch.
RQT is a simple RQ Table; where we group rq numbers in one table object
so steering and RSS objects can point to a table of RQs.
To simplify driver code:
1. we use RQT objects also for single RQ destinations.
2. HW/FW do not allow destroying RQs when they are directly being
referenced by Steering rules. RQTs help keeping steering objects
pointing to a valid RQT object while driver is destroying RQs, while
re-configuring, we just swap the rq number in the RQT with the new
configuration RQs, or when device is deactivated (ifconfig down) we
just swap all RQ numbers in all RQTs with the "Drop RQ"