diff mbox series

[v2,ethtool] ethtool: Remove UDP Fragmentation Offload error prints

Message ID 1505720138-14416-1-git-send-email-tariqt@mellanox.com
State Accepted, archived
Delegated to: John Linville
Headers show
Series [v2,ethtool] ethtool: Remove UDP Fragmentation Offload error prints | expand

Commit Message

Tariq Toukan Sept. 18, 2017, 7:35 a.m. UTC
From: Shaker Daibes <shakerd@mellanox.com>

UFO was removed in kernel, here we remove UFO error prints when using
"ethtool -k" command.

Fixes the following issue:
Features for ens8:
Cannot get device udp-fragmentation-offload settings: Operation not
supported

Signed-off-by: Shaker Daibes <shakerd@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
---
 ethtool.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/ethtool.c b/ethtool.c
index ad18704e7c5f..aeeef65e7ef3 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -2186,6 +2186,10 @@  get_features(struct cmd_context *ctx, const struct feature_defs *defs)
 		eval.cmd = off_flag_def[i].get_cmd;
 		err = send_ioctl(ctx, &eval);
 		if (err) {
+			if (errno == EOPNOTSUPP &&
+			    off_flag_def[i].get_cmd == ETHTOOL_GUFO)
+				continue;
+
 			fprintf(stderr,
 				"Cannot get device %s settings: %m\n",
 				off_flag_def[i].long_name);