IB/mlx4: Add support for RSS QP
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. Signed-off-by: Guy Levi <guyle@mellanox.com> Reviewed-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -95,6 +95,16 @@ struct mlx4_ib_create_srq_resp {
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
struct mlx4_ib_create_qp_rss {
|
||||
__u64 rx_hash_fields_mask;
|
||||
__u8 rx_hash_function;
|
||||
__u8 rx_key_len;
|
||||
__u8 reserved[6];
|
||||
__u8 rx_hash_key[40];
|
||||
__u32 comp_mask;
|
||||
__u32 reserved1;
|
||||
};
|
||||
|
||||
struct mlx4_ib_create_qp {
|
||||
__u64 buf_addr;
|
||||
__u64 db_addr;
|
||||
@@ -123,4 +133,27 @@ struct mlx4_ib_create_rwq_ind_tbl_resp {
|
||||
__u32 response_length;
|
||||
__u32 reserved;
|
||||
};
|
||||
|
||||
/* RX Hash function flags */
|
||||
enum mlx4_ib_rx_hash_function_flags {
|
||||
MLX4_IB_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
|
||||
};
|
||||
|
||||
/*
|
||||
* RX Hash flags, these flags allows to set which incoming packet's field should
|
||||
* participates in RX Hash. Each flag represent certain packet's field,
|
||||
* when the flag is set the field that is represented by the flag will
|
||||
* participate in RX Hash calculation.
|
||||
*/
|
||||
enum mlx4_ib_rx_hash_fields {
|
||||
MLX4_IB_RX_HASH_SRC_IPV4 = 1 << 0,
|
||||
MLX4_IB_RX_HASH_DST_IPV4 = 1 << 1,
|
||||
MLX4_IB_RX_HASH_SRC_IPV6 = 1 << 2,
|
||||
MLX4_IB_RX_HASH_DST_IPV6 = 1 << 3,
|
||||
MLX4_IB_RX_HASH_SRC_PORT_TCP = 1 << 4,
|
||||
MLX4_IB_RX_HASH_DST_PORT_TCP = 1 << 5,
|
||||
MLX4_IB_RX_HASH_SRC_PORT_UDP = 1 << 6,
|
||||
MLX4_IB_RX_HASH_DST_PORT_UDP = 1 << 7
|
||||
};
|
||||
|
||||
#endif /* MLX4_ABI_USER_H */
|
||||
|
||||
Reference in New Issue
Block a user