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-next>] [day] [month] [year] [list]
Message-Id: <20240730012212.775814-1-yoong.siang.song@intel.com>
Date: Tue, 30 Jul 2024 09:22:12 +0800
From: Song Yoong Siang <yoong.siang.song@...el.com>
To: Tony Nguyen <anthony.l.nguyen@...el.com>,
	"David S . Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>,
	Richard Cochran <richardcochran@...il.com>,
	Alexei Starovoitov <ast@...nel.org>,
	Daniel Borkmann <daniel@...earbox.net>,
	Jesper Dangaard Brouer <hawk@...nel.org>,
	John Fastabend <john.fastabend@...il.com>,
	Vinicius Costa Gomes <vinicius.gomes@...el.com>,
	Jonathan Corbet <corbet@....net>,
	Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	Shinas Rasheed <srasheed@...vell.com>,
	Kevin Tian <kevin.tian@...el.com>,
	Brett Creeley <brett.creeley@....com>,
	Blanco Alcaine Hector <hector.blanco.alcaine@...el.com>,
	Joshua Hay <joshua.a.hay@...el.com>,
	Sasha Neftin <sasha.neftin@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org,
	netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	bpf@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: [PATCH iwl-next,v1 0/3] Add Default Rx Queue Setting for igc driver

This patch set introduces the support to configure default Rx queue during runtime.
A new sysfs attribute "default_rx_queue" has been added, allowing users to check
and modify the default Rx queue.

This patch set is tested on two back-to-back connected i226 on Intel ADL-S systems.

Test Steps and expected results:
1. Check default_rx_queue index:
   @DUT: $ cat /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/default_rx_queue
         0

2. Check statistic of Rx packets:
   @DUT: $ ethtool -S enp2s0 | grep rx.*packets
         rx_packets: 0
         rx_queue_0_packets: 0
         rx_queue_1_packets: 0
         rx_queue_2_packets: 0
         rx_queue_3_packets: 0

3. Send 10 ARP packets:
   @LinkPartner: $ arping -c 10 -I enp170s0 169.254.1.10
                 ARPING 169.254.1.10 from 169.254.1.2 enp170s0
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.725ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.649ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.577ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.611ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.706ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.644ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.648ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.601ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.628ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.641ms
                 Sent 10 probes (1 broadcast(s))
                 Received 10 response(s)

4. Check statistic of Rx packets to make sure packets is received by default queue (RxQ0):
   @DUT: $ ethtool -S enp2s0 | grep rx.*packets
         rx_packets: 10
         rx_queue_0_packets: 10
         rx_queue_1_packets: 0
         rx_queue_2_packets: 0
         rx_queue_3_packets: 0

5. Change default_rx_queue index to Queue 3:
   @DUT: $ echo 3 | sudo tee /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/default_rx_queue
         3
   @DUT: $ cat /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/default_rx_queue
         3

6. Send 10 ARP packets:
   @LinkPartner: $ arping -c 10 -I enp170s0 169.254.1.10
                 ARPING 169.254.1.10 from 169.254.1.2 enp170s0
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.653ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.652ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.653ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.649ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.600ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.698ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.694ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.678ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.609ms
                 Unicast reply from 169.254.1.10 [00:A0:C9:00:00:00]  0.634ms
                 Sent 10 probes (1 broadcast(s))
                 Received 10 response(s)

7. Check statistic of Rx packets to make sure packets is received by new default queue (RxQ3):
   @DUT: $ ethtool -S enp2s0 | grep rx.*packets
         rx_packets: 20
         rx_queue_0_packets: 10
         rx_queue_1_packets: 0
         rx_queue_2_packets: 0
         rx_queue_3_packets: 10

Blanco Alcaine Hector (3):
  igc: Add documentation
  igc: Add default Rx queue configuration via sysfs
  igc: Add default Rx Queue into documentation

 .../device_drivers/ethernet/index.rst         |   1 +
 .../device_drivers/ethernet/intel/igc.rst     | 103 ++++++++++++
 drivers/net/ethernet/intel/igc/Makefile       |   3 +-
 drivers/net/ethernet/intel/igc/igc_main.c     |   6 +
 drivers/net/ethernet/intel/igc/igc_regs.h     |   6 +
 drivers/net/ethernet/intel/igc/igc_sysfs.c    | 156 ++++++++++++++++++
 drivers/net/ethernet/intel/igc/igc_sysfs.h    |  10 ++
 7 files changed, 284 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/networking/device_drivers/ethernet/intel/igc.rst
 create mode 100644 drivers/net/ethernet/intel/igc/igc_sysfs.c
 create mode 100644 drivers/net/ethernet/intel/igc/igc_sysfs.h

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ