mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Luis R. Rodriguez" <mcgrof@suse.com>
Subject: Re: [PATCH] net: kdoc struct net_device flags and priv_flags
Date: Tue, 25 Feb 2014 02:11:05 +0000	[thread overview]
Message-ID: <1393294265.6823.154.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <1393287245-4549-1-git-send-email-mcgrof@do-not-panic.com>

[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]

On Mon, 2014-02-24 at 16:14 -0800, Luis R. Rodriguez wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
> 
> We have documentation for these flags but they're scattered
> all over the place. #defines don't allow documentation to be
> written easily so to help to start bringing some documentation
> together use the enums kdoc practice but keep the defines to
> allow userspace to be able to #ifdef them.
> 
> I've verified the same values are assigned before and after
> with a simple userspace test program [0] and checksumming the
> output.
> 
> [0] http://drvbp1.linux-foundation.org/~mcgrof/kdoc/netdev_flags/
> 
> mcgrof@gnat ~/tmp $ ./check-flags | sha1sum
> 0ec5b6b1840aa3bb9ce464e61c564820871c92c3  -
> 
> Cc: netdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> ---
>  include/uapi/linux/if.h | 201 +++++++++++++++++++++++++++++++++++-------------
>  1 file changed, 149 insertions(+), 52 deletions(-)
> 
> diff --git a/include/uapi/linux/if.h b/include/uapi/linux/if.h
> index d758163..1555623 100644
> --- a/include/uapi/linux/if.h
> +++ b/include/uapi/linux/if.h
[...]
> +/**
> + * enum net_device_priv_flags - &struct net_device priv_flags
> + *
> + * These are the &struct net_device, they are only set internally
> + * by drivers and used in the kernel but are invisible to userspace.
[...]

Indeed, I wonder why they are in the UAPI header.  As userland doesn't
have a legitimate use for them, maybe you could move them back to
include/linux/if.h instead of bothering with adding macros?

Ben.

-- 
Ben Hutchings
Everything should be made as simple as possible, but not simpler.
                                                           - Albert Einstein

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  reply	other threads:[~2014-02-25  2:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  0:14 Luis R. Rodriguez
2014-02-25  2:11 ` Ben Hutchings [this message]
2014-02-25  4:53   ` David Miller
2014-02-25  5:37     ` Florian Fainelli
2014-02-25  6:09       ` Luis R. Rodriguez
2014-02-25 22:19       ` Luis R. Rodriguez
2014-02-25 22:39         ` Florian Fainelli
2014-02-25 23:08           ` Luis R. Rodriguez
2014-02-25 13:47     ` Ben Hutchings

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=1393294265.6823.154.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@do-not-panic.com \
    --cc=mcgrof@suse.com \
    --cc=netdev@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®