|
|
6698ac |
commit 22a04b26a8c1428b87b3cc35fd256ee615172648
|
|
|
6698ac |
Author: Guy Levi <guyle@mellanox.com>
|
|
|
6698ac |
Date: Tue Oct 17 15:23:10 2017 +0300
|
|
|
6698ac |
|
|
|
6698ac |
mlx4: Add a report of RSS capabilities in ibv_query_device_ex
|
|
|
6698ac |
|
|
|
6698ac |
Report few extra RSS capabilities that were missed in previous patches.
|
|
|
6698ac |
|
|
|
6698ac |
Signed-off-by: Guy Levi <guyle@mellanox.com>
|
|
|
6698ac |
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
|
|
|
6698ac |
|
|
|
6698ac |
diff --git a/providers/mlx4/mlx4-abi.h b/providers/mlx4/mlx4-abi.h
|
|
|
6698ac |
index 4f2132c2..c4783d29 100644
|
|
|
6698ac |
--- a/providers/mlx4/mlx4-abi.h
|
|
|
6698ac |
+++ b/providers/mlx4/mlx4-abi.h
|
|
|
6698ac |
@@ -99,13 +99,19 @@ struct mlx4_resize_cq {
|
|
|
6698ac |
__u64 buf_addr;
|
|
|
6698ac |
};
|
|
|
6698ac |
|
|
|
6698ac |
+struct mlx4_rss_caps {
|
|
|
6698ac |
+ __u64 rx_hash_fields_mask; /* enum ibv_rx_hash_fields */
|
|
|
6698ac |
+ __u8 rx_hash_function; /* enum ibv_rx_hash_function_flags */
|
|
|
6698ac |
+ __u8 reserved[7];
|
|
|
6698ac |
+};
|
|
|
6698ac |
+
|
|
|
6698ac |
struct mlx4_query_device_ex_resp {
|
|
|
6698ac |
struct ibv_query_device_resp_ex ibv_resp;
|
|
|
6698ac |
__u32 comp_mask;
|
|
|
6698ac |
__u32 response_length;
|
|
|
6698ac |
__u64 hca_core_clock_offset;
|
|
|
6698ac |
__u32 max_inl_recv_sz;
|
|
|
6698ac |
- __u32 reserved;
|
|
|
6698ac |
+ struct mlx4_rss_caps rss_caps; /* vendor data channel */
|
|
|
6698ac |
};
|
|
|
6698ac |
|
|
|
6698ac |
struct mlx4_query_device_ex {
|
|
|
6698ac |
diff --git a/providers/mlx4/verbs.c b/providers/mlx4/verbs.c
|
|
|
6698ac |
index 8532882e..8a2773f9 100644
|
|
|
6698ac |
--- a/providers/mlx4/verbs.c
|
|
|
6698ac |
+++ b/providers/mlx4/verbs.c
|
|
|
6698ac |
@@ -87,6 +87,9 @@ int mlx4_query_device_ex(struct ibv_context *context,
|
|
|
6698ac |
if (err)
|
|
|
6698ac |
return err;
|
|
|
6698ac |
|
|
|
6698ac |
+ attr->rss_caps.rx_hash_fields_mask = resp.rss_caps.rx_hash_fields_mask;
|
|
|
6698ac |
+ attr->rss_caps.rx_hash_function = resp.rss_caps.rx_hash_function;
|
|
|
6698ac |
+
|
|
|
6698ac |
if (resp.comp_mask & MLX4_QUERY_DEV_RESP_MASK_CORE_CLOCK_OFFSET) {
|
|
|
6698ac |
mctx->core_clock.offset = resp.hca_core_clock_offset;
|
|
|
6698ac |
mctx->core_clock.offset_valid = 1;
|