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: <IA0PR11MB8419CB331AECAA4FBC593C13BD512@IA0PR11MB8419.namprd11.prod.outlook.com>
Date: Mon, 4 Nov 2024 05:42:45 +0000
From: "Pucha, HimasekharX Reddy" <himasekharx.reddy.pucha@...el.com>
To: "Damato, Joe" <jdamato@...tly.com>, "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>
CC: "Damato, Joe" <jdamato@...tly.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>, "David
 S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, "Jakub
 Kicinski" <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "moderated
 list:INTEL ETHERNET DRIVERS" <intel-wired-lan@...ts.osuosl.org>, open list
	<linux-kernel@...r.kernel.org>
Subject: RE: [Intel-wired-lan] [PATCH intel-next] ice: Add support for
 persistent NAPI config

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Joe Damato
> Sent: 22 October 2024 04:06
> To: netdev@...r.kernel.org
> Cc: Damato, Joe <jdamato@...tly.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>; Andrew Lunn <andrew+netdev@...n.ch>; David S. Miller <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@...ts.osuosl.org>; open list <linux-kernel@...r.kernel.org>
> Subject: [Intel-wired-lan] [PATCH intel-next] ice: Add support for persistent NAPI config
>
> Use netif_napi_add_config to assign persistent per-NAPI config when initializing NAPIs. This preserves NAPI config settings when queue counts are adjusted.
>
> Tested with an E810-2CQDA2 NIC.
>
> Begin by setting the queue count to 4:
>
> $ sudo ethtool -L eth4 combined 4
>
> Check the queue settings:
>
> $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
>                          --dump napi-get --json='{"ifindex": 4}'
> [{'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8452,
>   'ifindex': 4,
>   'irq': 2782},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8451,
>   'ifindex': 4,
>   'irq': 2781},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8450,
>   'ifindex': 4,
>   'irq': 2780},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8449,
>   'ifindex': 4,
>   'irq': 2779}]
>
> Now, set the queue with NAPI ID 8451 to have a gro-flush-timeout of
> 1111:
>
> $ sudo ./tools/net/ynl/cli.py \
>             --spec Documentation/netlink/specs/netdev.yaml \
>             --do napi-set --json='{"id": 8451, "gro-flush-timeout": 1111}'
> None
>
> Check that worked:
>
> $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
>                          --dump napi-get --json='{"ifindex": 4}'
> [{'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8452,
>   'ifindex': 4,
>   'irq': 2782},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 1111,
>   'id': 8451,
>   'ifindex': 4,
>   'irq': 2781},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8450,
>   'ifindex': 4,
>   'irq': 2780},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8449,
>   'ifindex': 4,
>   'irq': 2779}]
>
> Now reduce the queue count to 2, which would destroy the queue with NAPI ID 8451:
>
> $ sudo ethtool -L eth4 combined 2
>
> Check the queue settings, noting that NAPI ID 8451 is gone:
>
> $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
>                         --dump napi-get --json='{"ifindex": 4}'
> [{'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8450,
>   'ifindex': 4,
>   'irq': 2780},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8449,
>   'ifindex': 4,
>   'irq': 2779}]
>
> Now, increase the number of queues back to 4:
>
> $ sudo ethtool -L eth4 combined 4
>
> Dump the settings, expecting to see the same NAPI IDs as above and for NAPI ID 8451 to have its gro-flush-timeout set to 1111:
> 
> $ ./tools/net/ynl/cli.py --spec Documentation/netlink/specs/netdev.yaml \
>                          --dump napi-get --json='{"ifindex": 4}'
> [{'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8452,
>   'ifindex': 4,
>   'irq': 2782},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 1111,
>   'id': 8451,
>   'ifindex': 4,
>   'irq': 2781},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8450,
>   'ifindex': 4,
>   'irq': 2780},
>  {'defer-hard-irqs': 0,
>   'gro-flush-timeout': 0,
>   'id': 8449,
>   'ifindex': 4,
>   'irq': 2779}]
>
> Signed-off-by: Joe Damato <jdamato@...tly.com>
> ---
>  drivers/net/ethernet/intel/ice/ice_base.c | 3 ++-  drivers/net/ethernet/intel/ice/ice_lib.c  | 6 ++++--
>  2 files changed, 6 insertions(+), 3 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@...el.com> (A Contingent worker at Intel)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ