lkml.org 
[lkml]   [2019]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH net-next v3 05/21] ethtool: netlink bitset handling
On Tue, Feb 19, 2019 at 06:27:59PM -0800, Jakub Kicinski wrote:
> On Mon, 18 Feb 2019 19:21:49 +0100 (CET), Michal Kubecek wrote:
> > + else if (is_u32)
> > + bitmap_from_arr32(val, bitmap, nbits);
> > + else
> > + bitmap_copy(val, bitmap, nbits);
> > + nla_for_each_nested(bit_attr, tb[ETHA_BITSET_BITS], rem) {
> > + *err = ethnl_update_bit(val, mask, nbits, bit_attr,
> > + is_list, names, legacy, info);
> > + if (*err < 0)
> > + goto out_free;
> > + }
> > + if (bitmask)
> > + __bitmap_to_any(bitmask, mask, nbits, is_u32);
> > + } else {
> > + unsigned int change_words = DIV_ROUND_UP(change_bits, 32);
> > +
> > + *err = 0;
> > + if (change_bits == 0 && tb[ETHA_BITSET_MASK])
> > + goto out_free;
> > + *err = -EINVAL;
> > + if (!tb[ETHA_BITSET_VALUE])
> > + goto out_free;
>
> !tb[ETHA_BITSET_BITS] && !tb[ETHA_BITSET_VALUE] is already rejected
> above.

Thank you. I'll drop this test.

Michal

\
 
 \ /
  Last update: 2019-02-20 09:17    [W:0.042 / U:1.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site