aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYishai Hadas <yishaih@mellanox.com>2018-07-23 15:25:11 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-07-24 14:03:56 -0600
commit6346f0bfa07b3a4ed55b8630cf20b6f43d277b51 (patch)
treefae5540c5600b0b5d88d9df30e22b379f58de099 /drivers
parentIB/mlx5: Support adding flow steering rule by raw description (diff)
downloadlinux-dev-6346f0bfa07b3a4ed55b8630cf20b6f43d277b51.tar.xz
linux-dev-6346f0bfa07b3a4ed55b8630cf20b6f43d277b51.zip
IB/mlx5: Add support for a flow table destination for driver flow steering
Add support to set a destination that is a flow table, this can come from the DEVX destination. Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mlx5/main.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 68d2801b79c6..11ed9416db48 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -3789,9 +3789,6 @@ mlx5_ib_raw_fs_rule_add(struct mlx5_ib_dev *dev,
if (fs_matcher->priority > MLX5_IB_FLOW_LAST_PRIO)
return ERR_PTR(-ENOMEM);
- if (dest_type != MLX5_FLOW_DESTINATION_TYPE_TIR)
- return ERR_PTR(-ENOTSUPP);
-
dst = kzalloc(sizeof(*dst), GFP_KERNEL);
if (!dst)
return ERR_PTR(-ENOMEM);
@@ -3805,8 +3802,14 @@ mlx5_ib_raw_fs_rule_add(struct mlx5_ib_dev *dev,
goto unlock;
}
- dst->type = dest_type;
- dst->tir_num = dest_id;
+ if (dest_type == MLX5_FLOW_DESTINATION_TYPE_TIR) {
+ dst->type = dest_type;
+ dst->tir_num = dest_id;
+ } else {
+ dst->type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM;
+ dst->ft_num = dest_id;
+ }
+
handler = _create_raw_flow_rule(dev, ft_prio, dst, fs_matcher, cmd_in,
inlen);