Add support to work with a RSS QP by using an indirection table object upon QP creation. Other related QP verbs (e.g. modify/destroy/query) were updated as well for that QP mode. Notes: - The RX hash properties are supplied as driver private data. - The RSS QP port is used on the associated WQs in its indirection table. Applying different ports during WQ life time is not allowed. - The expected RSS QP flow is: create, modify(RST->INIT), modify(RST->RTR), destroy.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -95,6 +95,16 @@ struct mlx4_ib_create_srq_resp { · 94 unmodified lines | ||
| 95 | 95 | __u32 reserved; |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | +struct mlx4_ib_create_qp_rss { | |
| 99 | + __u64 rx_hash_fields_mask; | |
| 100 | + __u8 rx_hash_function; | |
| 101 | + __u8 rx_key_len; | |
| 102 | + __u8 reserved[6]; | |
| 103 | + __u8 rx_hash_key[40]; | |
| 104 | + __u32 comp_mask; | |
| 105 | + __u32 reserved1; | |
| 106 | +}; | |
| 107 | + | |
| 98 | 108 | struct mlx4_ib_create_qp { |
| 99 | 109 | __u64 buf_addr; |
| 100 | 110 | __u64 db_addr; |
| @@ -123,4 +133,27 @@ struct mlx4_ib_create_rwq_ind_tbl_resp { · 22 unmodified lines | ||
| 123 | 133 | __u32 response_length; |
| 124 | 134 | __u32 reserved; |
| 125 | 135 | }; |
| 136 | + | |
| 137 | +/* RX Hash function flags */ | |
| 138 | +enum mlx4_ib_rx_hash_function_flags { | |
| 139 | + MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0, | |
| 140 | +}; | |
| 141 | + | |
| 142 | +/* | |
| 143 | + * RX Hash flags, these flags allows to set which incoming packet's field should | |
| 144 | + * participates in RX Hash. Each flag represent certain packet's field, | |
| 145 | + * when the flag is set the field that is represented by the flag will | |
| 146 | + * participate in RX Hash calculation. | |
| 147 | + */ | |
| 148 | +enum mlx4_ib_rx_hash_fields { | |
| 149 | + MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0, | |
| 150 | + MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1, | |
| 151 | + MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2, | |
| 152 | + MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3, | |
| 153 | + MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4, | |
| 154 | + MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5, | |
| 155 | + MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6, | |
| 156 | + MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7 | |
| 157 | +}; | |
| 158 | + | |
| 126 | 159 | #endif /* MLX4_ABI_USER_H */ |