* [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow
@ 2025-07-02 10:24 Leon Romanovsky
2025-07-02 14:41 ` Simon Horman
2025-07-02 18:03 ` Leon Romanovsky
0 siblings, 2 replies; 4+ messages in thread
From: Leon Romanovsky @ 2025-07-02 10:24 UTC (permalink / raw)
To: Jason Gunthorpe
Cc: Patrisious Haddad, Andrew Lunn, Eric Dumazet, Jakub Kicinski,
linux-rdma, netdev, Paolo Abeni, Saeed Mahameed, Tariq Toukan
From: Patrisious Haddad <phaddad@nvidia.com>
Failing during the initialization of root_namespace didn't cleanup
the priorities of the namespace on which the failure occurred.
Properly cleanup said priorities on failure.
Fixes: e6746b0c7423 ("net/mlx5: fs, add multiple prios to RDMA TRANSPORT steering domain")
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
.../net/ethernet/mellanox/mlx5/core/fs_core.c | 22 +++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
index 7f5608081ea0..424a6d168c53 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
@@ -3247,6 +3247,7 @@ init_rdma_transport_rx_root_ns_one(struct mlx5_flow_steering *steering,
{
struct mlx5_flow_root_namespace *root_ns;
struct fs_prio *prio;
+ int ret;
int i;
steering->rdma_transport_rx_root_ns[vport_idx] =
@@ -3258,11 +3259,17 @@ init_rdma_transport_rx_root_ns_one(struct mlx5_flow_steering *steering,
for (i = 0; i < MLX5_RDMA_TRANSPORT_BYPASS_PRIO; i++) {
prio = fs_create_prio(&root_ns->ns, i, 1);
- if (IS_ERR(prio))
- return PTR_ERR(prio);
+ if (IS_ERR(prio)) {
+ ret = PTR_ERR(prio);
+ goto err;
+ }
}
set_prio_attrs(root_ns);
return 0;
+
+err:
+ cleanup_root_ns(root_ns);
+ return ret;
}
static int
@@ -3271,6 +3278,7 @@ init_rdma_transport_tx_root_ns_one(struct mlx5_flow_steering *steering,
{
struct mlx5_flow_root_namespace *root_ns;
struct fs_prio *prio;
+ int ret;
int i;
steering->rdma_transport_tx_root_ns[vport_idx] =
@@ -3282,11 +3290,17 @@ init_rdma_transport_tx_root_ns_one(struct mlx5_flow_steering *steering,
for (i = 0; i < MLX5_RDMA_TRANSPORT_BYPASS_PRIO; i++) {
prio = fs_create_prio(&root_ns->ns, i, 1);
- if (IS_ERR(prio))
- return PTR_ERR(prio);
+ if (IS_ERR(prio)) {
+ ret = PTR_ERR(prio);
+ goto err;
+ }
}
set_prio_attrs(root_ns);
return 0;
+
+err:
+ cleanup_root_ns(root_ns);
+ return ret;
}
static int init_rdma_transport_rx_root_ns(struct mlx5_flow_steering *steering)
--
2.50.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow
2025-07-02 10:24 [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow Leon Romanovsky
@ 2025-07-02 14:41 ` Simon Horman
2025-07-02 18:02 ` Leon Romanovsky
2025-07-02 18:03 ` Leon Romanovsky
1 sibling, 1 reply; 4+ messages in thread
From: Simon Horman @ 2025-07-02 14:41 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Jason Gunthorpe, Patrisious Haddad, Andrew Lunn, Eric Dumazet,
Jakub Kicinski, linux-rdma, netdev, Paolo Abeni, Saeed Mahameed,
Tariq Toukan
On Wed, Jul 02, 2025 at 01:24:04PM +0300, Leon Romanovsky wrote:
> From: Patrisious Haddad <phaddad@nvidia.com>
>
> Failing during the initialization of root_namespace didn't cleanup
> the priorities of the namespace on which the failure occurred.
>
> Properly cleanup said priorities on failure.
>
> Fixes: e6746b0c7423 ("net/mlx5: fs, add multiple prios to RDMA TRANSPORT steering domain")
Hi Leon and Patrisious,
Maybe there has been a rebase, there is something weird on my side, or for
some reason it doesn't matter. But I see a different hash in mlx5-next [1].
Fixes: 52931f55159e ("net/mlx5: fs, add multiple prios to RDMA TRANSPORT steering domain")
[1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-next
> Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Otherwise, LGTM.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow
2025-07-02 14:41 ` Simon Horman
@ 2025-07-02 18:02 ` Leon Romanovsky
0 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2025-07-02 18:02 UTC (permalink / raw)
To: Simon Horman
Cc: Jason Gunthorpe, Patrisious Haddad, Andrew Lunn, Eric Dumazet,
Jakub Kicinski, linux-rdma, netdev, Paolo Abeni, Saeed Mahameed,
Tariq Toukan
On Wed, Jul 02, 2025 at 03:41:06PM +0100, Simon Horman wrote:
> On Wed, Jul 02, 2025 at 01:24:04PM +0300, Leon Romanovsky wrote:
> > From: Patrisious Haddad <phaddad@nvidia.com>
> >
> > Failing during the initialization of root_namespace didn't cleanup
> > the priorities of the namespace on which the failure occurred.
> >
> > Properly cleanup said priorities on failure.
> >
> > Fixes: e6746b0c7423 ("net/mlx5: fs, add multiple prios to RDMA TRANSPORT steering domain")
>
> Hi Leon and Patrisious,
>
> Maybe there has been a rebase, there is something weird on my side, or for
> some reason it doesn't matter. But I see a different hash in mlx5-next [1].
>
> Fixes: 52931f55159e ("net/mlx5: fs, add multiple prios to RDMA TRANSPORT steering domain")
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/log/?h=mlx5-next
>
> > Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
>
> Otherwise, LGTM.
>
> Reviewed-by: Simon Horman <horms@kernel.org>
Thanks a lot, you are right about Fixes lines, I fixed it locally when
applied the patch.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow
2025-07-02 10:24 [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow Leon Romanovsky
2025-07-02 14:41 ` Simon Horman
@ 2025-07-02 18:03 ` Leon Romanovsky
1 sibling, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2025-07-02 18:03 UTC (permalink / raw)
To: Jason Gunthorpe, Leon Romanovsky
Cc: Patrisious Haddad, Andrew Lunn, Eric Dumazet, Jakub Kicinski,
linux-rdma, netdev, Paolo Abeni, Saeed Mahameed, Tariq Toukan
On Wed, 02 Jul 2025 13:24:04 +0300, Leon Romanovsky wrote:
> Failing during the initialization of root_namespace didn't cleanup
> the priorities of the namespace on which the failure occurred.
>
> Properly cleanup said priorities on failure.
>
>
Applied, thanks!
[1/1] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow
https://git.kernel.org/rdma/rdma/c/8366561fd6c641
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-02 18:03 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 10:24 [PATCH mlx5-next] net/mlx5: fs, fix RDMA TRANSPORT init cleanup flow Leon Romanovsky
2025-07-02 14:41 ` Simon Horman
2025-07-02 18:02 ` Leon Romanovsky
2025-07-02 18:03 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).