RDMA/mlx5: Allow creating a matcher for a NIC TX flow table
authorMark Bloch <markb@mellanox.com>
Thu, 6 Sep 2018 14:27:08 +0000 (17:27 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Sep 2018 15:28:07 +0000 (09:28 -0600)
commita7ee18bdee837e4703f01588993504b72074ffc6
treec8d433a39ede94e1cacf91e9a29c953ecb67030d
parentb47fd4ffe2d6422a986f19d47563d72c79ebbc21
RDMA/mlx5: Allow creating a matcher for a NIC TX flow table

Currently a matcher can only be created and attached to a NIC RX flow
table. Extend it to allow it on NIC TX flow tables as well.

In order to achieve that, we:

1) Expose a new attribute: MLX5_IB_ATTR_FLOW_MATCHER_FLOW_FLAGS.
   enum ib_flow_flags is used as valid flags. Only
   IB_FLOW_ATTR_FLAGS_EGRESS is supported.

2) Remove the requirement to have a DEVX or QP destination when creating a
   flow. A flow added to NIC TX flow table will forward the packet outside
   of the vport (Wire or E-Switch in the SR-iOV case).

Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/flow.c
drivers/infiniband/hw/mlx5/main.c
include/uapi/rdma/mlx5_user_ioctl_cmds.h