Re: [PATCH rdma-next 4/6] RDMA/core: Move HFI1 IOCTL declarations to common file

Dalessandro, Dennis
2016-08-17T13:35:53Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1642 bytes --]

On Wed, 2016-08-17 at 09:55 +0300, Leon Romanovsky wrote:
> On Wed, Aug 17, 2016 at 02:16:31AM -0400, ira.weiny wrote:
> > On Tue, Aug 16, 2016 at 04:45:21PM +0300, Leon Romanovsky wrote:
> > > From: Leon Romanovsky <leonro@mellanox.com>
> > >
> > > Move HFI1 IOCTL declarations to rdma_user_ioctl.h file.
> >
> > I have not tried with the patch but I'm 99% sure this will break
> > the PSM2
> > library build which includes hfi1_user.h.
> >
> > This is one of those things I have pondered in the past.Â Â Most of
> > the rdma
> > libraries don't actually use these definitions directly.Â Â PSM2
> > does.
>
> I'm not so convinced about it.
> "#include <rdma/rdma_user_ioctl.h>" was added to hfi1_user.h to share
> all definitions. PSM2 library will see it.

On face value that should be true. I would want to run it by the PSM
folks and test it out though to be sure.

> > I'm not sure what other libraries do.
> >
> > In the final patch of this series you admit that the name changes
> > in that patch
> > will break userspace which uses the defines directly.Â Â Can we,
> > should we, do
> > that?
>
> I'm talking about __NUM() macros.
>
> Do you really use __NUM(ASSIGN_CTXT) in user application? Why did you
> do
> it? You supposed to use HFI1_IOCTL_ASSIGN_CTXT instead.

Yeah I think we can get rid of the __NUM() macro. It should not
strictly be needed by user space. User should be using the thing that
__NUM() was used in, the IOCTL number.

-DennyN‹§²æìr¸›yúèšØb²X¬¶Ç§vØ^–)Þº{.nÇ+‰·¥Š{±­ÙšŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hš‹»öì\x17/oSc¾™Ú³9˜uÀ¦æå‰È&jw¨®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿïêäz¹Þ–Šàþf£¢·hšˆ§~ˆmš