From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Edward Cree <ecree@solarflare.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
netfilter-devel@vger.kernel.org, jiri@resnulli.us,
kuba@kernel.org
Subject: Re: [RFC PATCH net] net: flow_offload: simplify hw stats check handling
Date: Thu, 7 May 2020 17:36:23 +0200 [thread overview]
Message-ID: <20200507153623.GA10305@salvia> (raw)
In-Reply-To: <49176c41-3696-86d9-f0eb-c20207cd6d23@solarflare.com>
On Thu, May 07, 2020 at 03:59:09PM +0100, Edward Cree wrote:
[...]
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
> index 890b078851c9..1f0caeae24e1 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c
> @@ -30,14 +30,14 @@ static int mlxsw_sp_flower_parse_actions(struct mlxsw_sp *mlxsw_sp,
> return -EOPNOTSUPP;
>
> act = flow_action_first_entry_get(flow_action);
> - if (act->hw_stats == FLOW_ACTION_HW_STATS_ANY ||
> - act->hw_stats == FLOW_ACTION_HW_STATS_IMMEDIATE) {
> + if (act->hw_stats & FLOW_ACTION_HW_STATS_DISABLED) {
> + /* Nothing to do */
What if the driver does not support to disable counters?
It will have to check for _DONT_CARE here.
And _DISABLED implies "bail out if you cannot disable".
You cannot assume _DISABLE != _DONT_CARE, it's the driver that decides
this.
prev parent reply other threads:[~2020-05-07 15:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-07 14:59 [RFC PATCH net] net: flow_offload: simplify hw stats check handling Edward Cree
2020-05-07 15:32 ` Pablo Neira Ayuso
2020-05-07 15:49 ` Edward Cree
2020-05-07 16:46 ` Pablo Neira Ayuso
2020-05-07 23:48 ` Jakub Kicinski
2020-05-11 5:33 ` Jiri Pirko
2020-05-11 10:09 ` Edward Cree
2020-05-07 15:36 ` Pablo Neira Ayuso [this message]
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=20200507153623.GA10305@salvia \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=ecree@solarflare.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
/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).