From: Andrew Lunn <andrew@lunn.ch>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com,
davem@davemloft.net, bridge@lists.linux-foundation.org
Subject: Re: [PATCH net-next v2 1/3] net: bridge: add support for user-controlled bool options
Date: Sun, 25 Nov 2018 16:45:55 +0100 [thread overview]
Message-ID: <20181125154555.GA18663@lunn.ch> (raw)
In-Reply-To: <20181124023422.13908-2-nikolay@cumulusnetworks.com>
On Sat, Nov 24, 2018 at 04:34:20AM +0200, Nikolay Aleksandrov wrote:
> We have been adding many new bridge options, a big number of which are
> boolean but still take up netlink attribute ids and waste space in the skb.
> Recently we discussed learning from link-local packets[1] and decided
> yet another new boolean option will be needed, thus introducing this API
> to save some bridge nl space.
> The API supports changing the value of multiple boolean options at once
> via the br_boolopt_multi struct which has an optmask (which options to
> set, bit per opt) and optval (options' new values). Future boolean
> options will only be added to the br_boolopt_id enum and then will have
> to be handled in br_boolopt_toggle/get. The API will automatically
> add the ability to change and export them via netlink, sysfs can use the
> single boolopt function versions to do the same. The behaviour with
> failing/succeeding is the same as with normal netlink option changing.
>
> If an option requires mapping to internal kernel flag or needs special
> configuration to be enabled then it should be handled in
> br_boolopt_toggle. It should also be able to retrieve an option's current
> state via br_boolopt_get.
>
> v2: WARN_ON() on unsupported option as that shouldn't be possible and
> also will help catch people who add new options without handling
> them for both set and get. Pass down extack so if an option desires
> it could set it on error and be more user-friendly.
>
> [1] https://www.spinics.net/lists/netdev/msg532698.html
>
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2018-11-26 2:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-24 2:34 [PATCH net-next v2 0/3] net: bridge: add an option to disabe linklocal learning Nikolay Aleksandrov
2018-11-24 2:34 ` [PATCH net-next v2 1/3] net: bridge: add support for user-controlled bool options Nikolay Aleksandrov
2018-11-24 16:10 ` Andrew Lunn
2018-11-24 16:18 ` nikolay
2018-11-24 16:25 ` Andrew Lunn
2018-11-24 16:46 ` nikolay
2018-11-25 8:12 ` Nikolay Aleksandrov
2018-11-26 17:39 ` Stephen Hemminger
2018-11-26 17:41 ` Nikolay Aleksandrov
2018-11-25 15:45 ` Andrew Lunn [this message]
2018-11-24 2:34 ` [PATCH net-next v2 2/3] net: bridge: add no_linklocal_learn bool option Nikolay Aleksandrov
2018-11-24 16:27 ` Andrew Lunn
2018-11-24 2:34 ` [PATCH net-next v2 3/3] net: bridge: export supported boolopts Nikolay Aleksandrov
2018-11-24 16:16 ` Andrew Lunn
2018-11-24 16:20 ` nikolay
2018-11-24 16:26 ` Andrew Lunn
2018-11-27 23:04 ` [PATCH net-next v2 0/3] net: bridge: add an option to disabe linklocal learning David Miller
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=20181125154555.GA18663@lunn.ch \
--to=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.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).