Re: [Intel-wired-lan] [PATCH iwl-next, v2 1/1] igc: Add wildcard rule support to ethtool NFC using Default Queue
On Thursday, June 19, 2025 11:49 PM, Brett Creeley wrote: >On 6/19/2025 8:37 AM, Song Yoong Siang wrote: >> diff --git a/drivers/net/ethernet/intel/igc/igc.h >b/drivers/net/ethernet/intel/igc/igc.h >> index 1525ae25fd3e..c580ecc954be 100644 >> --- a/drivers/net/ethernet/intel/igc/igc.h >> +++ b/drivers/net/ethernet/intel/igc/igc.h >> @@ -406,10 +406,6 @@ extern char igc_driver_name[]; >> #define IGC_FLAG_RSS_FIELD_IPV4_UDPBIT(6) >> #define IGC_FLAG_RSS_FIELD_IPV6_UDPBIT(7) >> >> -#define IGC_MRQC_ENABLE_RSS_MQ 0x0002 >> -#define IGC_MRQC_RSS_FIELD_IPV4_UDP0x0040 >> -#define IGC_MRQC_RSS_FIELD_IPV6_UDP0x0080 >> - > >Small nit, but moving these fields seems like a separate patch since >moving them isn't part of the wildcard rule changes. > >Thanks, > >Brett Hi Brett, Thanks for reviewing the patch. No problem, I can split the patch into two and submit v3. Thanks & Regards Siang
Re: [Intel-wired-lan] [PATCH iwl-next, v2 1/1] igc: Add wildcard rule support to ethtool NFC using Default Queue
On Thu Jun 19 2025, Song Yoong Siang wrote: > Introduce support for a lowest priority wildcard (catch-all) rule in > ethtool's Network Flow Classification (NFC) for the igc driver. The > wildcard rule directs all unmatched network traffic, including traffic not > captured by Receive Side Scaling (RSS), to a specified queue. This > functionality utilizes the Default Queue feature available in I225/I226 > hardware. > > The implementation has been validated on Intel ADL-S systems with two > back-to-back connected I226 network interfaces. > > Testing Procedure: > 1. On the Device Under Test (DUT), verify the initial statistic: >$ ethtool -S enp1s0 | grep rx_q.*packets > rx_queue_0_packets: 0 > rx_queue_1_packets: 0 > rx_queue_2_packets: 0 > rx_queue_3_packets: 0 > > 2. From the Link Partner, send 10 ARP packets: >$ arping -c 10 -I enp170s0 169.254.1.2 > > 3. On the DUT, verify the packet reception on Queue 0: >$ ethtool -S enp1s0 | grep rx_q.*packets > rx_queue_0_packets: 10 > rx_queue_1_packets: 0 > rx_queue_2_packets: 0 > rx_queue_3_packets: 0 > > 4. On the DUT, add a wildcard rule to route all packets to Queue 3: >$ sudo ethtool -N enp1s0 flow-type ether queue 3 > > 5. From the Link Partner, send another 10 ARP packets: >$ arping -c 10 -I enp170s0 169.254.1.2 > > 6. Now, packets are routed to Queue 3 by the wildcard (Default Queue) rule: >$ ethtool -S enp1s0 | grep rx_q.*packets > rx_queue_0_packets: 10 > rx_queue_1_packets: 0 > rx_queue_2_packets: 0 > rx_queue_3_packets: 10 > > 7. On the DUT, add a EtherType rule to route ARP packet to Queue 1: >$ sudo ethtool -N enp1s0 flow-type ether proto 0x0806 queue 1 > > 8. From the Link Partner, send another 10 ARP packets: >$ arping -c 10 -I enp170s0 169.254.1.2 > > 9. Now, packets are routed to Queue 1 by the EtherType rule because it is >higher priority than the wildcard (Default Queue) rule: >$ ethtool -S enp1s0 | grep rx_q.*packets > rx_queue_0_packets: 10 > rx_queue_1_packets: 10 > rx_queue_2_packets: 0 > rx_queue_3_packets: 10 > > 10. On the DUT, delete all the NFC rules: > $ sudo ethtool -N enp1s0 delete 63 > $ sudo ethtool -N enp1s0 delete 64 > > 11. From the Link Partner, send another 10 ARP packets: > $ arping -c 10 -I enp170s0 169.254.1.2 > > 12. Now, packets are routed to Queue 0 because the value of Default Queue > is reset back to 0: > $ ethtool -S enp1s0 | grep rx_q.*packets > rx_queue_0_packets: 20 > rx_queue_1_packets: 10 > rx_queue_2_packets: 0 > rx_queue_3_packets: 10 > > Co-developed-by: Blanco Alcaine Hector > Signed-off-by: Blanco Alcaine Hector > Signed-off-by: Song Yoong Siang Reviewed-by: Kurt Kanzenbach signature.asc Description: PGP signature
Re: [Intel-wired-lan] [PATCH iwl-next, v2 1/1] igc: Add wildcard rule support to ethtool NFC using Default Queue
On Friday, June 20, 2025 3:46 PM, Kurt Kanzenbach wrote: >On Thu Jun 19 2025, Song Yoong Siang wrote: >> Introduce support for a lowest priority wildcard (catch-all) rule in >> ethtool's Network Flow Classification (NFC) for the igc driver. The >> wildcard rule directs all unmatched network traffic, including traffic not >> captured by Receive Side Scaling (RSS), to a specified queue. This >> functionality utilizes the Default Queue feature available in I225/I226 >> hardware. >> >> The implementation has been validated on Intel ADL-S systems with two >> back-to-back connected I226 network interfaces. >> >> Testing Procedure: >> 1. On the Device Under Test (DUT), verify the initial statistic: >>$ ethtool -S enp1s0 | grep rx_q.*packets >> rx_queue_0_packets: 0 >> rx_queue_1_packets: 0 >> rx_queue_2_packets: 0 >> rx_queue_3_packets: 0 >> >> 2. From the Link Partner, send 10 ARP packets: >>$ arping -c 10 -I enp170s0 169.254.1.2 >> >> 3. On the DUT, verify the packet reception on Queue 0: >>$ ethtool -S enp1s0 | grep rx_q.*packets >> rx_queue_0_packets: 10 >> rx_queue_1_packets: 0 >> rx_queue_2_packets: 0 >> rx_queue_3_packets: 0 >> >> 4. On the DUT, add a wildcard rule to route all packets to Queue 3: >>$ sudo ethtool -N enp1s0 flow-type ether queue 3 >> >> 5. From the Link Partner, send another 10 ARP packets: >>$ arping -c 10 -I enp170s0 169.254.1.2 >> >> 6. Now, packets are routed to Queue 3 by the wildcard (Default Queue) rule: >>$ ethtool -S enp1s0 | grep rx_q.*packets >> rx_queue_0_packets: 10 >> rx_queue_1_packets: 0 >> rx_queue_2_packets: 0 >> rx_queue_3_packets: 10 >> >> 7. On the DUT, add a EtherType rule to route ARP packet to Queue 1: >>$ sudo ethtool -N enp1s0 flow-type ether proto 0x0806 queue 1 >> >> 8. From the Link Partner, send another 10 ARP packets: >>$ arping -c 10 -I enp170s0 169.254.1.2 >> >> 9. Now, packets are routed to Queue 1 by the EtherType rule because it is >>higher priority than the wildcard (Default Queue) rule: >>$ ethtool -S enp1s0 | grep rx_q.*packets >> rx_queue_0_packets: 10 >> rx_queue_1_packets: 10 >> rx_queue_2_packets: 0 >> rx_queue_3_packets: 10 >> >> 10. On the DUT, delete all the NFC rules: >> $ sudo ethtool -N enp1s0 delete 63 >> $ sudo ethtool -N enp1s0 delete 64 >> >> 11. From the Link Partner, send another 10 ARP packets: >> $ arping -c 10 -I enp170s0 169.254.1.2 >> >> 12. Now, packets are routed to Queue 0 because the value of Default Queue >> is reset back to 0: >> $ ethtool -S enp1s0 | grep rx_q.*packets >> rx_queue_0_packets: 20 >> rx_queue_1_packets: 10 >> rx_queue_2_packets: 0 >> rx_queue_3_packets: 10 >> >> Co-developed-by: Blanco Alcaine Hector >> Signed-off-by: Blanco Alcaine Hector >> Signed-off-by: Song Yoong Siang > >Reviewed-by: Kurt Kanzenbach Hi Kurt Kanzenbach, Thank you for reviewing the patch. Brett Creeley points out a nit to have separate patch to move following macros from igc.h to igc_defines.h. #define IGC_MRQC_ENABLE_RSS_MQ 0x0002 #define IGC_MRQC_RSS_FIELD_IPV4_UDP0x0040 #define IGC_MRQC_RSS_FIELD_IPV6_UDP0x0080 I plan to split this patch into two, then submit v3 patchset with your reviewed-by tag on both patches. Is this sound good to you? Thanks & Regards Siang
Re: [Intel-wired-lan] [PATCH iwl-next, v2 1/1] igc: Add wildcard rule support to ethtool NFC using Default Queue
On 6/19/2025 8:37 AM, Song Yoong Siang wrote: Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Introduce support for a lowest priority wildcard (catch-all) rule in ethtool's Network Flow Classification (NFC) for the igc driver. The wildcard rule directs all unmatched network traffic, including traffic not captured by Receive Side Scaling (RSS), to a specified queue. This functionality utilizes the Default Queue feature available in I225/I226 hardware. The implementation has been validated on Intel ADL-S systems with two back-to-back connected I226 network interfaces. Testing Procedure: 1. On the Device Under Test (DUT), verify the initial statistic: $ ethtool -S enp1s0 | grep rx_q.*packets rx_queue_0_packets: 0 rx_queue_1_packets: 0 rx_queue_2_packets: 0 rx_queue_3_packets: 0 2. From the Link Partner, send 10 ARP packets: $ arping -c 10 -I enp170s0 169.254.1.2 3. On the DUT, verify the packet reception on Queue 0: $ ethtool -S enp1s0 | grep rx_q.*packets rx_queue_0_packets: 10 rx_queue_1_packets: 0 rx_queue_2_packets: 0 rx_queue_3_packets: 0 4. On the DUT, add a wildcard rule to route all packets to Queue 3: $ sudo ethtool -N enp1s0 flow-type ether queue 3 5. From the Link Partner, send another 10 ARP packets: $ arping -c 10 -I enp170s0 169.254.1.2 6. Now, packets are routed to Queue 3 by the wildcard (Default Queue) rule: $ ethtool -S enp1s0 | grep rx_q.*packets rx_queue_0_packets: 10 rx_queue_1_packets: 0 rx_queue_2_packets: 0 rx_queue_3_packets: 10 7. On the DUT, add a EtherType rule to route ARP packet to Queue 1: $ sudo ethtool -N enp1s0 flow-type ether proto 0x0806 queue 1 8. From the Link Partner, send another 10 ARP packets: $ arping -c 10 -I enp170s0 169.254.1.2 9. Now, packets are routed to Queue 1 by the EtherType rule because it is higher priority than the wildcard (Default Queue) rule: $ ethtool -S enp1s0 | grep rx_q.*packets rx_queue_0_packets: 10 rx_queue_1_packets: 10 rx_queue_2_packets: 0 rx_queue_3_packets: 10 10. On the DUT, delete all the NFC rules: $ sudo ethtool -N enp1s0 delete 63 $ sudo ethtool -N enp1s0 delete 64 11. From the Link Partner, send another 10 ARP packets: $ arping -c 10 -I enp170s0 169.254.1.2 12. Now, packets are routed to Queue 0 because the value of Default Queue is reset back to 0: $ ethtool -S enp1s0 | grep rx_q.*packets rx_queue_0_packets: 20 rx_queue_1_packets: 10 rx_queue_2_packets: 0 rx_queue_3_packets: 10 Co-developed-by: Blanco Alcaine Hector Signed-off-by: Blanco Alcaine Hector Signed-off-by: Song Yoong Siang --- V2: - use Ethtool wildcard rule instead of extra uAPI (Jakub Kicinski & Jacob Keller) - combine MRQC register definitions into a single location (Kurt Kanzenbach) - use FIELD_PREP (Kurt Kanzenbach) - use RCT rule (Wojciech Drewek) - no need brackets for single line code (Wojciech Drewek) - use imperative mood in commit message (Marcin Szycik) - ensure igc_ prefix in function name (Marcin Szycik) V1: https://patchwork.ozlabs.org/project/intel-wired-lan/cover/[email protected]/ --- drivers/net/ethernet/intel/igc/igc.h | 15 ++--- drivers/net/ethernet/intel/igc/igc_defines.h | 4 drivers/net/ethernet/intel/igc/igc_ethtool.c | 18 drivers/net/ethernet/intel/igc/igc_main.c| 22 4 files changed, 52 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index 1525ae25fd3e..c580ecc954be 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -406,10 +406,6 @@ extern char igc_driver_name[]; #define IGC_FLAG_RSS_FIELD_IPV4_UDPBIT(6) #define IGC_FLAG_RSS_FIELD_IPV6_UDPBIT(7) -#define IGC_MRQC_ENABLE_RSS_MQ 0x0002 -#define IGC_MRQC_RSS_FIELD_IPV4_UDP0x0040 -#define IGC_MRQC_RSS_FIELD_IPV6_UDP0x0080 - Small nit, but moving these fields seems like a separate patch since moving them isn't part of the wildcard rule changes. Thanks, Brett /* RX-desc Write-Back format RSS Type's */ enum igc_rss_type_num { IGC_RSS_TYPE_NO_HASH= 0, @@ -635,6 +631,7 @@ enum igc_filter_match_flags { IGC_FILTER_FLAG_DST_MAC_ADDR = BIT(3), IGC_FILTER_FLAG_USER_DATA = BIT(4), IGC_FILTER_FLAG_VLAN_ETYPE =BIT(5), + IGC_FILTER_FLAG_DEFAULT_QUEUE = BIT(6), };
