# Re: \[PATCH net-next\] Bonding: add missed\_max option

- From: Jakub Kicinski \<kuba@kernel.org\>
- Date: 2021-11-17 02:41:58 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/11/11216263
- Thread: https://ratatoskr.run/netdev/2021/11/11216176/t.md

```text
On Wed, 17 Nov 2021 09:01:15 +0800 Hangbin Liu wrote:
> > >  
> > >  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?

Either way is fine. To be sure we don't need to enforce any lower limit
here? 0 is a valid setting?
```
