public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH v4 4/7] libibverbs: Add support for XRC QPs
Date: Sun, 17 Mar 2013 15:41:52 +0200	[thread overview]
Message-ID: <5145C820.9090801@mellanox.com> (raw)
In-Reply-To: <1363394326-908-4-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

On 16/03/2013 02:38, sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org wrote:
>   
> diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
> index d7dfcd3..f321866 100644
> --- a/include/infiniband/verbs.h
> +++ b/include/infiniband/verbs.h
> @@ -475,6 +478,26 @@ struct ibv_qp_init_attr {
>   	int			sq_sig_all;
>   };
>   
> +enum ibv_qp_init_attr_mask {
> +	IBV_QP_INIT_ATTR_PD		= 1 << 0,
> +	IBV_QP_INIT_ATTR_XRCD		= 1 << 1,
> +	IBV_QP_INIT_ATTR_RESERVED	= 1 << 2
> +};
> +
> +struct ibv_qp_init_attr_ex {
> +	void		       *qp_context;
> +	struct ibv_cq	       *send_cq;
> +	struct ibv_cq	       *recv_cq;
> +	struct ibv_srq	       *srq;
> +	struct ibv_qp_cap	cap;
> +	enum ibv_qp_type	qp_type;
> +	int			sq_sig_all;
> +
> +	uint32_t		comp_mask;
> +	struct ibv_pd	       *pd;
> +	struct ibv_xrcd	       *xrcd;
> +};
> +
>   enum ibv_qp_attr_mask {
>   	IBV_QP_STATE			= 1 << 	0,
>   	IBV_QP_CUR_STATE		= 1 << 	1,
> @@ -590,6 +613,11 @@ struct ibv_send_wr {
>   			uint32_t	remote_qpn;
>   			uint32_t	remote_qkey;
>   		} ud;
> +		struct {
> +			uint64_t	reserved[3];
> +			uint32_t	reserved2;
> +			uint32_t	remote_srqn;
> +		} xrc;
>   	} wr;
>   };

these added reserved fields ofcourse don't enlarge the union size, 
correct? so why have it, maybe you
want to make sure no one will srink the union size in the future?

>   
> @@ -771,11 +799,14 @@ struct ibv_context {
>   enum verbs_context_mask {
>   	VERBS_CONTEXT_XRCD	= 1 << 0,
>   	VERBS_CONTEXT_SRQ	= 1 << 1,
> -	VERBS_CONTEXT_RESERVED	= 1 << 2
> +	VERBS_CONTEXT_QP	= 1 << 2,
> +	VERBS_CONTEXT_RESERVED	= 1 << 3
>   };
>   
>   struct verbs_context {
>   	/*  "grows up" - new fields go here */
> +	struct ibv_qp *		(*create_qp_ex)(struct ibv_context *context,
> +						struct ibv_qp_init_attr_ex *qp_init_attr_ex);
>   	

I easily think on 3-4 more use cases for a create_qp extended verb that 
allows the app to
specify QP creation flags e.g in the same manner we have them in the 
kernel, for example:

1. suport blocking of multicast self-loopback (kernel 
IB_QP_CREATE_BLOCK_MULTICAST_LOOPBACK)
2. support TCP segementation (kernel IB_QP_CREATE_IPOIB_UD_LSO)
3. support some HPC optimizations whose patches are now under the works
4. etc more

Can we re-define this verb such that it can serve for both XRC QPs and 
non-XRC QPs for which creation flags are desired?
maybe add creation flags and IBV_QP_CREATE_XRC as a value that tells to 
create XRC QP, and we can add other flags on top of.

Or.


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-03-17 13:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28 22:53 [PATCH v3 1/7] libibverbs: Infrastructure to support verbs extensions Hefty, Sean
     [not found] ` <1828884A29C6694DAF28B7E6B8A8237346A981A0-Q3cL8pyY+6ukrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-09-30 21:21   ` Jason Gunthorpe
     [not found]     ` <20120930212132.GB26575-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-10-01 16:20       ` Hefty, Sean
     [not found]         ` <1828884A29C6694DAF28B7E6B8A8237346A98558-Q3cL8pyY+6ukrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2012-10-01 16:37           ` Jason Gunthorpe
     [not found]             ` <20121001163735.GE31620-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2012-10-01 16:57               ` Hefty, Sean
2012-10-04  5:55   ` Or Gerlitz
2013-03-16  0:38   ` [PATCH v4 1/7] " sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-03-16  0:38   ` [PATCH v4 2/7] libibverbs: Introduce XRC domains sean.hefty-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1363394326-908-2-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-03-17 13:47       ` Or Gerlitz
     [not found]         ` <5145C966.2010801-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-03-18 14:20           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A823736F365D5B-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-03-18 15:05               ` Christoph Lameter
2013-03-16  0:38   ` [PATCH v4 3/7] livibverbs: Add support for XRC SRQs sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-03-16  0:38   ` [PATCH v4 4/7] libibverbs: Add support for XRC QPs sean.hefty-ral2JQCrhuEAvxtiuMwx3w
     [not found]     ` <1363394326-908-4-git-send-email-sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2013-03-17 13:41       ` Or Gerlitz [this message]
     [not found]         ` <5145C820.9090801-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2013-03-18 14:38           ` Hefty, Sean
     [not found]             ` <1828884A29C6694DAF28B7E6B8A823736F365DA2-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-03-18 17:52               ` Or Gerlitz
     [not found]                 ` <CAJZOPZ+-korcbr=7kyraXdRZeH8hE1JdBLBRcykvqRJqNSGeQQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-03-18 18:01                   ` Hefty, Sean
     [not found]                     ` <1828884A29C6694DAF28B7E6B8A823736F365E91-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2013-03-18 18:34                       ` Or Gerlitz
2013-03-16  0:38   ` [PATCH v4 5/7] libibverbs: Add ibv_open_qp sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-03-16  0:38   ` [PATCH v4 6/7] libibverbs: Add man page for ibv_open_qp sean.hefty-ral2JQCrhuEAvxtiuMwx3w
2013-03-16  0:38   ` [PATCH v4 7/7] libibverbs: Add XRC sample application sean.hefty-ral2JQCrhuEAvxtiuMwx3w

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=5145C820.9090801@mellanox.com \
    --to=ogerlitz-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=roland-BHEL68pLQRGGvPXPguhicg@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox