From: Yann Droneaud <yann-WYdEh2jsUj5Wj0EZb7rXcA@public.gmane.org>
To: Hannes Weisbach <hannes_weisbach-hi6Y0CQ0nG0@public.gmane.org>
Cc: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [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])
Date: Fri, 29 Nov 2013 11:32:19 +0100 [thread overview]
Message-ID: <1385721139.21498.19.camel@localhost.localdomain> (raw)
In-Reply-To: <92ED2320-AE25-4A1B-8FDF-D31121D2B125-hi6Y0CQ0nG0@public.gmane.org>
Hi,
Le jeudi 28 novembre 2013 à 20:47 +0100, Hannes Weisbach a écrit :
> > But adding "const" should not break compilation of existing userspace program.
> That was my thought too. However, because those functions are defined
> in as inline in a header, they actually do break user code. For
> example, rdma_reg_msgs passes a const void * to ibv_reg_mr, which
> takes a void *, thus resulting in a warning. If you (like me) compile
> with the -Werror flag, this results in broken code. The only
> offending libibverbs function I found so far is ibv_reg_mr().
> >
> > PS: this issue could also be raised against libibverbs, so once you've
> > fixed librdmacm, why not fix libibverbs after ?
> This was my plan. But first I wanted to see if there even is interest
> in fixing this. As a user I deal with librdmacm directly, so I
> started to fix it first.
>
> Anyway, since patching librdmacm alone would break user code, I also
> included a patch for libibverbs, which adds the const qualifier to
> 'addr' parameter ib ibv_reg_mr().
>
To avoid adding cast to non-const in librdmacm that no one will remove
once added, you're correct in patching libibverbs first.
> lists.openfabrics.org says, this is also the mailing list for
> libibverbs (README is outdated ;)), I hope this is ok.
>
It's OK. Roland Dreier, libibverbs maintainer, is here (but sadly not as
often as we would like).
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
prev parent reply other threads:[~2013-11-29 10:32 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
[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 [this message]
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=1385721139.21498.19.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