From ffa69a04be8ec4f4f82e862980eb456eadddb27c Mon Sep 17 00:00:00 2001 From: Susant Sahani Date: Tue, 19 Sep 2017 14:19:58 +0530 Subject: [PATCH] systemd-link: Add support to configure tx-tcp6-segmentation (#6859) closes #6854 tcp-segmentation-offload: off tx-tcp-segmentation: off tx-tcp-ecn-segmentation: off [fixed] tx-tcp-mangleid-segmentation: off tx-tcp6-segmentation: off <========================== --- man/systemd.link.xml | 8 ++++++++ src/udev/net/ethtool-util.c | 11 ++++++----- src/udev/net/ethtool-util.h | 1 + src/udev/net/link-config-gperf.gperf | 1 + 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/man/systemd.link.xml b/man/systemd.link.xml index 066bed126b8..99bb6a19fb0 100644 --- a/man/systemd.link.xml +++ b/man/systemd.link.xml @@ -490,6 +490,14 @@ TCP segmentation offload. Takes a boolean value. Defaults to "unset". + + + TCP6SegmentationOffload= + + The TCP6 Segmentation Offload (tx-tcp6-segmentation) when true enables + TCP6 segmentation offload. Takes a boolean value. + Defaults to "unset". + GenericSegmentationOffload= diff --git a/src/udev/net/ethtool-util.c b/src/udev/net/ethtool-util.c index 3e1481e4f7e..a5b87cf51a0 100644 --- a/src/udev/net/ethtool-util.c +++ b/src/udev/net/ethtool-util.c @@ -66,11 +66,12 @@ 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_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_UFO] = "tx-udp-fragmentation", + [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_UFO] = "tx-udp-fragmentation", }; int ethtool_connect(int *ret) { diff --git a/src/udev/net/ethtool-util.h b/src/udev/net/ethtool-util.h index 89c531ae081..909b56b1e68 100644 --- a/src/udev/net/ethtool-util.h +++ b/src/udev/net/ethtool-util.h @@ -53,6 +53,7 @@ typedef enum NetDevFeature { NET_DEV_FEAT_GRO, NET_DEV_FEAT_LRO, NET_DEV_FEAT_TSO, + NET_DEV_FEAT_TSO6, NET_DEV_FEAT_UFO, _NET_DEV_FEAT_MAX, _NET_DEV_FEAT_INVALID = -1 diff --git a/src/udev/net/link-config-gperf.gperf b/src/udev/net/link-config-gperf.gperf index 5488867ba71..52bb4775dd1 100644 --- a/src/udev/net/link-config-gperf.gperf +++ b/src/udev/net/link-config-gperf.gperf @@ -39,6 +39,7 @@ Link.WakeOnLan, config_parse_wol, 0, Link.Port, config_parse_port, 0, offsetof(link_config, port) Link.GenericSegmentationOffload, config_parse_tristate, 0, offsetof(link_config, features[NET_DEV_FEAT_GSO]) Link.TCPSegmentationOffload, config_parse_tristate, 0, offsetof(link_config, features[NET_DEV_FEAT_TSO]) +Link.TCP6SegmentationOffload, config_parse_tristate, 0, offsetof(link_config, features[NET_DEV_FEAT_TSO6]) Link.UDPSegmentationOffload, config_parse_tristate, 0, offsetof(link_config, features[NET_DEV_FEAT_UFO]) Link.GenericReceiveOffload, config_parse_tristate, 0, offsetof(link_config, features[NET_DEV_FEAT_GRO]) Link.LargeReceiveOffload, config_parse_tristate, 0, offsetof(link_config, features[NET_DEV_FEAT_LRO]) -- 2.47.3