public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/netifrc:master commit in: net/, doc/
Date: Mon,  5 Apr 2021 20:00:39 +0000 (UTC)	[thread overview]
Message-ID: <1616884442.b8373edc844297fb54333ffab69d0cd0a7b5e0b8.robbat2@OpenRC> (raw)

commit:     b8373edc844297fb54333ffab69d0cd0a7b5e0b8
Author:     Maciej S. Szmigiero <mail <AT> maciej <DOT> szmigiero <DOT> name>
AuthorDate: Sat Mar 27 22:32:35 2021 +0000
Commit:     Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Mar 27 22:34:02 2021 +0000
URL:        https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=b8373edc

net/ethtool.sh: add "eee" and "tunable" setting operations

This adds an ability to set "eee" and "tunable" ethtool parameters of a
network interface.

Signed-off-by: Maciej S. Szmigiero <mail <AT> maciej.szmigiero.name>

 doc/net.example.Linux.in | 12 +++++++++---
 net/ethtool.sh           |  4 ++--
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in
index 3bd2ee1..b2c0f82 100644
--- a/doc/net.example.Linux.in
+++ b/doc/net.example.Linux.in
@@ -1275,12 +1275,18 @@
 #ethtool_pause_eth0="autoneg off
 #rx on tx on"
 
+# Enable Energy-Efficient Ethernet
+#ethtool_eee_eth0="eee on"
+
 # Enable adaptive RX and TX coalescing
 #ethtool_coalesce_eth0="adaptive-rx on adaptive-tx on"
 
 # Change ring buffer settings
 #ethtool_ring_eth0=""
 
+# Set RX copy-break at 1500 bytes
+#ethtool_tunable_eth0="rx-copybreak 1500"
+
 # Enable all offload settings
 #ethtool_offload_eth0="rx on tx on sg on tso on ufo on gso on gro on lro on"
 
@@ -1309,13 +1315,13 @@
 
 # Additionally, there is a special control variable, if you need to change the
 # order of option processing. The default order is:
-# flash change-eeprom change pause coalesce ring offload identify nfc rxfh-indir ntuple
+# flash change-eeprom change pause eee coalesce ring offload tunable identify nfc rxfh-indir ntuple
 
 # Set global order to default
-#ethtool_order="flash change-eeprom change pause coalesce ring offload identify nfc rxfh-indir ntuple"
+#ethtool_order="flash change-eeprom change pause eee coalesce ring offload tunable identify nfc rxfh-indir ntuple"
 
 # Hypothetical network card that requires a change-eeprom toggle to enable flashing
-#ethtool_order_eth0="change-eeprom flash change pause coalesce ring offload nfc rxfh-indir ntuple"
+#ethtool_order_eth0="change-eeprom flash change pause eee coalesce ring offload tunable nfc rxfh-indir ntuple"
 
 #-----------------------------------------------------------------------------
 # Firewalld support

diff --git a/net/ethtool.sh b/net/ethtool.sh
index 57c98f7..0bcceff 100644
--- a/net/ethtool.sh
+++ b/net/ethtool.sh
@@ -17,7 +17,7 @@ ethtool_pre_start() {
 	local order opt OFS="${OIFS}"
 	eval order=\$ethtool_order_${IFVAR}
 	[ -z "${order}" ] && eval order=\$ethtool_order
-	[ -z "${order}" ] && order="flash change-eeprom change pause coalesce ring offload identify nfc rxfh-indir ntuple"
+	[ -z "${order}" ] && order="flash change-eeprom change pause eee coalesce ring offload tunable identify nfc rxfh-indir ntuple"
 	# ethtool options not used: --driver, --register-dump, --eeprom-dump, --negotiate, --test, --statistics
 	eindent
 	for opt in ${order} ; do
@@ -36,7 +36,7 @@ ethtool_pre_start() {
 			local args_pretty="$(_trim "${p}")"
 			# Do nothing if empty
 			[ -z "${args_pretty}" ] && continue
-			[ "${opt}" = "ring" ] && opt="set-ring"
+			[ "${opt}" = "eee" -o "${opt}" = "ring" -o "${opt}" = "tunable" ] && opt="set-${opt}"
 			args_pretty="--${opt} $IFACE ${args_pretty}"
 			args="--${opt} $IFACE ${args}"
 			ebegin "ethtool ${args_pretty}"


             reply	other threads:[~2021-04-05 20:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 20:00 Robin H. Johnson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-07  9:42 [gentoo-commits] proj/netifrc:master commit in: net/, doc/ Sam James
2023-11-25  4:54 Robin H. Johnson
2021-04-05 20:00 Robin H. Johnson
2021-01-18 12:33 Lars Wendler
2021-01-05 14:27 Lars Wendler
2020-06-02 21:54 Robin H. Johnson
2020-05-31 23:21 Robin H. Johnson
2019-04-21  4:11 Robin H. Johnson
2015-11-08 14:30 Robin H. Johnson
2015-11-08 14:30 Robin H. Johnson
2013-08-28 16:02 Robin H. Johnson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1616884442.b8373edc844297fb54333ffab69d0cd0a7b5e0b8.robbat2@OpenRC \
    --to=robbat2@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox