Skip to contentSkip to conversation

Patch "ethtool: do not print warning for applications using legacy API" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 13, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ethtool: do not print warning for applications using legacy API

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ethtool-do-not-print-warning-for-applications-using-legacy-api.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Sat Jan 13 10:51:19 CET 2018

From: Stephen Hemminger <[email protected]>
Date: Fri, 29 Dec 2017 10:02:52 -0800
Subject: ethtool: do not print warning for applications using legacy API

From: Stephen Hemminger <[email protected]>

[ Upstream commit 71891e2dab6b55a870f8f7735e44a2963860b5c6 ]

In kernel log ths message appears on every boot:
"warning: `NetworkChangeNo' uses legacy ethtool link settings API,
link modes are only partially reported"

When ethtool link settings API changed, it started complaining about usages of old API. Ironically, the original patch was from google but the application using the legacy API is chrome.

Linux ABI is fixed as much as possible. The kernel must not break it and should not complain about applications using legacy API's. This patch just removes the warning since using legacy API's in Linux is perfectly acceptable.

Fixes 3f1ac7a700d0 ("net: ethtool: add new ETHTOOL_xLINKSETTINGS API")
---
 net/core/ethtool.c |   15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)
net/core/ethtool.c +2 -13
@@ -742,15 +742,6 @@ static int ethtool_set_link_ksettings(st
 	return dev->ethtool_ops->set_link_ksettings(dev, &link_ksettings);
 }
 
-static void
-warn_incomplete_ethtool_legacy_settings_conversion(const char *details)
-{
-	char name[sizeof(current->comm)];
-
-	pr_info_once("warning: `%s' uses legacy ethtool link settings API, %s\n",
-		     get_task_comm(name, current), details);
-}
-
 /* Query device for its ethtool_cmd settings.
  *
  * Backward compatibility note: for compatibility with legacy ethtool,
@@ -777,10 +768,8 @@ static int ethtool_get_settings(struct n
 							   &link_ksettings);
 		if (err < 0)
 			return err;
-		if (!convert_link_ksettings_to_legacy_settings(&cmd,
-							       &link_ksettings))
-			warn_incomplete_ethtool_legacy_settings_conversion(
-				"link modes are only partially reported");
+		convert_link_ksettings_to_legacy_settings(&cmd,
+							  &link_ksettings);
 
 		/* send a sensible cmd tag back to user */
 		cmd.cmd = ETHTOOL_GSET;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ethtool-do-not-print-warning-for-applications-using-legacy-api.patch