netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: mikko.rapeli@iki.fi
Cc: shemming@brocade.com, linux-api@vger.kernel.org,
	linux-kernel@vger.kernel.org, jwboyer@fedoraproject.org,
	pablo@netfilter.org, netdev@vger.kernel.org,
	netfilter-devel@vger.kernel.org, libc-alpha@sourceware.org
Subject: Re: [PATCH] uapi glibc compat: fix cases where glibc net/if.h is included before linux/if.h
Date: Fri, 26 Feb 2016 11:28:17 -0500 (EST)	[thread overview]
Message-ID: <20160226.112817.1495300719463061587.davem@davemloft.net> (raw)
In-Reply-To: <20160226072513.GH6104@lakka.kapsi.fi>

From: Mikko Rapeli <mikko.rapeli@iki.fi>
Date: Fri, 26 Feb 2016 09:25:13 +0200

> (Adding libc-alpha list, review of https://lkml.org/lkml/2016/2/7/89 )
> 
> On Wed, Feb 17, 2016 at 10:46:20AM -0500, David Miller wrote:
>> From: Mikko Rapeli <mikko.rapeli@iki.fi>
>> Date: Sun,  7 Feb 2016 16:03:21 +0200
>> 
>> > @@ -68,6 +72,8 @@
>> >   * @IFF_ECHO: echo sent packets. Volatile.
>> >   */
>> >  enum net_device_flags {
>> > +/* for compatibility with glibc net/if.h */
>> > +#if __UAPI_DEF_IF_NET_DEVICE_FLAGS
>> >  	IFF_UP				= 1<<0,  /* sysfs */
>> >  	IFF_BROADCAST			= 1<<1,  /* volatile */
>> >  	IFF_DEBUG			= 1<<2,  /* sysfs */
>> > @@ -84,11 +90,14 @@ enum net_device_flags {
>> >  	IFF_PORTSEL			= 1<<13, /* sysfs */
>> >  	IFF_AUTOMEDIA			= 1<<14, /* sysfs */
>> >  	IFF_DYNAMIC			= 1<<15, /* sysfs */
>> > +#endif /* __UAPI_DEF_IF_NET_DEVICE_FLAGS */
>> >  	IFF_LOWER_UP			= 1<<16, /* volatile */
>> >  	IFF_DORMANT			= 1<<17, /* volatile */
>> >  	IFF_ECHO			= 1<<18, /* volatile */
>> >  };
>> 
>> This is going to get messy is IFF_LOWER_UP, IFF_DORMANT, and IFF_ECHO
>> get added the the glibc header.  Why not just handle it now with
>> another __UAPI_DEF_FOO guard so that the additions to net/if.h can
>> deal with this case too.
> 
> Do you mean that the enum should be protected with a single guard or
> should I have one guard for current conflicts and one for the future
> if glibc headers include IFF_LOWER_UP and others?

I'm ambivalent about the mechanism, and I'm more concerned about covering
those three values in your change rather than eliding them.

  reply	other threads:[~2016-02-26 16:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-06 17:20 header conflict introduced by change to netfilter_ipv4/ip_tables.h Stephen Hemminger
2016-01-07  7:29 ` Mikko Rapeli
     [not found] ` <88a455d4b6dc4d4398553e6529d7b94a@HQ1WP-EXMB11.corp.brocade.com>
2016-01-07 18:30   ` Stephen Hemminger
2016-01-07 19:15     ` Mikko Rapeli
2016-02-04  7:13       ` Josh Boyer
     [not found]         ` <CA+5PVA4P2avVr+m=ittQUyBou9kT2nbK0-Jeo+3coAFyQXTT_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-07 14:03           ` [PATCH] uapi glibc compat: fix cases where glibc net/if.h is included before linux/if.h Mikko Rapeli
     [not found]             ` <1454853801-18064-1-git-send-email-mikko.rapeli-X3B1VOXEql0@public.gmane.org>
2016-02-17 15:46               ` David Miller
     [not found]                 ` <20160217.104620.239734387234680136.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2016-02-26  7:25                   ` Mikko Rapeli
2016-02-26 16:28                     ` David Miller [this message]
2016-02-25 20:53         ` header conflict introduced by change to netfilter_ipv4/ip_tables.h Daniel Borkmann
2016-02-26  7:13           ` Mikko Rapeli
2016-02-07 11:31     ` Kernel uapi and glibc header conflicts (was Re: header conflict introduced by change to netfilter_ipv4/ip_tables.h ) Mikko Rapeli
2016-02-08 13:59       ` Florian Weimer
2016-02-25 21:08 ` header conflict introduced by change to netfilter_ipv4/ip_tables.h Thomas Graf
2016-02-26  7:18   ` Mikko Rapeli
2016-02-26  9:13     ` Thomas Graf

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=20160226.112817.1495300719463061587.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=jwboyer@fedoraproject.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikko.rapeli@iki.fi \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=shemming@brocade.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;
as well as URLs for NNTP newsgroup(s).