Subject: Re: [PATCH 3/3] RDMA/ionic: Support QP transport mode selection in create and modify

From: Leon Romanovsky <[email-masked]>
Date: Mon, 11 May 2026 15:50:28 +0300

On Thu, Apr 30, 2026 at 06:09:31PM +0530, Abhijit Gangurde wrote:
> Allow userspace to specify the QP transport mode and number of
> reorder completion queue paths during QP creation and modification.
> 
> Extend ionic_qp_req with transport_mode, num_rcq_paths, and
> ionic_flags fields. The transport mode selects the firmware QP type,
> ionic_flags are forwarded in the upper bits of priv_flags during
> QP creation, and num_rcq_paths is passed to firmware during QP
> modify.
> 
> Co-developed-by: Allen Hubbe <[email-masked]>
> Signed-off-by: Allen Hubbe <[email-masked]>
> Signed-off-by: Abhijit Gangurde <[email-masked]>
> ---
>  .../infiniband/hw/ionic/ionic_controlpath.c    | 16 +++++++++++-----
>  drivers/infiniband/hw/ionic/ionic_fw.h         | 18 +++++++++++++++---
>  drivers/infiniband/hw/ionic/ionic_ibdev.h      |  1 +
>  include/uapi/rdma/ionic-abi.h                  |  5 ++++-
>  4 files changed, 31 insertions(+), 9 deletions(-)

<...>

> +enum ionic_qp_transport_mode {
> +	IONIC_QPT_TRANSPORT_ROCE_V2 = BIT(0),
> +	IONIC_QPT_TRANSPORT_MRC = BIT(1),
> +};
> +
>  /* admin queue qp type */
>  enum ionic_qp_type {
>  	IONIC_QPT_RC,
> @@ -228,16 +235,21 @@ enum ionic_qp_type {
>  	IONIC_QPT_XRC_INI,
>  	IONIC_QPT_XRC_TGT,
>  	IONIC_QPT_XRC_SRQ,
> +	IONIC_QPT_MRC,
>  };
>  
> -static inline int to_ionic_qp_type(enum ib_qp_type type)
> +static inline int to_ionic_qp_type(enum ib_qp_type type,
> +				   enum ionic_qp_transport_mode tm)
>  {
>  	switch (type) {
>  	case IB_QPT_GSI:
>  	case IB_QPT_UD:
>  		return IONIC_QPT_UD;
>  	case IB_QPT_RC:
> -		return IONIC_QPT_RC;
> +		if (tm == IONIC_QPT_TRANSPORT_MRC)
> +			return IONIC_QPT_MRC;
> +		else
> +			return IONIC_QPT_RC;

We have historically treated vendor-specific QP types as special cases and
routed them through IB_QPT_DRIVER.

IB_QPT_RC represents a standard RC QP and is expected to follow the
specification.

Thanks