All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, jiri@resnulli.us, xiyou.wangcong@gmail.com
Subject: Re: [PATCH net-next RFC 1/1] net netlink: Add new type NLA_FLAG_BITS
Date: Tue, 2 May 2017 21:52:19 -0400	[thread overview]
Message-ID: <a719bd37-9e60-8ce2-c5d5-cbc9195a4f62@mojatatu.com> (raw)
In-Reply-To: <20170502.150345.954488149548327006.davem@davemloft.net>

On 17-05-02 03:03 PM, David Miller wrote:
> From: Jamal Hadi Salim <jhs@mojatatu.com>
> Date: Sun, 30 Apr 2017 10:28:39 -0400
>
>> Generic bitflags attribute content sent to the kernel by user.
>> With this type the user can either set or unset a flag in the
>> kernel.
>
> You asked for feedback, here it is :-)
>
> I think this is overengineered.
>
> Just define a u32 for the value, and mask which defines which bits are
> legitimate and defined.  Any bit outside of the legitimate mask must
> be zero.
>

That is what it does but as a nla type. It has a validator ops() in
case someone wants to override the default validator.
Is the ops the over-engineering you refer to or merely making it an
nla type is a problem?

cheers,
jamal

  reply	other threads:[~2017-05-03  1:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-30 14:28 [PATCH net-next RFC 1/1] net netlink: Add new type NLA_FLAG_BITS Jamal Hadi Salim
2017-05-02 19:03 ` David Miller
2017-05-03  1:52   ` Jamal Hadi Salim [this message]
2017-06-10 12:33     ` Jamal Hadi Salim

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=a719bd37-9e60-8ce2-c5d5-cbc9195a4f62@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.