From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, saeedm@mellanox.com,
leon@kernel.org, michael.chan@broadcom.com, vishal@chelsio.com,
jeffrey.t.kirsher@intel.com, idosch@mellanox.com,
aelior@marvell.com, peppe.cavallaro@st.com,
alexandre.torgue@st.com, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, pablo@netfilter.org,
mlxsw@mellanox.com, Edward Cree <ecree@solarflare.com>
Subject: Re: [patch net-next 00/10] net: allow user specify TC filter HW stats type
Date: Sat, 22 Feb 2020 07:38:29 +0100 [thread overview]
Message-ID: <20200222063829.GB2228@nanopsycho> (raw)
In-Reply-To: <20200221102200.1978e10e@kicinski-fedora-PC1C0HJN>
Fri, Feb 21, 2020 at 07:22:00PM CET, kuba@kernel.org wrote:
>On Fri, 21 Feb 2020 10:56:33 +0100 Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@mellanox.com>
>>
>> Currently, when user adds a TC filter and the filter gets offloaded,
>> the user expects the HW stats to be counted and included in stats dump.
>> However, since drivers may implement different types of counting, there
>> is no way to specify which one the user is interested in.
>>
>> For example for mlx5, only delayed counters are available as the driver
>> periodically polls for updated stats.
>>
>> In case of mlxsw, the counters are queried on dump time. However, the
>> HW resources for this type of counters is quite limited (couple of
>> thousands). This limits the amount of supported offloaded filters
>> significantly. Without counter assigned, the HW is capable to carry
>> millions of those.
>>
>> On top of that, mlxsw HW is able to support delayed counters as well in
>> greater numbers. That is going to be added in a follow-up patch.
>>
>> This patchset allows user to specify one of the following types of HW
>> stats for added fitler:
>> any - current default, user does not care about the type, just expects
>> any type of stats.
>> immediate - queried during dump time
>> delayed - polled from HW periodically or sent by HW in async manner
>> disabled - no stats needed
>
>Hmm, but the statistics are on actions, it feels a little bit like we
>are perpetuating the mistake of counting on filters here.
You are right, the stats in tc are per-action. However, in both mlxsw
and mlx5, the stats are per-filter. What hw_stats does is that it
basically allows the user to set the type for all the actions in the
filter at once.
Could you imagine a usecase that would use different HW stats type for
different actions in one action-chain?
Plus, if the fine grained setup is ever needed, the hw_stats could be in
future easilyt extended to be specified per-action too overriding
the per-filter setup only for specific action. What do you think?
>
>Would it not work to share actions between filters which don't need
>fine grained stats if HW can do more filters than stats?
For mlxsw it would work, if the action chain would be identical. For
that you don't need the per-action granularity of setting type hw_stats.
>
>Let's CC Ed on this.
>
next prev parent reply other threads:[~2020-02-22 6:38 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-21 9:56 [patch net-next 00/10] net: allow user specify TC filter HW stats type Jiri Pirko
2020-02-21 9:56 ` [patch net-next 01/10] net: rename tc_cls_can_offload_and_chain0() to tc_cls_can_offload_basic() Jiri Pirko
2020-02-21 9:56 ` [patch net-next 02/10] iavf: use tc_cls_can_offload_basic() instead of chain check Jiri Pirko
2020-02-21 9:56 ` [patch net-next 03/10] flow_offload: Introduce offload of HW stats type Jiri Pirko
2020-02-21 9:56 ` [patch net-next 04/10] net: extend tc_cls_can_offload_basic() to check " Jiri Pirko
2020-02-21 9:56 ` [patch net-next 05/10] mlx5: restrict supported HW stats type to "any" Jiri Pirko
2020-02-21 9:56 ` [patch net-next 06/10] mlxsw: " Jiri Pirko
2020-02-21 9:56 ` [patch net-next 07/10] flow_offload: introduce "immediate" HW stats type and allow it in mlxsw Jiri Pirko
2020-02-21 9:56 ` [patch net-next 08/10] flow_offload: introduce "delayed" HW stats type and allow it in mlx5 Jiri Pirko
2020-02-21 9:56 ` [patch net-next 09/10] flow_offload: introduce "disabled" HW stats type and allow it in mlxsw Jiri Pirko
2020-02-21 9:56 ` [patch net-next 10/10] sched: cls_flower: allow user to specify type of HW stats for a filter Jiri Pirko
2020-02-21 18:22 ` [patch net-next 00/10] net: allow user specify TC filter HW stats type Jakub Kicinski
2020-02-22 6:38 ` Jiri Pirko [this message]
2020-02-24 11:38 ` Edward Cree
2020-02-24 13:11 ` Jiri Pirko
2020-02-24 15:45 ` Jamal Hadi Salim
2020-02-24 15:50 ` Edward Cree
2020-02-24 15:55 ` Jamal Hadi Salim
2020-02-24 16:25 ` Jiri Pirko
2020-02-25 16:01 ` Jamal Hadi Salim
2020-02-25 16:22 ` Jiri Pirko
2020-02-25 18:06 ` Jakub Kicinski
2020-02-26 12:52 ` Jamal Hadi Salim
2020-02-26 13:56 ` Jiri Pirko
2020-02-28 19:59 ` Pablo Neira Ayuso
2020-02-29 8:01 ` Jiri Pirko
2020-02-29 19:56 ` Pablo Neira Ayuso
2020-03-02 16:07 ` Edward Cree
2020-02-27 15:57 ` Edward Cree
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=20200222063829.GB2228@nanopsycho \
--to=jiri@resnulli.us \
--cc=aelior@marvell.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=ecree@solarflare.com \
--cc=idosch@mellanox.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jhs@mojatatu.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=michael.chan@broadcom.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=peppe.cavallaro@st.com \
--cc=saeedm@mellanox.com \
--cc=vishal@chelsio.com \
--cc=xiyou.wangcong@gmail.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