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.
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -36,6 +36,7 @@ · 35 unmodified lines | ||
| 36 | 36 | |
| 37 | 37 | #include <linux/types.h> |
| 38 | 38 | #include <linux/if_ether.h> /* For ETH_ALEN. */ |
| 39 | +#include <rdma/ib_user_ioctl_verbs.h> | |
| 39 | 40 | |
| 40 | 41 | enum { |
| 41 | 42 | MLX5_QP_FLAG_SIGNATURE = 1 << 0, |
| @@ -441,4 +442,27 @@ enum { · 399 unmodified lines | ||
| 441 | 442 | enum { |
| 442 | 443 | MLX5_IB_CLOCK_INFO_V1 = 0, |
| 443 | 444 | }; |
| 445 | + | |
| 446 | +struct mlx5_ib_flow_counters_desc { | |
| 447 | + __u32 description; | |
| 448 | + __u32 index; | |
| 449 | +}; | |
| 450 | + | |
| 451 | +struct mlx5_ib_flow_counters_data { | |
| 452 | + RDMA_UAPI_PTR(struct mlx5_ib_flow_counters_desc *, counters_data); | |
| 453 | + __u32 ncounters; | |
| 454 | + __u32 reserved; | |
| 455 | +}; | |
| 456 | + | |
| 457 | +struct mlx5_ib_create_flow { | |
| 458 | + __u32 ncounters_data; | |
| 459 | + __u32 reserved; | |
| 460 | + /* | |
| 461 | + * Following are counters data based on ncounters_data, each | |
| 462 | + * entry in the data[] should match a corresponding counter object | |
| 463 | + * that was pointed by a counters spec upon the flow creation | |
| 464 | + */ | |
| 465 | + struct mlx5_ib_flow_counters_data data[]; | |
| 466 | +}; | |
| 467 | + | |
| 444 | 468 | #endif /* MLX5_ABI_USER_H */ |