From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Marcin Szycik <marcin.szycik@linux.intel.com>
Cc: <netdev@vger.kernel.org>, <michal.swiatkowski@linux.intel.com>,
<aleksander.lobakin@intel.com>,
<intel-wired-lan@lists.osuosl.org>
Subject: Re: [PATCH iwl-next v2 7/7] ice: Add tracepoint for adding and removing switch rules
Date: Tue, 25 Jun 2024 09:51:19 +0200 [thread overview]
Message-ID: <e5a1c93d-243e-4c7f-8a61-aebf50b9e0bb@intel.com> (raw)
In-Reply-To: <20240624144530.690545-8-marcin.szycik@linux.intel.com>
On 6/24/24 16:45, Marcin Szycik wrote:
> Track the number of rules and recipes added to switch. Add a tracepoint to
> ice_aq_sw_rules(), which shows both rule and recipe count. This information
> can be helpful when designing a set of rules to program to the hardware, as
> it shows where the practical limit is. Actual limits are known (64 recipes,
> 32k rules), but it's hard to translate these values to how many rules the
> *user* can actually create, because of extra metadata being implicitly
> added, and recipe/rule chaining. Chaining combines several recipes/rules to
> create a larger recipe/rule, so one large rule added by the user might
> actually consume multiple rules from hardware perspective.
>
> Rule counter is simply incremented/decremented in ice_aq_sw_rules(), since
> all rules are added or removed via it.
>
> Counting recipes is harder, as recipes can't be removed (only overwritten).
> Recipes added via ice_aq_add_recipe() could end up being unused, when
> there is an error in later stages of rule creation. Instead, track the
> allocation and freeing of recipes, which should reflect the actual usage of
> recipes (if something fails after recipe(s) were created, caller should
> free them). Also, a number of recipes are loaded from NVM by default -
> initialize the recipe counter with the number of these recipes on switch
> initialization.
>
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Signed-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_common.c | 3 +++
> drivers/net/ethernet/intel/ice/ice_switch.c | 22 +++++++++++++++++++--
> drivers/net/ethernet/intel/ice/ice_trace.h | 18 +++++++++++++++++
> drivers/net/ethernet/intel/ice/ice_type.h | 2 ++
> 4 files changed, 43 insertions(+), 2 deletions(-)
>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
next prev parent reply other threads:[~2024-06-25 7:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 14:45 [PATCH iwl-next v2 0/7] Switch API optimizations Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 1/7] ice: Remove unused struct ice_prot_lkup_ext members Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 2/7] ice: Remove reading all recipes before adding a new one Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 3/7] ice: Simplify bitmap setting in adding recipe Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 4/7] ice: remove unused recipe bookkeeping data Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 5/7] ice: Optimize switch recipe creation Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 6/7] ice: Remove unused members from switch API Marcin Szycik
2024-06-24 14:45 ` [PATCH iwl-next v2 7/7] ice: Add tracepoint for adding and removing switch rules Marcin Szycik
2024-06-25 7:51 ` Przemek Kitszel [this message]
2024-06-25 8:31 ` [Intel-wired-lan] " Paul Menzel
2024-06-25 15:16 ` Marcin Szycik
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=e5a1c93d-243e-4c7f-8a61-aebf50b9e0bb@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=aleksander.lobakin@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=marcin.szycik@linux.intel.com \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@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).