On Tue, Nov 16, 2021 at 12:00:58PM -0800, Jakub Kicinski wrote:
On Tue, 16 Nov 2021 16:48:40 +0800 Hangbin Liu wrote:
quoted
+ [IFLA_BOND_MISSED_MAX] = { .type = NLA_U32 },
Why NLA_U32...
quoted
static const struct nla_policy bond_slave_policy[IFLA_BOND_SLAVE_MAX + 1] = {@@ -453,6 +454,15 @@ static int bond_changelink(struct net_device *bond_dev, struct nlattr *tb[],
return err;
}
+ if (data[IFLA_BOND_MISSED_MAX]) {
+ int missed_max = nla_get_u8(data[IFLA_BOND_MISSED_MAX]);
If you read and write a u8?
Ah, that's a typo. I planed to use nla_get_u32(). But looks NLA_U8 also should
be enough. WDYT?
Thanks
Hangbin