diff options
author | Mark Bloch <markb@mellanox.com> | 2018-09-02 11:51:32 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-09-11 17:28:06 +0200 |
commit | b1085be3f468a58d4a43f3ea878ecb6c10910552 (patch) | |
tree | 4e0cc63b798b0d1098f96e778d94df94f7bce928 /drivers/infiniband/hw/mlx5/main.c | |
parent | RDMA/mlx5: Add NIC TX steering support (diff) | |
download | linux-b1085be3f468a58d4a43f3ea878ecb6c10910552.tar.xz linux-b1085be3f468a58d4a43f3ea878ecb6c10910552.zip |
RDMA/mlx5: Enable attaching modify header to steering flows
When creating a flow steering rule, allow the user to attach a modify
header action.
Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index ed323db1b6d2..8a4cdba6be8c 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -2474,6 +2474,14 @@ static int parse_flow_flow_action(const union ib_flow_spec *ib_spec, MLX5_FLOW_CONTEXT_ACTION_ENCRYPT : MLX5_FLOW_CONTEXT_ACTION_DECRYPT; return 0; + case IB_FLOW_ACTION_UNSPECIFIED: + if (maction->flow_action_raw.sub_type == + MLX5_IB_FLOW_ACTION_MODIFY_HEADER) { + action->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR; + action->modify_id = maction->flow_action_raw.action_id; + return 0; + } + /* fall through */ default: return -EOPNOTSUPP; } |