summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTalat Batheesh <talatb@mellanox.com>2017-06-04 14:30:07 +0300
committerBen Hutchings <ben@decadent.org.uk>2017-08-26 02:14:50 +0100
commitd3d010b3f4a920ca76f4bc96b67a18dfc3e24b06 (patch)
treee0906bc8db6dc0de507d5df24845eac9a352a3b3 /include
parent14216e1b76cc041165baefa18bfa6af229f863b3 (diff)
net/mlx4: Fix the check in attaching steering rules
commit 6dc06c08bef1c746ff8da33dab677cfbacdcad32 upstream. 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> [bwh: Backported to 3.16: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mlx4/qp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index 7040dc98ff8b..469e4e47d6ea 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -429,6 +429,7 @@ struct mlx4_update_qp_params {
u8 smac_index;
};
+struct mlx4_qp *mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn);
int mlx4_update_qp(struct mlx4_dev *dev, struct mlx4_qp *qp,
enum mlx4_update_qp_attr attr,
struct mlx4_update_qp_params *params);