[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200515205656.GF21714@lion.mk-sys.cz>
Date: Fri, 15 May 2020 22:56:56 +0200
From: Michal Kubecek <mkubecek@...e.cz>
To: netdev@...r.kernel.org
Cc: Jakub Kicinski <kuba@...nel.org>, davem@...emloft.net,
simon.horman@...ronome.com, kernel-team@...com
Subject: Re: [PATCH net-next 1/3] ethtool: check if there is at least one
channel for TX/RX in the core
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 <kuba@...nel.org>
Reviewed-by: Michal Kubecek <mkubecek@...e.cz>
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
Powered by blists - more mailing lists