On Fri, May 15, 2020 at 12:49:00PM -0700, Jakub Kicinski wrote: > Having a channel config with no ability to RX or TX traffic is > clearly wrong. Check for this in the core so the drivers don't > have to. > > Signed-off-by: Jakub Kicinski <[email protected]>
Reviewed-by: Michal Kubecek <[email protected]> Only one formal problem: > @@ -170,7 +170,8 @@ int ethnl_set_channels(struct sk_buff *skb, struct > genl_info *info) > ethnl_update_u32(&channels.other_count, > tb[ETHTOOL_A_CHANNELS_OTHER_COUNT], &mod); > ethnl_update_u32(&channels.combined_count, > - tb[ETHTOOL_A_CHANNELS_COMBINED_COUNT], &mod); > + tb[ETHTOOL_A_CHANNELS_COMBINED_COUNT], &mod_combined); > + mod |= mod_combined; > ret = 0; > if (!mod) > goto out_ops; Bitwise or should do the right thing but using "|=" on bool variables looks strange. Michal
