public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	Christoph Lameter
	<cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
Cc: roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH libibverbs] Align Flow Steering API to the extension verbs scheme
Date: Wed, 14 May 2014 10:08:04 -0600	[thread overview]
Message-ID: <20140514160804.GC6253@obsidianresearch.com> (raw)
In-Reply-To: <1400075090-14296-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

On Wed, May 14, 2014 at 04:44:50PM +0300, Or Gerlitz wrote:
> From: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> 
> The receive flow steering API didn't conform with the extension
> verbs:
> 1. It introduced VERBS_CONTEXT_CREATE_FLOW and
>    VERBS_CONTEXT_DESTROY_FLOW, even though the structures
>    aren't allocated by the provider.

"even though the structures aren't allocated by the provider"
is not the reason..

1. VERBS_CONTEXT_CREATE_FLOW/VERBS_CONTEXT_DESTROY_FLOW mis
   uses 'has_comp_mask' which is supposed to indicate if a legacy
   structure is extended or not. It does not indicate the presence
   of a function call

BTW, I see now that libmlx4 was never updated to set these values
(???)  so I think we can actually just drop them instead of adding
RESERVED, since they were never written or read.

>  	struct verbs_context *vctx = verbs_get_ctx_op(qp->context,
> -						      lib_ibv_create_flow);
> -	if (!vctx || !vctx->lib_ibv_create_flow)
> +						      create_flow);
> +	if (!vctx)
>  		return NULL;


Right, that 2nd test for lib_ibv_create flow was redundant.

Should errno be set here? I've forgotton what we settled on :|

No matter what, errno will be set by the kernel and leak out of the
provider call.

It feels broken that there are multiple failure modes to the call and
now way for the user to tell them apart.

.. and the man page should talk about errno if it is actually part of
the API.

>  /**
> diff --git a/man/ibv_create_flow.3 b/man/ibv_create_flow.3
> new file mode 100644
> index 0000000..f7c767e
> +++ b/man/ibv_create_flow.3
> @@ -0,0 +1,86 @@
> +.TH IBV_CREATE_FLOW 3 2013-08-21 libibverbs "Libibverbs
> Programmer's Manual"

Christoph: can you, as a user of this API, give the man page a quick
read to check that it captures everything?

Otherwise, this looks good to me.

Reviewd-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

Thanks for taking care of this Or

Jason
--
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:[~2014-05-14 16:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 13:44 [PATCH libmlx4] Align the Flow Steering support with libibverbs Or Gerlitz
     [not found] ` <1400075090-14296-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-14 13:44   ` [PATCH libibverbs] Align Flow Steering API to the extension verbs scheme Or Gerlitz
     [not found]     ` <1400075090-14296-2-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-05-14 16:08       ` Jason Gunthorpe [this message]
     [not found]         ` <20140514160804.GC6253-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-05-14 18:55           ` Christoph Lameter
     [not found]             ` <alpine.DEB.2.10.1405141354410.17596-gkYfJU5Cukgdnm+yROfE0A@public.gmane.org>
2014-05-14 18:55               ` Christoph Lameter
2014-05-15 14:30           ` Christoph Lameter
2014-05-14 15:48   ` [PATCH libmlx4] Align the Flow Steering support with libibverbs Jason Gunthorpe

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=20140514160804.GC6253@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=cl-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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