Blame SOURCES/0012-ethtool-Remove-UDP-Fragmentation-Offload-error-print.patch

4cc9fb
From b41605a9328686d45f6f4ee7791f476866bcc7a9 Mon Sep 17 00:00:00 2001
4cc9fb
From: Shaker Daibes <shakerd@mellanox.com>
4cc9fb
Date: Mon, 18 Sep 2017 10:35:38 +0300
4cc9fb
Subject: [PATCH 12/12] ethtool: Remove UDP Fragmentation Offload error prints
4cc9fb
4cc9fb
UFO was removed in kernel, here we remove UFO error prints when using
4cc9fb
"ethtool -k" command.
4cc9fb
4cc9fb
Fixes the following issue:
4cc9fb
Features for ens8:
4cc9fb
Cannot get device udp-fragmentation-offload settings: Operation not
4cc9fb
supported
4cc9fb
4cc9fb
Signed-off-by: Shaker Daibes <shakerd@mellanox.com>
4cc9fb
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
4cc9fb
Signed-off-by: John W. Linville <linville@tuxdriver.com>
4cc9fb
(cherry picked from commit d5d35d8331dee79a7453d3ea501bcc7b8b90582c)
4cc9fb
---
4cc9fb
 ethtool.c | 4 ++++
4cc9fb
 1 file changed, 4 insertions(+)
4cc9fb
4cc9fb
diff --git a/ethtool.c b/ethtool.c
4cc9fb
index 9650f54..1411d62 100644
4cc9fb
--- a/ethtool.c
4cc9fb
+++ b/ethtool.c
4cc9fb
@@ -2187,6 +2187,10 @@ get_features(struct cmd_context *ctx, const struct feature_defs *defs)
4cc9fb
 		eval.cmd = off_flag_def[i].get_cmd;
4cc9fb
 		err = send_ioctl(ctx, &eval);
4cc9fb
 		if (err) {
4cc9fb
+			if (errno == EOPNOTSUPP &&
4cc9fb
+			    off_flag_def[i].get_cmd == ETHTOOL_GUFO)
4cc9fb
+				continue;
4cc9fb
+
4cc9fb
 			fprintf(stderr,
4cc9fb
 				"Cannot get device %s settings: %m\n",
4cc9fb
 				off_flag_def[i].long_name);
4cc9fb
-- 
4cc9fb
1.8.3.1
4cc9fb