aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/rdma
diff options
context:
space:
mode:
authorRaed Salem <raeds@mellanox.com>2018-05-31 16:43:39 +0300
committerLeon Romanovsky <leonro@mellanox.com>2018-06-02 07:35:32 +0300
commit3b3233fbf02ee4c5de4d635ca6c4f2566d9716df (patch)
treec3ddeb7941981e4f1029110cdee3ff63946e0f45 /include/uapi/rdma
parentIB/mlx5: Add counters create and destroy support (diff)
downloadlinux-dev-3b3233fbf02ee4c5de4d635ca6c4f2566d9716df.tar.xz
linux-dev-3b3233fbf02ee4c5de4d635ca6c4f2566d9716df.zip
IB/mlx5: Add flow counters binding support
Associates a counters with a flow when IB_FLOW_SPEC_ACTION_COUNT is part of the flow specifications. The counters user space placements of location and description (index, description) pairs are passed as private data of the counters flow specification. Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Raed Salem <raeds@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/uapi/rdma')
-rw-r--r--include/uapi/rdma/mlx5-abi.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/uapi/rdma/mlx5-abi.h b/include/uapi/rdma/mlx5-abi.h
index cb4a02c4a1ce..ab71e939eb78 100644
--- a/include/uapi/rdma/mlx5-abi.h
+++ b/include/uapi/rdma/mlx5-abi.h
@@ -36,6 +36,7 @@
#include <linux/types.h>
#include <linux/if_ether.h> /* For ETH_ALEN. */
+#include <rdma/ib_user_ioctl_verbs.h>
enum {
MLX5_QP_FLAG_SIGNATURE = 1 << 0,
@@ -441,4 +442,27 @@ enum {
enum {
MLX5_IB_CLOCK_INFO_V1 = 0,
};
+
+struct mlx5_ib_flow_counters_desc {
+ __u32 description;
+ __u32 index;
+};
+
+struct mlx5_ib_flow_counters_data {
+ RDMA_UAPI_PTR(struct mlx5_ib_flow_counters_desc *, counters_data);
+ __u32 ncounters;
+ __u32 reserved;
+};
+
+struct mlx5_ib_create_flow {
+ __u32 ncounters_data;
+ __u32 reserved;
+ /*
+ * Following are counters data based on ncounters_data, each
+ * entry in the data[] should match a corresponding counter object
+ * that was pointed by a counters spec upon the flow creation
+ */
+ struct mlx5_ib_flow_counters_data data[];
+};
+
#endif /* MLX5_ABI_USER_H */