diff options
author | Haggai Eran <haggaie@mellanox.com> | 2016-02-29 14:45:07 +0100 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-03-01 17:04:07 +0100 |
commit | 7722f47e71e58592a2ba4437d27c802ba1c64e08 (patch) | |
tree | 27123283835d44c1e647b080357daac5752eefaf /drivers/infiniband/hw/mlx5/gsi.c | |
parent | IB/mlx5: Create multiple transmission GSI QPs (diff) | |
download | linux-7722f47e71e58592a2ba4437d27c802ba1c64e08.tar.xz linux-7722f47e71e58592a2ba4437d27c802ba1c64e08.zip |
IB/mlx5: Create GSI transmission QPs when P_Key table is changed
Whenever the P_Key table is changed, we create the required GSI
transmission QPs on-demand.
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/gsi.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/gsi.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/gsi.c b/drivers/infiniband/hw/mlx5/gsi.c index 91bd20eb59b7..1648f539c836 100644 --- a/drivers/infiniband/hw/mlx5/gsi.c +++ b/drivers/infiniband/hw/mlx5/gsi.c @@ -341,3 +341,13 @@ int mlx5_ib_gsi_post_recv(struct ib_qp *qp, struct ib_recv_wr *wr, return ib_post_recv(gsi->rx_qp, wr, bad_wr); } + +void mlx5_ib_gsi_pkey_change(struct mlx5_ib_gsi_qp *gsi) +{ + if (!gsi) + return; + + mutex_lock(&gsi->mutex); + setup_qps(gsi); + mutex_unlock(&gsi->mutex); +} |