From: Yann Droneaud <yann-WYdEh2jsUj5Wj0EZb7rXcA@public.gmane.org>
To: Hannes Weisbach <hannes_weisbach-hi6Y0CQ0nG0@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: non-const pointer void * addr in rdma_reg_* and rdma_post_[send|write]
Date: Thu, 28 Nov 2013 10:23:10 +0100 [thread overview]
Message-ID: <1385630590.21498.14.camel@localhost.localdomain> (raw)
In-Reply-To: <9A0BFE48-9AED-4C41-80C8-F943D1C64E99-hi6Y0CQ0nG0@public.gmane.org>
Hi,
Le mercredi 27 novembre 2013 à 19:00 +0100, Hannes Weisbach a écrit :
> I just started working with librdmacm and I was wondering if there is a specific reason why rdma_reg_* functions and rdma_post_send/write functions take the local memory address as non-const pointer "void * addr". These functions shouldn't and don't change the memory pointed to by addr. I think this should be made explicit by using the type const void * for addr.
> In case you agree, I would volunteer to make the necessary changes.
>
:)
Two days ago I started to work on a kernel patchset to address similar
concerns on the verbs/RDMA APIs
BTW, it's easier to change the kernel "internal" API than the public
userspace API of the library. But adding "const" should not break
compilation of existing userspace program.
PS: this issue could also be raised against libibverbs, so once you've
fixed librdmacm, why not fix libibverbs after ?
Regards.
--
Yann Droneaud
OPTEYA
--
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
next prev parent reply other threads:[~2013-11-28 9:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 18:00 non-const pointer void * addr in rdma_reg_* and rdma_post_[send|write] Hannes Weisbach
[not found] ` <9A0BFE48-9AED-4C41-80C8-F943D1C64E99-hi6Y0CQ0nG0@public.gmane.org>
2013-11-27 18:07 ` Hefty, Sean
2013-11-28 9:23 ` Yann Droneaud [this message]
[not found] ` <1385630590.21498.14.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2013-11-28 19:47 ` [PATCH] Add const qualifier in rdma_reg*, rdma_post_send*|write and ibv_reg_mr (was: Re: non-const pointer void * addr in rdma_reg_* and rdma_post_[send|write]) Hannes Weisbach
[not found] ` <92ED2320-AE25-4A1B-8FDF-D31121D2B125-hi6Y0CQ0nG0@public.gmane.org>
2013-11-29 10:32 ` Yann Droneaud
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=1385630590.21498.14.camel@localhost.localdomain \
--to=yann-wydeh2jsuj5wj0ezb7rxca@public.gmane.org \
--cc=hannes_weisbach-hi6Y0CQ0nG0@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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