From: Michal Kubecek <mkubecek@suse.cz>
To: netdev@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>,
davem@davemloft.net, simon.horman@netronome.com,
kernel-team@fb.com
Subject: Re: [PATCH net-next 1/3] ethtool: check if there is at least one channel for TX/RX in the core
Date: Fri, 15 May 2020 22:56:56 +0200 [thread overview]
Message-ID: <20200515205656.GF21714@lion.mk-sys.cz> (raw)
In-Reply-To: <20200515194902.3103469-2-kuba@kernel.org>
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@kernel.org>
Reviewed-by: Michal Kubecek <mkubecek@suse.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
next prev parent reply other threads:[~2020-05-15 20:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 19:48 [PATCH net-next 0/3] ethtool: set_channels: add a few more checks Jakub Kicinski
2020-05-15 19:49 ` [PATCH net-next 1/3] ethtool: check if there is at least one channel for TX/RX in the core Jakub Kicinski
2020-05-15 20:56 ` Michal Kubecek [this message]
2020-05-15 22:26 ` Jakub Kicinski
2020-05-15 19:49 ` [PATCH net-next 2/3] nfp: don't check lack of RX/TX channels Jakub Kicinski
2020-05-15 20:59 ` Michal Kubecek
2020-05-18 11:44 ` Simon Horman
2020-05-15 19:49 ` [PATCH net-next 3/3] ethtool: don't call set_channels in drivers if config didn't change Jakub Kicinski
2020-05-15 21:01 ` Michal Kubecek
2020-05-16 20:56 ` [PATCH net-next 0/3] ethtool: set_channels: add a few more checks David Miller
2020-05-16 21:13 ` Michal Kubecek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200515205656.GF21714@lion.mk-sys.cz \
--to=mkubecek@suse.cz \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=simon.horman@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).