All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shiraz Saleem <shiraz.saleem@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next 3/3] RDMA/irdma: Set protocol based on PF rdma_mode flag
Date: Mon, 18 Oct 2021 18:16:03 -0500	[thread overview]
Message-ID: <20211018231603.1690-4-shiraz.saleem@intel.com> (raw)
In-Reply-To: <20211018231603.1690-1-shiraz.saleem@intel.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@intel.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 51a4135..3fda7b7 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;
-- 
1.8.3.1


  parent reply	other threads:[~2021-10-18 23:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-18 23:16 [Intel-wired-lan] [net-next 0/3] Configure iWARP or RoCEv2 protocol support for E800 devices Shiraz Saleem
2021-10-18 23:16 ` [Intel-wired-lan] [net-next 1/3] devlink: Add 'enable_iwarp' generic device param Shiraz Saleem
2021-11-22  9:58   ` Kaliszczuk, Leszek
2021-10-18 23:16 ` [Intel-wired-lan] [net-next 2/3] net/ice: Add support for enable_iwarp and enable_roce devlink param Shiraz Saleem
2021-11-22 10:10   ` Kaliszczuk, Leszek
2021-10-18 23:16 ` Shiraz Saleem [this message]
2021-11-22 10:11   ` [Intel-wired-lan] [net-next 3/3] RDMA/irdma: Set protocol based on PF rdma_mode flag Kaliszczuk, Leszek
  -- strict thread matches above, loose matches on Subject: below --
2021-10-13 16:22 [Intel-wired-lan] [net-next 0/3] Configure iWARP or RoCEv2 protocol support for E800 devices Shiraz Saleem
2021-10-13 16:22 ` [Intel-wired-lan] [net-next 3/3] RDMA/irdma: Set protocol based on PF rdma_mode flag Shiraz Saleem

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211018231603.1690-4-shiraz.saleem@intel.com \
    --to=shiraz.saleem@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.