* [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get()
@ 2023-12-13 14:08 Dan Carpenter
2023-12-13 14:08 ` [PATCH net 2/2] net/mlx5e: Fix error codes in alloc_branch_attr() Dan Carpenter
2023-12-13 23:31 ` [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Saeed Mahameed
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-12-13 14:08 UTC (permalink / raw)
To: Paul Blakey
Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Oz Sholmo, Roi Dayan, netdev,
linux-rdma, kernel-janitors
Preserve the error code if esw_add_restore_rule() fails. Don't return
success.
Fixes: 6702782845a5 ("net/mlx5e: TC, Set CT miss to the specific ct action instance")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 5775699e1d3e..30932c9c9a8f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -5736,8 +5736,10 @@ int mlx5e_tc_action_miss_mapping_get(struct mlx5e_priv *priv, struct mlx5_flow_a
esw = priv->mdev->priv.eswitch;
attr->act_id_restore_rule = esw_add_restore_rule(esw, *act_miss_mapping);
- if (IS_ERR(attr->act_id_restore_rule))
+ if (IS_ERR(attr->act_id_restore_rule)) {
+ err = PTR_ERR(attr->act_id_restore_rule);
goto err_rule;
+ }
return 0;
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH net 2/2] net/mlx5e: Fix error codes in alloc_branch_attr()
2023-12-13 14:08 [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Dan Carpenter
@ 2023-12-13 14:08 ` Dan Carpenter
2023-12-13 23:31 ` [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Saeed Mahameed
1 sibling, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-12-13 14:08 UTC (permalink / raw)
To: Chris Mi
Cc: Saeed Mahameed, Leon Romanovsky, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Moshe Shemesh, Tariq Toukan,
Shay Drory, Jianbo Liu, netdev, linux-rdma, kernel-janitors
Set the error code if set_branch_dest_ft() fails.
Fixes: ccbe33003b10 ("net/mlx5e: TC, Don't offload post action rule if not supported")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index 85cdba226eac..5775699e1d3e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -3778,7 +3778,8 @@ alloc_branch_attr(struct mlx5e_tc_flow *flow,
break;
case FLOW_ACTION_ACCEPT:
case FLOW_ACTION_PIPE:
- if (set_branch_dest_ft(flow->priv, attr))
+ err = set_branch_dest_ft(flow->priv, attr);
+ if (err)
goto out_err;
break;
case FLOW_ACTION_JUMP:
@@ -3788,7 +3789,8 @@ alloc_branch_attr(struct mlx5e_tc_flow *flow,
goto out_err;
}
*jump_count = cond->extval;
- if (set_branch_dest_ft(flow->priv, attr))
+ err = set_branch_dest_ft(flow->priv, attr);
+ if (err)
goto out_err;
break;
default:
--
2.42.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get()
2023-12-13 14:08 [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Dan Carpenter
2023-12-13 14:08 ` [PATCH net 2/2] net/mlx5e: Fix error codes in alloc_branch_attr() Dan Carpenter
@ 2023-12-13 23:31 ` Saeed Mahameed
1 sibling, 0 replies; 3+ messages in thread
From: Saeed Mahameed @ 2023-12-13 23:31 UTC (permalink / raw)
To: Dan Carpenter
Cc: Paul Blakey, Saeed Mahameed, Leon Romanovsky, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Oz Sholmo, Roi Dayan,
netdev, linux-rdma, kernel-janitors
On 13 Dec 17:08, Dan Carpenter wrote:
>Preserve the error code if esw_add_restore_rule() fails. Don't return
>success.
>
>Fixes: 6702782845a5 ("net/mlx5e: TC, Set CT miss to the specific ct action instance")
>Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>---
LGTM, both patches applied to net-mlx5.
will send the PR shortly.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-13 23:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 14:08 [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Dan Carpenter
2023-12-13 14:08 ` [PATCH net 2/2] net/mlx5e: Fix error codes in alloc_branch_attr() Dan Carpenter
2023-12-13 23:31 ` [PATCH net 1/2] net/mlx5e: Fix error code in mlx5e_tc_action_miss_mapping_get() Saeed Mahameed
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox