[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211122211119.279885-4-anthony.l.nguyen@intel.com>
Date: Mon, 22 Nov 2021 13:11:19 -0800
From: Tony Nguyen <anthony.l.nguyen@...el.com>
To: davem@...emloft.net, kuba@...nel.org
Cc: Shiraz Saleem <shiraz.saleem@...el.com>, netdev@...r.kernel.org,
anthony.l.nguyen@...el.com, linux-rdma@...r.kernel.org,
mustafa.ismail@...el.com, jacob.e.keller@...el.com,
parav@...dia.com, jiri@...dia.com,
Leszek Kaliszczuk <leszek.kaliszczuk@...el.com>
Subject: [PATCH net-next 3/3] RDMA/irdma: Set protocol based on PF rdma_mode flag
From: Shiraz Saleem <shiraz.saleem@...el.com>
Set the RDMA protocol to use at driver bind time based on the ice PF's
rdma_mode flag.
Signed-off-by: Shiraz Saleem <shiraz.saleem@...el.com>
Tested-by: Leszek Kaliszczuk <leszek.kaliszczuk@...el.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@...el.com>
---
drivers/infiniband/hw/irdma/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/irdma/main.c b/drivers/infiniband/hw/irdma/main.c
index 51a41359e0b4..3fda7b78a9af 100644
--- a/drivers/infiniband/hw/irdma/main.c
+++ b/drivers/infiniband/hw/irdma/main.c
@@ -228,7 +228,8 @@ static void irdma_fill_device_info(struct irdma_device *iwdev, struct ice_pf *pf
rf->msix_count = pf->num_rdma_msix;
rf->msix_entries = &pf->msix_entries[pf->rdma_base_vector];
rf->default_vsi.vsi_idx = vsi->vsi_num;
- rf->protocol_used = IRDMA_ROCE_PROTOCOL_ONLY;
+ rf->protocol_used = pf->rdma_mode & IIDC_RDMA_PROTOCOL_ROCEV2 ?
+ IRDMA_ROCE_PROTOCOL_ONLY : IRDMA_IWARP_PROTOCOL_ONLY;
rf->rdma_ver = IRDMA_GEN_2;
rf->rsrc_profile = IRDMA_HMC_PROFILE_DEFAULT;
rf->rst_to = IRDMA_RST_TIMEOUT_HZ;
--
2.31.1
Powered by blists - more mailing lists