On 22/11/2018 18:13, Nikolay Aleksandrov wrote:
>>> +int br_boolopt_multi_toggle(struct net_bridge *br,
>>> + struct br_boolopt_multi *bm)
>>> +{
>>> + unsigned long bitmap = bm->optmask;
>>> + int err = 0;
>>> + int opt_id;
>>> +
>>> + for_each_set_bit(opt_id, &bitma
On Thu, 22 Nov 2018 18:01:29 +0200
Nikolay Aleksandrov wrote:
> On 22/11/2018 17:35, Andrew Lunn wrote:
> > On Thu, Nov 22, 2018 at 06:29:24AM +0200, Nikolay Aleksandrov wrote:
> >> We have been adding many new bridge options, a big number of which are
> >> boolean but still take up netlink att
On 22/11/2018 17:49, Andrew Lunn wrote:
>> +/* br_boolopt_toggle - change user-controlled boolean option
>> + *
>> + * @br: bridge device
>> + * @opt: id of the option to change
>> + * @on: new option value
>> + *
>> + * Changes the value of the respective boolean option to @on taking care of
>> +
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_
On 22/11/2018 17:35, Andrew Lunn wrote:
> On Thu, Nov 22, 2018 at 06:29:24AM +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 f
> +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);
> +
> +
> +/* br_boolopt_toggle - change user-controlled boolean option
> + *
> + * @br: bridge device
> + * @opt: id of the option to change
> + * @on: new option value
> + *
> + * Changes the value of the respective boolean option to @on taking care of
> + * any internal option value mapping and configur
On Thu, Nov 22, 2018 at 06:29:24AM +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 a
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 s