All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-next] RDMA/mlx5: Fix flow steering egress flow
@ 2022-04-13  9:33 Leon Romanovsky
  2022-04-19 20:53 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2022-04-13  9:33 UTC (permalink / raw)
  To: Jason Gunthorpe; +Cc: Leon Romanovsky, Dan Carpenter, linux-rdma, Raed Salem

From: Leon Romanovsky <leonro@nvidia.com>

The commit mentioned in Fixes line removed the function that was
called to check validity of esp_aes_gcm attribute. Sadly, that
is_valid_esp_aes_gcm() returned success even for specs without
esp_aes_gcm at all.

So the right fix will be to remove whole if () and such fix
the following error observed in smatch too.

   drivers/infiniband/hw/mlx5/fs.c:1126 _create_flow_rule()
   warn: duplicate check 'is_egress' (previous on line 1098)

Fixes: de8bdb476908 ("RDMA/mlx5: Drop crypto flow steering API")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/mlx5/fs.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/fs.c b/drivers/infiniband/hw/mlx5/fs.c
index 9c2886bc72cb..39ffb363ba0c 100644
--- a/drivers/infiniband/hw/mlx5/fs.c
+++ b/drivers/infiniband/hw/mlx5/fs.c
@@ -1095,11 +1095,6 @@ static struct mlx5_ib_flow_handler *_create_flow_rule(struct mlx5_ib_dev *dev,
 
 	spec->match_criteria_enable = get_match_criteria_enable(spec->match_criteria);
 
-	if (is_egress) {
-		err = -EINVAL;
-		goto free;
-	}
-
 	if (flow_act.action & MLX5_FLOW_CONTEXT_ACTION_COUNT) {
 		struct mlx5_ib_mcounters *mcounters;
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH rdma-next] RDMA/mlx5: Fix flow steering egress flow
  2022-04-13  9:33 [PATCH rdma-next] RDMA/mlx5: Fix flow steering egress flow Leon Romanovsky
@ 2022-04-19 20:53 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2022-04-19 20:53 UTC (permalink / raw)
  To: Leon Romanovsky; +Cc: Leon Romanovsky, Dan Carpenter, linux-rdma, Raed Salem

On Wed, Apr 13, 2022 at 12:33:39PM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> 
> The commit mentioned in Fixes line removed the function that was
> called to check validity of esp_aes_gcm attribute. Sadly, that
> is_valid_esp_aes_gcm() returned success even for specs without
> esp_aes_gcm at all.
> 
> So the right fix will be to remove whole if () and such fix
> the following error observed in smatch too.
> 
>    drivers/infiniband/hw/mlx5/fs.c:1126 _create_flow_rule()
>    warn: duplicate check 'is_egress' (previous on line 1098)
> 
> Fixes: de8bdb476908 ("RDMA/mlx5: Drop crypto flow steering API")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/hw/mlx5/fs.c | 5 -----
>  1 file changed, 5 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-19 20:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13  9:33 [PATCH rdma-next] RDMA/mlx5: Fix flow steering egress flow Leon Romanovsky
2022-04-19 20:53 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.