]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
link: Add support for rx-gro-hw nic feature 20484/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 19 Aug 2021 12:44:35 +0000 (13:44 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 20 Aug 2021 08:15:02 +0000 (09:15 +0100)
man/systemd.link.xml
src/shared/ethtool-util.c
src/shared/ethtool-util.h
src/udev/net/link-config-gperf.gperf
test/fuzz/fuzz-link-parser/directives.link

index 6d8dcb9af762beb7b04e37526f0af326bb998e0f..638a1522cd3875fa7ec8539b586e807b5f9baef6 100644 (file)
           When unset, the kernel's default will be used.</para>
         </listitem>
       </varlistentry>
+      <varlistentry>
+        <term><varname>GenericReceiveOffloadHardware=</varname></term>
+        <listitem>
+          <para>Takes a boolean. If set to true, hardware accelerated Generic Receive Offload (GRO) is
+          enabled. When unset, the kernel's default will be used.</para>
+        </listitem>
+      </varlistentry>
       <varlistentry>
         <term><varname>LargeReceiveOffload=</varname></term>
         <listitem>
index 25dc2ba490a19fc43cfe6aee58954fcc8c431eb0..c47d819f059683c75dc7bdf32bb6c3663cf90133 100644 (file)
@@ -70,13 +70,14 @@ DEFINE_STRING_TABLE_LOOKUP(port, NetDevPort);
 DEFINE_CONFIG_PARSE_ENUM(config_parse_port, port, NetDevPort, "Failed to parse Port setting");
 
 static const char* const netdev_feature_table[_NET_DEV_FEAT_MAX] = {
-        [NET_DEV_FEAT_RX]   = "rx-checksum",
-        [NET_DEV_FEAT_TX]   = "tx-checksum-", /* The suffix "-" means any feature beginning with "tx-checksum-" */
-        [NET_DEV_FEAT_GSO]  = "tx-generic-segmentation",
-        [NET_DEV_FEAT_GRO]  = "rx-gro",
-        [NET_DEV_FEAT_LRO]  = "rx-lro",
-        [NET_DEV_FEAT_TSO]  = "tx-tcp-segmentation",
-        [NET_DEV_FEAT_TSO6] = "tx-tcp6-segmentation",
+        [NET_DEV_FEAT_RX]     = "rx-checksum",
+        [NET_DEV_FEAT_TX]     = "tx-checksum-", /* The suffix "-" means any feature beginning with "tx-checksum-" */
+        [NET_DEV_FEAT_GSO]    = "tx-generic-segmentation",
+        [NET_DEV_FEAT_GRO]    = "rx-gro",
+        [NET_DEV_FEAT_GRO_HW] = "rx-gro-hw",
+        [NET_DEV_FEAT_LRO]    = "rx-lro",
+        [NET_DEV_FEAT_TSO]    = "tx-tcp-segmentation",
+        [NET_DEV_FEAT_TSO6]   = "tx-tcp6-segmentation",
 };
 
 static const char* const ethtool_link_mode_bit_table[] = {
index f1f2a191133bca6c97633a6450679c4ec5527cba..6e180995055b7df6abe6faa32b89c51c38b07d1b 100644 (file)
@@ -23,6 +23,7 @@ typedef enum NetDevFeature {
         NET_DEV_FEAT_TX,
         NET_DEV_FEAT_GSO,
         NET_DEV_FEAT_GRO,
+        NET_DEV_FEAT_GRO_HW,
         NET_DEV_FEAT_LRO,
         NET_DEV_FEAT_TSO,
         NET_DEV_FEAT_TSO6,
index f800de838665d8f144cb8a124cb125782cdb70e5..44b46cb17c0bd3e2d472d858c0ada9d971cd24c6 100644 (file)
@@ -57,6 +57,7 @@ Link.TCPSegmentationOffload,              config_parse_tristate,
 Link.TCP6SegmentationOffload,             config_parse_tristate,                 0,                             offsetof(LinkConfig, features[NET_DEV_FEAT_TSO6])
 Link.UDPSegmentationOffload,              config_parse_warn_compat,              DISABLED_LEGACY,               0
 Link.GenericReceiveOffload,               config_parse_tristate,                 0,                             offsetof(LinkConfig, features[NET_DEV_FEAT_GRO])
+Link.GenericReceiveOffloadHardware,       config_parse_tristate,                 0,                             offsetof(LinkConfig, features[NET_DEV_FEAT_GRO_HW])
 Link.LargeReceiveOffload,                 config_parse_tristate,                 0,                             offsetof(LinkConfig, features[NET_DEV_FEAT_LRO])
 Link.RxChannels,                          config_parse_ring_buffer_or_channel,   0,                             offsetof(LinkConfig, channels.rx)
 Link.TxChannels,                          config_parse_ring_buffer_or_channel,   0,                             offsetof(LinkConfig, channels.tx)
index 5f232ce698cc64c9e17b8c534ae2f5cca22685af..b5cffb1a271fb365932d5dd545086d84daeb111f 100644 (file)
@@ -36,6 +36,7 @@ TCPSegmentationOffload=
 TCP6SegmentationOffload=
 UDPSegmentationOffload=
 GenericReceiveOffload=
+GenericReceiveOffloadHardware=
 LargeReceiveOffload=
 RxChannels=
 TxChannels=