* [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h [not found] ` <20170806164428.2273-1-mikko.rapeli-X3B1VOXEql0@public.gmane.org> @ 2017-08-06 16:44 ` Mikko Rapeli [not found] ` <20170806164428.2273-31-mikko.rapeli-X3B1VOXEql0@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Mikko Rapeli @ 2017-08-06 16:44 UTC (permalink / raw) To: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-api-u79uwXL29TY76Z2rM5mHXA Cc: Mikko Rapeli, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua, Doug Ledford Fixes these userspace compilation errors when rdma_user_rxe.h is compiled alone: rdma/rdma_user_rxe.h:59:20: error: field ‘_sockaddr’ has incomplete type struct sockaddr _sockaddr; ^~~~~~~~~ rdma/rdma_user_rxe.h:60:22: error: field ‘_sockaddr_in’ has incomplete type struct sockaddr_in _sockaddr_in; ^~~~~~~~~~~~ rdma/rdma_user_rxe.h:61:23: error: field ‘_sockaddr_in6’ has incomplete type struct sockaddr_in6 _sockaddr_in6; ^~~~~~~~~~~~~ Signed-off-by: Mikko Rapeli <mikko.rapeli-X3B1VOXEql0@public.gmane.org> Acked-by: Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Acked-by: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Cc: Hal Rosenstock <hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org --- include/uapi/rdma/rdma_user_rxe.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h index 1de99cfdaf7d..ce6c929ca331 100644 --- a/include/uapi/rdma/rdma_user_rxe.h +++ b/include/uapi/rdma/rdma_user_rxe.h @@ -34,6 +34,8 @@ #define RDMA_USER_RXE_H #include <linux/types.h> +#include <linux/in.h> +#include <linux/in6.h> union rxe_gid { __u8 raw[16]; -- 2.13.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <20170806164428.2273-31-mikko.rapeli-X3B1VOXEql0@public.gmane.org>]
* Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h [not found] ` <20170806164428.2273-31-mikko.rapeli-X3B1VOXEql0@public.gmane.org> @ 2017-08-08 23:13 ` Jason Gunthorpe [not found] ` <20170808231306.GH29372-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jason Gunthorpe @ 2017-08-08 23:13 UTC (permalink / raw) To: Mikko Rapeli Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-api-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock, linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua, Doug Ledford On Sun, Aug 06, 2017 at 06:44:21PM +0200, Mikko Rapeli wrote: > Fixes these userspace compilation errors when rdma_user_rxe.h is compiled > alone: > > rdma/rdma_user_rxe.h:59:20: error: field ???_sockaddr??? has incomplete type > struct sockaddr _sockaddr; > ^~~~~~~~~ > rdma/rdma_user_rxe.h:60:22: error: field ???_sockaddr_in??? has incomplete type > struct sockaddr_in _sockaddr_in; > ^~~~~~~~~~~~ > rdma/rdma_user_rxe.h:61:23: error: field ???_sockaddr_in6??? has incomplete type > struct sockaddr_in6 _sockaddr_in6; > ^~~~~~~~~~~~~ I'm not sure this is a good idea, linux/in.h should not be included in userspace users of this file, 'sockaddr_in' needs to come from glibc's 'netinet/in.h' instead.. Jason -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20170808231306.GH29372-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h [not found] ` <20170808231306.GH29372-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2017-08-09 13:48 ` Moni Shoua 2017-08-09 15:52 ` Jason Gunthorpe 0 siblings, 1 reply; 6+ messages in thread From: Moni Shoua @ 2017-08-09 13:48 UTC (permalink / raw) To: Jason Gunthorpe Cc: Mikko Rapeli, Linux Kernel Mailinglist, linux-api-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock, linux-rdma, Doug Ledford > > I'm not sure this is a good idea, linux/in.h should not be included in > userspace users of this file, 'sockaddr_in' needs to come from glibc's > 'netinet/in.h' instead.. > > Jason Is it wrong to include include/uapi/linux/in.h from userspace? ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h 2017-08-09 13:48 ` Moni Shoua @ 2017-08-09 15:52 ` Jason Gunthorpe [not found] ` <20170809155241.GB15586-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jason Gunthorpe @ 2017-08-09 15:52 UTC (permalink / raw) To: Moni Shoua Cc: Mikko Rapeli, Linux Kernel Mailinglist, linux-api, Sean Hefty, Hal Rosenstock, linux-rdma, Doug Ledford On Wed, Aug 09, 2017 at 04:48:08PM +0300, Moni Shoua wrote: > > > > I'm not sure this is a good idea, linux/in.h should not be included in > > userspace users of this file, 'sockaddr_in' needs to come from glibc's > > 'netinet/in.h' instead.. > Is it wrong to include include/uapi/linux/in.h from userspace? Generally speaking userspace should always use the glibc version of the headers and not headers from under linux/ Even if it is OK to include both today, that may not be true as glibc or the kernel changes, and we end up with broken builds. For instance look at this commit for a real problem caused by mixing net/if.h and linux/if.h: commit dc386fcf4a6d5dc0cc0052437c1cb161b7781592 Author: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Date: Fri Oct 14 12:04:42 2016 -0600 verbs: Use cmake to detect if net/if.h vs netling/route/link.h is broken If not then just use the header directly, otherwise use the work around. The issue is that old libnl libraries include linux/if.h and the declarations there conflict with net/if.h. New libraries do not do this. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20170809155241.GB15586-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>]
* Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h [not found] ` <20170809155241.GB15586-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> @ 2017-08-10 2:47 ` Dmitry V. Levin [not found] ` <20170810024747.GA30198-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Dmitry V. Levin @ 2017-08-10 2:47 UTC (permalink / raw) To: Jason Gunthorpe Cc: Moni Shoua, Mikko Rapeli, Linux Kernel Mailinglist, linux-api-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock, linux-rdma, Doug Ledford [-- Attachment #1: Type: text/plain, Size: 718 bytes --] On Wed, Aug 09, 2017 at 09:52:41AM -0600, Jason Gunthorpe wrote: > On Wed, Aug 09, 2017 at 04:48:08PM +0300, Moni Shoua wrote: > > > > > > I'm not sure this is a good idea, linux/in.h should not be included in > > > userspace users of this file, 'sockaddr_in' needs to come from glibc's > > > 'netinet/in.h' instead.. > > > Is it wrong to include include/uapi/linux/in.h from userspace? > > Generally speaking userspace should always use the glibc version of > the headers and not headers from under linux/ Sorry? Isn't the main idea of UAPI in providing the Linux interface for userspace, unlike glibc headers that provide other more or less standard interfaces like GNU, POSIX, etc? -- ldv [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20170810024747.GA30198-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org>]
* Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h [not found] ` <20170810024747.GA30198-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org> @ 2017-08-10 16:19 ` Jason Gunthorpe 0 siblings, 0 replies; 6+ messages in thread From: Jason Gunthorpe @ 2017-08-10 16:19 UTC (permalink / raw) To: Dmitry V. Levin Cc: Moni Shoua, Mikko Rapeli, Linux Kernel Mailinglist, linux-api-u79uwXL29TY76Z2rM5mHXA, Sean Hefty, Hal Rosenstock, linux-rdma, Doug Ledford On Thu, Aug 10, 2017 at 05:47:48AM +0300, Dmitry V. Levin wrote: > On Wed, Aug 09, 2017 at 09:52:41AM -0600, Jason Gunthorpe wrote: > > On Wed, Aug 09, 2017 at 04:48:08PM +0300, Moni Shoua wrote: > > > > > > > > I'm not sure this is a good idea, linux/in.h should not be included in > > > > userspace users of this file, 'sockaddr_in' needs to come from glibc's > > > > 'netinet/in.h' instead.. > > > > > Is it wrong to include include/uapi/linux/in.h from userspace? > > > > Generally speaking userspace should always use the glibc version of > > the headers and not headers from under linux/ > > Sorry? Isn't the main idea of UAPI in providing the Linux interface for > userspace, unlike glibc headers that provide other more or less standard > interfaces like GNU, POSIX, etc? The issue is when glibc and linux provide the same standards based API (eg in.h) - then the uapi version of in.h is really only for consumption by glibc and other very special cases. Forcing apps that need to access the rdma uapi that is not implemented in glibc to deal with that mess is what is problematic. The uapi system has a number of issues like this :| If you make it so I cannot include rdma_user_rxe.h and netinet/in.h, (for instance) in the same file then you broke user space use of the header and things are worse off.. Jason -- 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-10 16:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20170806164428.2273-1-mikko.rapeli@iki.fi>
[not found] ` <20170806164428.2273-1-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2017-08-06 16:44 ` [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h Mikko Rapeli
[not found] ` <20170806164428.2273-31-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2017-08-08 23:13 ` Jason Gunthorpe
[not found] ` <20170808231306.GH29372-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-09 13:48 ` Moni Shoua
2017-08-09 15:52 ` Jason Gunthorpe
[not found] ` <20170809155241.GB15586-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-08-10 2:47 ` Dmitry V. Levin
[not found] ` <20170810024747.GA30198-u2l5PoMzF/Vg9hUCZPvPmw@public.gmane.org>
2017-08-10 16:19 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox