On Mon, May 8, 2017 at 9:42 PM, Jason Gunthorpe <jgunthorpe@xxxxxxxxxxxxxxxxxxxx> wrote: > On Mon, May 08, 2017 at 08:17:06PM +0530, Devesh Sharma wrote: >> On Mon, May 8, 2017 at 7:35 PM, Dennis Dalessandro >> <dennis.dalessandro@xxxxxxxxx> wrote: >> > On 05/08/2017 09:54 AM, Leon Romanovsky wrote: >> >> >> >> On Mon, May 08, 2017 at 09:44:17AM -0400, Devesh Sharma wrote: >> >>> >> >>> Currently application either need to define its own enum >> >>> values for link-speed and link-width or use hard coded >> >>> values. This patch inharits the enums from kernel space >> >>> ib_verbs.h and puts into verbs.h for ease of programming. >> >>> >> >>> Signed-off-by: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx> >> >>> libibverbs/examples/devinfo.c | 22 ++++++++++++---------- >> >>> libibverbs/verbs.h | 18 ++++++++++++++++++ >> >>> 2 files changed, 30 insertions(+), 10 deletions(-) >> >> >> >> >> >> I think the better approach will be move these defines from >> >> include/rdma/ib_verbs.h to include/uapi/rdma/ib_user_verbs.h >> >> and reuse ib_user_verbs.h file directly in libibverbs. >> > >> > >> > I agree on this. Please put this stuff in the uapi header file and include >> > that in user space. >> >> Done, will post a V1 with 2 patches... > > Relying on the kernel header from a uapi header means that we now > require the distro to have a sufficient version of that kernel header. Which means we need to have a mechanism to track the versions. is relying on the ABI version is good enough or you see any blockers there.. > > This might be OK, but you have to check to see what distros are > including (cbuild --run-shell can help with this) And if a given distro is not including then fall-back to current scheme, is it okay to have defining/un-defining compile time macros to enable/disable certain code sections? > > Further, I seem to recall last time I lookd at this that using the > kernel header was hard because there were lots of name conflicts > that had to be resolved first. It would be great to see that done of > course.. Thanks for the heads-up, I am still trying to understand the complete problem, reviewing what we have currently I will get back if there are any questions. > > Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html