You've already forked linux-rockchip
mirror of
https://github.com/armbian/linux-rockchip.git
synced 2026-01-06 11:08:10 -08:00
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:
@@ -46,6 +46,7 @@
|
||||
|
||||
#include <linux/mlx4/device.h>
|
||||
#include <linux/mlx4/doorbell.h>
|
||||
#include <linux/mlx4/qp.h>
|
||||
|
||||
#define MLX4_IB_DRV_NAME "mlx4_ib"
|
||||
|
||||
@@ -299,6 +300,12 @@ struct mlx4_wqn_range {
|
||||
struct list_head list;
|
||||
};
|
||||
|
||||
struct mlx4_ib_rss {
|
||||
unsigned int base_qpn_tbl_sz;
|
||||
u8 flags;
|
||||
u8 rss_key[MLX4_EN_RSS_KEY_SIZE];
|
||||
};
|
||||
|
||||
struct mlx4_ib_qp {
|
||||
union {
|
||||
struct ib_qp ibqp;
|
||||
@@ -345,6 +352,7 @@ struct mlx4_ib_qp {
|
||||
struct mlx4_wqn_range *wqn_range;
|
||||
/* Number of RSS QP parents that uses this WQ */
|
||||
u32 rss_usecnt;
|
||||
struct mlx4_ib_rss *rss_ctx;
|
||||
};
|
||||
|
||||
struct mlx4_ib_srq {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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