|
|
bceef4 |
From 34c77d6902ee1df403dc3836b4092d413fb95350 Mon Sep 17 00:00:00 2001
|
|
|
bceef4 |
From: suresh2514 <suresh2514@gmail.com>
|
|
|
bceef4 |
Date: Fri, 14 Aug 2020 22:59:34 +0530
|
|
|
bceef4 |
Subject: [PATCH] [networking] remove 'ethtool -e' option for bnx2x NICs
|
|
|
bceef4 |
|
|
|
bceef4 |
Running EEPROM dump (ethtool -e) can result in bnx2x driver NICs to
|
|
|
bceef4 |
pause for few seconds and is not recommended in production environment.
|
|
|
bceef4 |
|
|
|
bceef4 |
Resolves: #2188
|
|
|
bceef4 |
Resolves: #2200
|
|
|
bceef4 |
|
|
|
bceef4 |
Signed-off-by: suresh2514 <suresh2514@gmail.com>
|
|
|
bceef4 |
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
|
|
|
bceef4 |
---
|
|
|
bceef4 |
sos/plugins/networking.py | 12 +++++++++++-
|
|
|
bceef4 |
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
bceef4 |
|
|
|
bceef4 |
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
|
|
|
bceef4 |
index ba9c0fb11..397549a56 100644
|
|
|
bceef4 |
--- a/sos/plugins/networking.py
|
|
|
bceef4 |
+++ b/sos/plugins/networking.py
|
|
|
bceef4 |
@@ -182,7 +182,6 @@ def setup(self):
|
|
|
bceef4 |
"ethtool -a " + eth,
|
|
|
bceef4 |
"ethtool -c " + eth,
|
|
|
bceef4 |
"ethtool -g " + eth,
|
|
|
bceef4 |
- "ethtool -e " + eth,
|
|
|
bceef4 |
"ethtool -P " + eth,
|
|
|
bceef4 |
"ethtool -l " + eth,
|
|
|
bceef4 |
"ethtool --phy-statistics " + eth,
|
|
|
bceef4 |
@@ -189,6 +189,17 @@ class Networking(Plugin):
|
|
|
bceef4 |
"ethtool --show-eee " + eth
|
|
|
bceef4 |
])
|
|
|
bceef4 |
|
|
|
bceef4 |
+ # skip EEPROM collection for 'bnx2x' NICs as this command
|
|
|
bceef4 |
+ # can pause the NIC and is not production safe.
|
|
|
bceef4 |
+ bnx_output = {
|
|
|
bceef4 |
+ "cmd": "ethtool -i %s" % eth,
|
|
|
bceef4 |
+ "output": "bnx2x"
|
|
|
bceef4 |
+ }
|
|
|
bceef4 |
+ bnx_pred = SoSPredicate(self,
|
|
|
bceef4 |
+ cmd_outputs=bnx_output,
|
|
|
bceef4 |
+ required={'cmd_outputs': 'none'})
|
|
|
bceef4 |
+ self.add_cmd_output("ethtool -e %s" % eth, pred=bnx_pred)
|
|
|
bceef4 |
+
|
|
|
bceef4 |
# Collect information about bridges (some data already collected via
|
|
|
bceef4 |
# "ip .." commands)
|
|
|
bceef4 |
self.add_cmd_output([
|