public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Matan Barak <matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
	Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH libibverbs] Add MR re-registeration
Date: Mon, 3 Nov 2014 10:28:25 +0200	[thread overview]
Message-ID: <54573CA9.8060202@mellanox.com> (raw)
In-Reply-To: <20141103025049.GA31929-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 3/11/2014 4:50 AM, Jason Gunthorpe wrote:
> On Sun, Nov 02, 2014 at 11:30:05AM +0200, Or Gerlitz wrote:
>
>> @@ -886,7 +887,7 @@ struct ibv_context_ops {
>>   	int			(*dealloc_pd)(struct ibv_pd *pd);
>>   	struct ibv_mr *		(*reg_mr)(struct ibv_pd *pd, void *addr, size_t length,
>>   					  int access);
>> -	struct ibv_mr *		(*rereg_mr)(struct ibv_mr *mr,
>> +	int			(*rereg_mr)(struct ibv_mr *mr,
>>   					    int flags,
>>   					    struct ibv_pd *pd, void *addr,
>>   					    size_t length,
>
> What is going on here?
>
> Signatures in the ops structure should not be changed without quite a
> bit more explanation. I'd like to see this in a dedicated patch with a
> proper discussion about why it is safe...
>
> (I admit, I'm confused how this patch is adding rereg_mr when it
>   already sort of seems to exist)
>
> Jason
>

Lets present the facts first - Neither ibv_rereg_mr nor the kernel ABI 
and command structure exist before this patch. The only thing that did 
exist was an API between libibverbs and the provider library.

As there was no way for a userspace program to ask for memory 
re-registration, AFAIK this op wasn't used by any provider.

Furthermore, re-registering a MR shouldn't change the user's MR handle!
Hence, there's no need to return information that the user already 
knows. Does ibv_modify_qp return struct ibv_qp? Both verbs should act 
similarly.

I don't mind re-spin this change into another patch, but since I don't 
consider the current state of libibverbs as having memory 
re-registration support, I don't think it's necessary.

Matan
--
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-11-03  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-02  9:30 [PATCH libibverbs] Add MR re-registeration Or Gerlitz
     [not found] ` <1414920605-18943-1-git-send-email-ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-11-02 12:35   ` Sagi Grimberg
2014-11-03  2:50   ` Jason Gunthorpe
     [not found]     ` <20141103025049.GA31929-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2014-11-03  8:28       ` Matan Barak [this message]
     [not found]         ` <54573CA9.8060202-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2014-11-03 19:20           ` 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=54573CA9.8060202@mellanox.com \
    --to=matanb-vpraknaxozvwk0htik3j/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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