Dear community,
we are using Suricata 6.0.19 (soon 6.0.20) on Debian 11 (bullseye) from custom-built Debian packages based on official Debian’s packaging but updated with current sources so we can have current 6.x versions.
Recently we are looking at a setup that involves a 48-core machine with Intel E810-C NICs, among others. Here are some details:
$ sudo lspci | grep 41
41:00.0 Ethernet controller: Intel Corporation Ethernet Controller E810-C for QSFP (rev 02)
41:00.1 Ethernet controller: Intel Corporation Ethernet Controller E810-C for QSFP (rev 02)
$ sudo ethtool --driver S2
driver: ice
version: 5.10.0-28-amd64
firmware-version: 4.30 0x8001bcf8 1.3429.0
expansion-rom-version:
bus-info: 0000:41:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes
In order to handle the incoming traffic (>10Gb) we would like to use RSS and cluster_qm
to balance incoming flows across 22 threads, so we followed the docs and configured the interface like this:
ethtool -L S2 combined 22
ethtool -X S2 hkey 6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A:6D:5A equal $QUEUES
ethtool -K S2 rxhash on
ethtool -K S2 ntuple on
for i in rx tx tso gso gro lro tx-nocache-copy sg txvlan rxvlan; do ethtool -K S2 $i off; done
for proto in tcp4 udp4 tcp6 udp6; do ethtool -N S2 rx-flow-hash $proto sdfn; done
ethtool -C S2 adaptive-rx off rx-usecs 62
ethtool -G S2 rx 512
ethtool -X S2 hfunc toeplitz
/usr/local/bin/set_irq_affinity 1-22 S2
which are accepted and configure the flow hashing correctly (as far as I can see):
$ sudo ethtool -l S2
Channel parameters for S2:
Pre-set maximums:
RX: 48
TX: 48
Other: 1
Combined: 48
Current hardware settings:
RX: 0
TX: 0
Other: 1
Combined: 22
$ sudo ethtool --show-rxfh S2
RX flow hash indirection table for S2 with 22 RX ring(s):
0: 0 1 2 3 4 5 6 7
8: 8 9 10 11 12 13 14 15
16: 16 17 18 19 20 21 0 1
24: 2 3 4 5 6 7 8 9
[...]
936: 12 13 14 15 16 17 18 19
944: 20 21 0 1 2 3 4 5
952: 6 7 8 9 10 11 12 13
960: 14 15 16 17 18 19 20 21
968: 0 1 2 3 4 5 6 7
976: 8 9 10 11 12 13 14 15
984: 16 17 18 19 20 21 0 1
992: 2 3 4 5 6 7 8 9
1000: 10 11 12 13 14 15 16 17
1008: 18 19 20 21 0 1 2 3
1016: 4 5 6 7 8 9 10 11
1024: 12 13 14 15 16 17 18 19
1032: 20 21 0 1 2 3 4 5
1040: 6 7 8 9 10 11 12 13
1048: 14 15 16 17 18 19 20 21
1056: 0 1 2 3 4 5 6 7
1064: 8 9 10 11 12 13 14 15
1072: 16 17 18 19 20 21 0 1
1080: 2 3 4 5 6 7 8 9
1088: 10 11 12 13 14 15 16 17
1096: 18 19 20 21 0 1 2 3
1104: 4 5 6 7 8 9 10 11
1112: 12 13 14 15 16 17 18 19
1120: 20 21 0 1 2 3 4 5
1128: 6 7 8 9 10 11 12 13
1136: 14 15 16 17 18 19 20 21
1144: 0 1 2 3 4 5 6 7
1152: 8 9 10 11 12 13 14 15
1160: 16 17 18 19 20 21 0 1
1168: 2 3 4 5 6 7 8 9
1176: 10 11 12 13 14 15 16 17
1184: 18 19 20 21 0 1 2 3
1192: 4 5 6 7 8 9 10 11
1200: 12 13 14 15 16 17 18 19
1208: 20 21 0 1 2 3 4 5
1216: 6 7 8 9 10 11 12 13
1224: 14 15 16 17 18 19 20 21
1232: 0 1 2 3 4 5 6 7
1240: 8 9 10 11 12 13 14 15
1248: 16 17 18 19 20 21 0 1
1256: 2 3 4 5 6 7 8 9
1264: 10 11 12 13 14 15 16 17
1272: 18 19 20 21 0 1 2 3
1280: 4 5 6 7 8 9 10 11
1288: 12 13 14 15 16 17 18 19
1296: 20 21 0 1 2 3 4 5
1304: 6 7 8 9 10 11 12 13
1312: 14 15 16 17 18 19 20 21
1320: 0 1 2 3 4 5 6 7
1328: 8 9 10 11 12 13 14 15
1336: 16 17 18 19 20 21 0 1
1344: 2 3 4 5 6 7 8 9
1352: 10 11 12 13 14 15 16 17
1360: 18 19 20 21 0 1 2 3
1368: 4 5 6 7 8 9 10 11
1376: 12 13 14 15 16 17 18 19
1384: 20 21 0 1 2 3 4 5
1392: 6 7 8 9 10 11 12 13
1400: 14 15 16 17 18 19 20 21
1408: 0 1 2 3 4 5 6 7
1416: 8 9 10 11 12 13 14 15
1424: 16 17 18 19 20 21 0 1
1432: 2 3 4 5 6 7 8 9
1440: 10 11 12 13 14 15 16 17
1448: 18 19 20 21 0 1 2 3
1456: 4 5 6 7 8 9 10 11
1464: 12 13 14 15 16 17 18 19
1472: 20 21 0 1 2 3 4 5
1480: 6 7 8 9 10 11 12 13
1488: 14 15 16 17 18 19 20 21
1496: 0 1 2 3 4 5 6 7
1504: 8 9 10 11 12 13 14 15
1512: 16 17 18 19 20 21 0 1
1520: 2 3 4 5 6 7 8 9
1528: 10 11 12 13 14 15 16 17
1536: 18 19 20 21 0 1 2 3
1544: 4 5 6 7 8 9 10 11
1552: 12 13 14 15 16 17 18 19
1560: 20 21 0 1 2 3 4 5
1568: 6 7 8 9 10 11 12 13
1576: 14 15 16 17 18 19 20 21
1584: 0 1 2 3 4 5 6 7
1592: 8 9 10 11 12 13 14 15
1600: 16 17 18 19 20 21 0 1
1608: 2 3 4 5 6 7 8 9
1616: 10 11 12 13 14 15 16 17
1624: 18 19 20 21 0 1 2 3
1632: 4 5 6 7 8 9 10 11
1640: 12 13 14 15 16 17 18 19
1648: 20 21 0 1 2 3 4 5
1656: 6 7 8 9 10 11 12 13
1664: 14 15 16 17 18 19 20 21
1672: 0 1 2 3 4 5 6 7
1680: 8 9 10 11 12 13 14 15
1688: 16 17 18 19 20 21 0 1
1696: 2 3 4 5 6 7 8 9
1704: 10 11 12 13 14 15 16 17
1712: 18 19 20 21 0 1 2 3
1720: 4 5 6 7 8 9 10 11
1728: 12 13 14 15 16 17 18 19
1736: 20 21 0 1 2 3 4 5
1744: 6 7 8 9 10 11 12 13
1752: 14 15 16 17 18 19 20 21
1760: 0 1 2 3 4 5 6 7
1768: 8 9 10 11 12 13 14 15
1776: 16 17 18 19 20 21 0 1
1784: 2 3 4 5 6 7 8 9
1792: 10 11 12 13 14 15 16 17
1800: 18 19 20 21 0 1 2 3
1808: 4 5 6 7 8 9 10 11
1816: 12 13 14 15 16 17 18 19
1824: 20 21 0 1 2 3 4 5
1832: 6 7 8 9 10 11 12 13
1840: 14 15 16 17 18 19 20 21
1848: 0 1 2 3 4 5 6 7
1856: 8 9 10 11 12 13 14 15
1864: 16 17 18 19 20 21 0 1
1872: 2 3 4 5 6 7 8 9
1880: 10 11 12 13 14 15 16 17
1888: 18 19 20 21 0 1 2 3
1896: 4 5 6 7 8 9 10 11
1904: 12 13 14 15 16 17 18 19
1912: 20 21 0 1 2 3 4 5
1920: 6 7 8 9 10 11 12 13
1928: 14 15 16 17 18 19 20 21
1936: 0 1 2 3 4 5 6 7
1944: 8 9 10 11 12 13 14 15
1952: 16 17 18 19 20 21 0 1
1960: 2 3 4 5 6 7 8 9
1968: 10 11 12 13 14 15 16 17
1976: 18 19 20 21 0 1 2 3
1984: 4 5 6 7 8 9 10 11
1992: 12 13 14 15 16 17 18 19
2000: 20 21 0 1 2 3 4 5
2008: 6 7 8 9 10 11 12 13
2016: 14 15 16 17 18 19 20 21
2024: 0 1 2 3 4 5 6 7
2032: 8 9 10 11 12 13 14 15
2040: 16 17 18 19 20 21 0 1
RSS hash key:
6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a:6d:5a
RSS hash function:
toeplitz: on
xor: off
crc32: off
Suricata is configured to use the queues to receive and feed its workers:
af-packet:
- interface: S2
cluster-id: 95
cluster-type: cluster_qm
threads: 22
defrag: no
use-mmap: yes
mmap-locked: yes
tpacket-v3: yes
rollover: no
use-emergency-flush: yes
ring-size: 200000
block-size: 4194304
irqbalance
is disabled.
However, we only see one queue being filled with packets:
$ cat /proc/interrupts | grep S2
358: 2 30997486 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080769-edge ice-S2-TxRx-0
359: 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080770-edge ice-S2-TxRx-1
360: 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080771-edge ice-S2-TxRx-2
361: 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080772-edge ice-S2-TxRx-3
362: 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080773-edge ice-S2-TxRx-4
363: 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080774-edge ice-S2-TxRx-5
364: 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-M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IR-PCI-MSI 34080783-edge ice-S2-TxRx-14
373: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080784-edge ice-S2-TxRx-15
374: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080785-edge ice-S2-TxRx-16
375: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080786-edge ice-S2-TxRx-17
376: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080787-edge ice-S2-TxRx-18
377: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080788-edge ice-S2-TxRx-19
378: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080789-edge ice-S2-TxRx-20
379: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 IR-PCI-MSI 34080790-edge ice-S2-TxRx-21
$ sudo ethtool -S S2
NIC statistics:
rx_unicast: 9620668884
tx_unicast: 0
rx_multicast: 0
tx_multicast: 0
rx_broadcast: 0
tx_broadcast: 0
rx_bytes: 4740939939827
tx_bytes: 0
rx_dropped: 2423536194
rx_unknown_protocol: 0
rx_alloc_fail: 0
rx_pg_alloc_fail: 0
rx_gro_dropped: 0
tx_errors: 0
tx_linearize: 0
tx_busy: 0
tx_restart: 0
tx_queue_0_packets: 0
tx_queue_0_bytes: 0
tx_queue_1_packets: 0
tx_queue_1_bytes: 0
tx_queue_2_packets: 0
tx_queue_2_bytes: 0
tx_queue_3_packets: 0
tx_queue_3_bytes: 0
tx_queue_4_packets: 0
tx_queue_4_bytes: 0
tx_queue_5_packets: 0
tx_queue_5_bytes: 0
tx_queue_6_packets: 0
tx_queue_6_bytes: 0
tx_queue_7_packets: 0
tx_queue_7_bytes: 0
tx_queue_8_packets: 0
tx_queue_8_bytes: 0
tx_queue_9_packets: 0
tx_queue_9_bytes: 0
tx_queue_10_packets: 0
tx_queue_10_bytes: 0
tx_queue_11_packets: 0
tx_queue_11_bytes: 0
tx_queue_12_packets: 0
tx_queue_12_bytes: 0
tx_queue_13_packets: 0
tx_queue_13_bytes: 0
tx_queue_14_packets: 0
tx_queue_14_bytes: 0
tx_queue_15_packets: 0
tx_queue_15_bytes: 0
tx_queue_16_packets: 0
tx_queue_16_bytes: 0
tx_queue_17_packets: 0
tx_queue_17_bytes: 0
tx_queue_18_packets: 0
tx_queue_18_bytes: 0
tx_queue_19_packets: 0
tx_queue_19_bytes: 0
tx_queue_20_packets: 0
tx_queue_20_bytes: 0
tx_queue_21_packets: 0
tx_queue_21_bytes: 0
rx_queue_0_packets: 7197132596
rx_queue_0_bytes: 3520334819668
rx_queue_1_packets: 0
rx_queue_1_bytes: 0
rx_queue_2_packets: 0
rx_queue_2_bytes: 0
rx_queue_3_packets: 0
rx_queue_3_bytes: 0
rx_queue_4_packets: 0
rx_queue_4_bytes: 0
rx_queue_5_packets: 0
rx_queue_5_bytes: 0
rx_queue_6_packets: 0
rx_queue_6_bytes: 0
rx_queue_7_packets: 0
rx_queue_7_bytes: 0
rx_queue_8_packets: 0
rx_queue_8_bytes: 0
rx_queue_9_packets: 0
rx_queue_9_bytes: 0
rx_queue_10_packets: 0
rx_queue_10_bytes: 0
rx_queue_11_packets: 0
rx_queue_11_bytes: 0
rx_queue_12_packets: 0
rx_queue_12_bytes: 0
rx_queue_13_packets: 0
rx_queue_13_bytes: 0
rx_queue_14_packets: 0
rx_queue_14_bytes: 0
rx_queue_15_packets: 0
rx_queue_15_bytes: 0
rx_queue_16_packets: 0
rx_queue_16_bytes: 0
rx_queue_17_packets: 0
rx_queue_17_bytes: 0
rx_queue_18_packets: 0
rx_queue_18_bytes: 0
rx_queue_19_packets: 0
rx_queue_19_bytes: 0
rx_queue_20_packets: 0
rx_queue_20_bytes: 0
rx_queue_21_packets: 0
rx_queue_21_bytes: 0
rx_bytes.nic: 9046705927373
tx_bytes.nic: 0
rx_unicast.nic: 18393137976
tx_unicast.nic: 0
rx_multicast.nic: 0
tx_multicast.nic: 0
rx_broadcast.nic: 0
tx_broadcast.nic: 0
tx_errors.nic: 0
tx_timeout.nic: 0
rx_size_64.nic: 0
tx_size_64.nic: 0
rx_size_127.nic: 10744343323
tx_size_127.nic: 0
rx_size_255.nic: 1322854237
tx_size_255.nic: 0
rx_size_511.nic: 579743433
tx_size_511.nic: 0
rx_size_1023.nic: 952646762
tx_size_1023.nic: 0
rx_size_1522.nic: 2552097960
tx_size_1522.nic: 0
rx_size_big.nic: 2241452267
tx_size_big.nic: 0
link_xon_rx.nic: 0
link_xon_tx.nic: 0
link_xoff_rx.nic: 0
link_xoff_tx.nic: 0
tx_dropped_link_down.nic: 0
rx_undersize.nic: 0
rx_fragments.nic: 0
rx_oversize.nic: 0
rx_jabber.nic: 0
rx_csum_bad.nic: 0
rx_length_errors.nic: 0
rx_dropped.nic: 158
rx_crc_errors.nic: 17246
illegal_bytes.nic: 24
mac_local_faults.nic: 0
mac_remote_faults.nic: 0
fdir_sb_match.nic: 0
fdir_sb_status.nic: 1
tx_priority_0_xon.nic: 0
tx_priority_0_xoff.nic: 0
tx_priority_1_xon.nic: 0
tx_priority_1_xoff.nic: 0
tx_priority_2_xon.nic: 0
tx_priority_2_xoff.nic: 0
tx_priority_3_xon.nic: 0
tx_priority_3_xoff.nic: 0
tx_priority_4_xon.nic: 0
tx_priority_4_xoff.nic: 0
tx_priority_5_xon.nic: 0
tx_priority_5_xoff.nic: 0
tx_priority_6_xon.nic: 0
tx_priority_6_xoff.nic: 0
tx_priority_7_xon.nic: 0
tx_priority_7_xoff.nic: 0
rx_priority_0_xon.nic: 0
rx_priority_0_xoff.nic: 0
rx_priority_1_xon.nic: 0
rx_priority_1_xoff.nic: 0
rx_priority_2_xon.nic: 0
rx_priority_2_xoff.nic: 0
rx_priority_3_xon.nic: 0
rx_priority_3_xoff.nic: 0
rx_priority_4_xon.nic: 0
rx_priority_4_xoff.nic: 0
rx_priority_5_xon.nic: 0
rx_priority_5_xoff.nic: 0
rx_priority_6_xon.nic: 0
rx_priority_6_xoff.nic: 0
rx_priority_7_xon.nic: 0
rx_priority_7_xoff.nic: 0
Any ideas?