From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Moni Shoua <monis@mellanox.com>
Cc: Mikko Rapeli <mikko.rapeli@iki.fi>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
linux-api@vger.kernel.org, Sean Hefty <sean.hefty@intel.com>,
Hal Rosenstock <hal.rosenstock@gmail.com>,
linux-rdma <linux-rdma@vger.kernel.org>,
Doug Ledford <dledford@redhat.com>
Subject: Re: [PATCH v06 30/36] uapi rdma/rdma_user_rxe.h: include in.h and in6.h
Date: Wed, 9 Aug 2017 09:52:41 -0600 [thread overview]
Message-ID: <20170809155241.GB15586@obsidianresearch.com> (raw)
In-Reply-To: <CAG9sBKP=NuSJzhg8rMBTsTuZkfzPDjxYgAGjiCnEMe=9xXB0xA@mail.gmail.com>
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>
next prev parent reply other threads:[~2017-08-09 15:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
[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
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=20170809155241.GB15586@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mikko.rapeli@iki.fi \
--cc=monis@mellanox.com \
--cc=sean.hefty@intel.com \
/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