diff options
author | Talat Batheesh <talatb@mellanox.com> | 2017-06-04 14:30:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-05 06:10:05 +0300 |
commit | 6dc06c08bef1c746ff8da33dab677cfbacdcad32 (patch) | |
tree | b5a2e18d98948d219041402de5a78e35d829f93d /include/linux/mlx4 | |
parent | b699d0035836f6712917a41e7ae58d84359b8ff9 (diff) | |
download | linux-6dc06c08bef1c746ff8da33dab677cfbacdcad32.tar.xz |
net/mlx4: Fix the check in attaching steering rules
Our previous patch (cited below) introduced a regression
for RAW Eth QPs.
Fix it by checking if the QP number provided by user-space
exists, hence allowing steering rules to be added for valid
QPs only.
Fixes: 89c557687a32 ("net/mlx4_en: Avoid adding steering rules with invalid ring")
Reported-by: Or Gerlitz <gerlitz.or@gmail.com>
Signed-off-by: Talat Batheesh <talatb@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/qp.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h index b4ee8f62ce8d..8e2828d48d7f 100644 --- a/include/linux/mlx4/qp.h +++ b/include/linux/mlx4/qp.h @@ -470,6 +470,7 @@ struct mlx4_update_qp_params { u16 rate_val; }; +struct mlx4_qp *mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn); int mlx4_update_qp(struct mlx4_dev *dev, u32 qpn, enum mlx4_update_qp_attr attr, struct mlx4_update_qp_params *params); |