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

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