From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> To: Andrew Lunn <andrew@lunn.ch> Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com, davem@davemloft.net, bridge@lists.linux-foundation.org Subject: Re: [PATCH net-next 1/2] net: bridge: add support for user-controlled bool options Date: Thu, 22 Nov 2018 18:07:41 +0200 [thread overview] Message-ID: <a676429f-7352-d10b-1e95-b9b357479a73@cumulusnetworks.com> (raw) In-Reply-To: <20181122155256.GH15403@lunn.ch> On 22/11/2018 17:52, Andrew Lunn wrote: >> +void br_boolopt_multi_get(const struct net_bridge *br, >> + struct br_boolopt_multi *bm) >> +{ >> + u32 optval = 0; >> + int opt_id; >> + >> + for (opt_id = 0; opt_id < BR_BOOLOPT_MAX; opt_id++) >> + optval |= (br_boolopt_get(br, opt_id) << opt_id); >> + >> + bm->optval = optval; >> + bm->optmask = 0; > > Maybe set optmask to indicate which bits this kernel supports? > I like the idea, will add for v2. Thanks, Nik > Andrew >
WARNING: multiple messages have this Message-ID (diff)
From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> To: Andrew Lunn <andrew@lunn.ch> Cc: netdev@vger.kernel.org, roopa@cumulusnetworks.com, bridge@lists.linux-foundation.org, davem@davemloft.net Subject: Re: [Bridge] [PATCH net-next 1/2] net: bridge: add support for user-controlled bool options Date: Thu, 22 Nov 2018 18:07:41 +0200 [thread overview] Message-ID: <a676429f-7352-d10b-1e95-b9b357479a73@cumulusnetworks.com> (raw) In-Reply-To: <20181122155256.GH15403@lunn.ch> On 22/11/2018 17:52, Andrew Lunn wrote: >> +void br_boolopt_multi_get(const struct net_bridge *br, >> + struct br_boolopt_multi *bm) >> +{ >> + u32 optval = 0; >> + int opt_id; >> + >> + for (opt_id = 0; opt_id < BR_BOOLOPT_MAX; opt_id++) >> + optval |= (br_boolopt_get(br, opt_id) << opt_id); >> + >> + bm->optval = optval; >> + bm->optmask = 0; > > Maybe set optmask to indicate which bits this kernel supports? > I like the idea, will add for v2. Thanks, Nik > Andrew >
next prev parent reply other threads:[~2018-11-23 2:47 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-11-22 4:29 [PATCH net-next 0/2] net: bridge: add an option to disabe linklocal learning Nikolay Aleksandrov 2018-11-22 4:29 ` [Bridge] " Nikolay Aleksandrov 2018-11-22 4:29 ` [PATCH net-next 1/2] net: bridge: add support for user-controlled bool options Nikolay Aleksandrov 2018-11-22 4:29 ` [Bridge] " Nikolay Aleksandrov 2018-11-22 15:35 ` Andrew Lunn 2018-11-22 15:35 ` [Bridge] " Andrew Lunn 2018-11-22 16:01 ` Nikolay Aleksandrov 2018-11-22 16:01 ` [Bridge] " Nikolay Aleksandrov 2018-11-22 19:37 ` Stephen Hemminger 2018-11-22 19:37 ` [Bridge] " Stephen Hemminger 2018-11-22 15:49 ` Andrew Lunn 2018-11-22 15:49 ` [Bridge] " Andrew Lunn 2018-11-22 16:13 ` Nikolay Aleksandrov 2018-11-22 16:13 ` [Bridge] " Nikolay Aleksandrov 2018-11-23 1:55 ` Nikolay Aleksandrov 2018-11-23 1:55 ` [Bridge] " Nikolay Aleksandrov 2018-11-22 15:52 ` Andrew Lunn 2018-11-22 15:52 ` [Bridge] " Andrew Lunn 2018-11-22 16:07 ` Nikolay Aleksandrov [this message] 2018-11-22 16:07 ` Nikolay Aleksandrov 2018-11-22 4:29 ` [PATCH net-next 2/2] net: bridge: add no_linklocal_learn bool option Nikolay Aleksandrov 2018-11-22 4:29 ` [Bridge] " Nikolay Aleksandrov 2018-11-22 16:04 ` Andrew Lunn 2018-11-22 16:04 ` [Bridge] " Andrew Lunn 2018-11-22 16:06 ` Nikolay Aleksandrov 2018-11-22 16:06 ` [Bridge] " Nikolay Aleksandrov
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=a676429f-7352-d10b-1e95-b9b357479a73@cumulusnetworks.com \ --to=nikolay@cumulusnetworks.com \ --cc=andrew@lunn.ch \ --cc=bridge@lists.linux-foundation.org \ --cc=davem@davemloft.net \ --cc=netdev@vger.kernel.org \ --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: linkBe 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.