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

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