Skip to content

Commit

Permalink
RDMA/mlx5: Fix flow steering egress flow
Browse files Browse the repository at this point in the history
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: de8bdb4 ("RDMA/mlx5: Drop crypto flow steering API")
Link: https://lore.kernel.org/r/11b31c1f85bc8c8add385529aa3f307c3b383a11.1649842371.git.leonro@nvidia.com
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
  • Loading branch information
Leon Romanovsky authored and Jason Gunthorpe committed Apr 19, 2022
1 parent 2f917af commit b5a93e7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/infiniband/hw/mlx5/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b5a93e7

Please sign in to comment.