netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, saeedm@mellanox.com,
	pablo@netfilter.org, ecree@solarflare.com
Subject: Re: [patch net-next 0/3] flow_offload: follow-ups to HW stats type patchset
Date: Thu, 12 Mar 2020 08:03:59 +0100	[thread overview]
Message-ID: <20200312070359.GA2221@nanopsycho.orion> (raw)
In-Reply-To: <20200311133028.7327abb5@kicinski-fedora-PC1C0HJN>

Wed, Mar 11, 2020 at 09:30:28PM CET, kuba@kernel.org wrote:
>On Wed, 11 Mar 2020 08:19:55 +0100 Jiri Pirko wrote:
>> Tue, Mar 10, 2020 at 08:05:19PM CET, kuba@kernel.org wrote:
>> >On Tue, 10 Mar 2020 16:49:06 +0100 Jiri Pirko wrote:  
>> >> This patchset includes couple of patches in reaction to the discussions
>> >> to the original HW stats patchset. The first patch is a fix,
>> >> the other two patches are basically cosmetics.  
>> >
>> >Reviewed-by: Jakub Kicinski <kuba@kernel.org>
>> >
>> >This problem already exists, but writing a patch for nfp I noticed that
>> >there is no way for this:
>> >
>> >	if (!flow_action_hw_stats_types_check(flow_action, extack,
>> >					      FLOW_ACTION_HW_STATS_TYPE_DELAYED_BIT))
>> >		return -EOPNOTSUPP;
>> >
>> >to fit on a line for either bit, which kind of sucks.  
>> 
>> Yeah, I was thinking about having flow_action_hw_stats_types_check as a
>> macro and then just simply have:
>> 
>> 	if (!flow_action_hw_stats_types_check(flow_action, extack, DELAYED))
>> 		return -EOPNOTSUPP;
>> 
>> WDYT?
>
>I'd rather have the 80+ lines than not be able to grep for it :(
>
>What's wrong with flow_action_stats_ok()? Also perhaps, flow_act 
>as a prefix?

Well nothing, just that we'd loose consistency. Everything is
"flow_action_*" and also, the name you suggest might indicate that you
are checking sw stats. :/


  reply	other threads:[~2020-03-12  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-10 15:49 [patch net-next 0/3] flow_offload: follow-ups to HW stats type patchset Jiri Pirko
2020-03-10 15:49 ` [patch net-next 1/3] flow_offload: fix allowed types check Jiri Pirko
2020-03-10 15:49 ` [patch net-next 2/3] flow_offload: turn hw_stats_type into dedicated enum Jiri Pirko
2020-03-10 15:49 ` [patch net-next 3/3] flow_offload: restrict driver to pass one allowed bit to flow_action_hw_stats_types_check() Jiri Pirko
2020-03-10 17:47 ` [patch net-next 0/3] flow_offload: follow-ups to HW stats type patchset Edward Cree
2020-03-10 19:05 ` Jakub Kicinski
2020-03-11  7:19   ` Jiri Pirko
2020-03-11 20:30     ` Jakub Kicinski
2020-03-12  7:03       ` Jiri Pirko [this message]
2020-03-12 19:40         ` Jakub Kicinski
2020-03-10 23:04 ` David Miller

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=20200312070359.GA2221@nanopsycho.orion \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=saeedm@mellanox.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).