lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <PH0PR11MB5013ADBC44FCE9C7C091908D96DB2@PH0PR11MB5013.namprd11.prod.outlook.com>
Date: Tue, 9 Jul 2024 07:35:26 +0000
From: "Buvaneswaran, Sujai" <sujai.buvaneswaran@...el.com>
To: Marcin Szycik <marcin.szycik@...ux.intel.com>,
	"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>
CC: "pmenzel@...gen.mpg.de" <pmenzel@...gen.mpg.de>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>, "Lobakin, Aleksander"
	<aleksander.lobakin@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "michal.swiatkowski@...ux.intel.com"
	<michal.swiatkowski@...ux.intel.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v3 7/7] ice: Add tracepoint for
 adding and removing switch rules

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Marcin Szycik
> Sent: Thursday, June 27, 2024 8:26 PM
> To: intel-wired-lan@...ts.osuosl.org
> Cc: pmenzel@...gen.mpg.de; netdev@...r.kernel.org; Lobakin, Aleksander
> <aleksander.lobakin@...el.com>; Marcin Szycik
> <marcin.szycik@...ux.intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>; michal.swiatkowski@...ux.intel.com
> Subject: [Intel-wired-lan] [PATCH iwl-next v3 7/7] ice: Add tracepoint for
> adding and removing switch rules
> 
> 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.
> 
> Example configuration:
>   cd /sys/kernel/tracing
>   echo function > current_tracer
>   echo ice_aq_sw_rules > set_ftrace_filter
>   echo ice_aq_sw_rules > set_event
>   echo 1 > tracing_on
>   cat trace
> 
> Example output:
>   tc-4097    [069] ...1.   787.595536: ice_aq_sw_rules <-ice_rem_adv_rule
>   tc-4097    [069] .....   787.595705: ice_aq_sw_rules: rules=9 recipes=15
>   tc-4098    [057] ...1.   787.652033: ice_aq_sw_rules <-ice_add_adv_rule
>   tc-4098    [057] .....   787.652201: ice_aq_sw_rules: rules=10 recipes=16
> 
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
> Signed-off-by: Marcin Szycik <marcin.szycik@...ux.intel.com>
> 
> ---
> v3: Added example configuration and output
> ---
>  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(-)
> 
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ