]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: increase transmit/receive queues size to 16384 (#41289)
authorWalter McKelvie <git@waltmckelvie.com>
Wed, 25 Mar 2026 10:37:31 +0000 (06:37 -0400)
committerGitHub <noreply@github.com>
Wed, 25 Mar 2026 10:37:31 +0000 (11:37 +0100)
A 10G Marvell AQC113 included in an ASRock TRX50WS motherboard NIC claims to
support tx/rx queues as large as 8184.

After boot 'ethtool -g eth0' outputs:
  Ring parameters for eth0:
  RX: 8184
  RX Mini: n/a
  RX Jumbo: n/a
  TX: 8184
  TX push buff len: n/a
  HDS thresh: n/a
  RX: 2048
  RX Mini: n/a
  RX Jumbo: n/a
  TX: 4096
  RX Buf Len: n/a
  CQE Size: n/a
  TX Push: off
  RX Push: off
  TX push buff len: n/a
  TCP data split: n/a
  HDS thresh: n/a

'ethtool --set-ring eth0 rx 8184 tx 8184 && ethtool -g eth0' yields:
  Ring parameters for eth0:
  RX: 8184
  RX Mini: n/a
  RX Jumbo: n/a
  TX: 8184
  TX push buff len: n/a
  HDS thresh: n/a
  RX: 8184
  RX Mini: n/a
  RX Jumbo: n/a
  TX: 8184
  RX Buf Len: n/a
  CQE Size: n/a
  TX Push: off
  RX Push: off
  TX push buff len: n/a
  TCP data split: n/a
  HDS thresh: n/a

I can measure a throughput difference between using using buffer sizes
4096 and 8184 on my hardware, so it really seems that this is doing
something beyond buggy firmware.

Original PR https://github.com/systemd/systemd/pull/17635 didn't give any
explanation for the limit of 4096, but that's probably what was supported by
the kernel drivers at the time.

A web search shows that CISCO VIC 15000 supports 16k, so allow up to that.

[zjs: edited the message]

man/systemd.link.xml
src/udev/net/link-config.c

index 602f19b60030cbfc7d1192ddf0e75a59d77048ca..d26431b2b2bbe11b1aed3dc6f31fe10afe75dee6 100644 (file)
       <varlistentry>
         <term><varname>TransmitQueues=</varname></term>
         <listitem>
-          <para>Specifies the device's number of transmit queues. An integer in the range 1…4096.
+          <para>Specifies the device's number of transmit queues. An integer in the range 1…16384.
           When unset, the kernel's default will be used.</para>
 
           <xi:include href="version-info.xml" xpointer="v248"/>
       <varlistentry>
         <term><varname>ReceiveQueues=</varname></term>
         <listitem>
-          <para>Specifies the device's number of receive queues. An integer in the range 1…4096.
+          <para>Specifies the device's number of receive queues. An integer in the range 1…16384.
           When unset, the kernel's default will be used.</para>
 
           <xi:include href="version-info.xml" xpointer="v248"/>
index eefa95dc5f68dae684b4fd0cfad0f1d9fe6b3190..704a38831e13df8b2e89e2d26151d39a178de19f 100644 (file)
@@ -1271,7 +1271,7 @@ int config_parse_rx_tx_queues(
                 log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse %s=, ignoring assignment: %s.", lvalue, rvalue);
                 return 0;
         }
-        if (k == 0 || k > 4096) {
+        if (k == 0 || k > 16384) {
                 log_syntax(unit, LOG_WARNING, filename, line, 0, "Invalid %s=, ignoring assignment: %s.", lvalue, rvalue);
                 return 0;
         }