Skip to content

Commit

Permalink
IB/mlx4: Add support for RSS QP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guy Levi authored and dledford committed Jul 24, 2017
1 parent b8d46ca commit 3078f5f
Show file tree
Hide file tree
Showing 3 changed files with 472 additions and 22 deletions.
8 changes: 8 additions & 0 deletions drivers/infiniband/hw/mlx4/mlx4_ib.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit 3078f5f

Please sign in to comment.