@@ -141,10 +141,7 @@ struct ib_uverbs_cq_moderation_caps {
*/
#define IB_USER_VERBS_CMD_COMMAND_MASK 0xff
-#define IB_USER_VERBS_CMD_FLAGS_MASK 0xff000000u
-#define IB_USER_VERBS_CMD_FLAGS_SHIFT 24
-
-#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80
+#define IB_USER_VERBS_CMD_FLAG_EXTENDED 0x80000000u
struct ib_uverbs_cmd_hdr {
__u32 command;
@@ -156,4 +156,18 @@ enum mlx4_ib_rx_hash_fields {
MLX4_IB_RX_HASH_INNER = 1ULL << 31,
};
+struct mlx4_ib_rss_caps {
+ __u64 rx_hash_fields_mask; /* enum mlx4_ib_rx_hash_fields */
+ __u8 rx_hash_function; /* enum mlx4_ib_rx_hash_function_flags */
+ __u8 reserved[7];
+};
+
+struct mlx4_uverbs_ex_query_device_resp {
+ __u32 comp_mask;
+ __u32 response_length;
+ __u64 hca_core_clock_offset;
+ __u32 max_inl_recv_sz;
+ struct mlx4_ib_rss_caps rss_caps;
+};
+
#endif /* MLX4_ABI_USER_H */
@@ -65,7 +65,7 @@ struct ib_uverbs_attr {
__u16 len; /* only for pointers */
__u16 flags; /* combination of UVERBS_ATTR_F_XXXX */
__u16 reserved;
- __u64 data; /* ptr to command, inline data or idr/fd */
+ __aligned_u64 data; /* ptr to command, inline data or idr/fd */
};
struct ib_uverbs_ioctl_hdr {
@@ -73,7 +73,7 @@ struct ib_uverbs_ioctl_hdr {
__u16 object_id;
__u16 method_id;
__u16 num_attrs;
- __u64 reserved;
+ __aligned_u64 reserved;
struct ib_uverbs_attr attrs[0];
};
@@ -242,9 +242,7 @@ int _execute_write_raw_ex(uint32_t cmdnum, struct ibv_context *ctx,
size_t resp_bytes =
(hdr->hdr.out_words + hdr->ex_hdr.provider_out_words) * 8;
- hdr->hdr.command = (IB_USER_VERBS_CMD_FLAG_EXTENDED
- << IB_USER_VERBS_CMD_FLAGS_SHIFT) |
- cmdnum;
+ hdr->hdr.command = IB_USER_VERBS_CMD_FLAG_EXTENDED | cmdnum;
hdr->ex_hdr.cmd_hdr_reserved = 0;
hdr->ex_hdr.response = ioctl_ptr_to_u64(resp);
@@ -81,9 +81,7 @@ struct verbs_ex_private {
static inline uint32_t _cmd_ex(uint32_t cmd)
{
- return (IB_USER_VERBS_CMD_FLAG_EXTENDED
- << IB_USER_VERBS_CMD_FLAGS_SHIFT) |
- cmd;
+ return IB_USER_VERBS_CMD_FLAG_EXTENDED | cmd;
}
#define IBV_INIT_CMD_RESP_EX_V(cmd, cmd_size, size, opcode, out, resp_size,\