ethtool: do not print warning for applications using legacy API
Subsystems (2)
PATCH 1/1 ethtool: do not print warning for applications using legacy API
From: Stephen Hemminger <[email protected]>
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.
--- net/core/ethtool.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)
net/core/ethtool.c +2 -13
@@ -770,15 +770,6 @@ static int ethtool_set_link_ksettings(struct net_device *dev,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,
@@ -805,10 +796,8 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr) &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 ;
Signature · 1 line
2.11.0
Quoted 57 lines · Stephen Hemminger
From: Stephen Hemminger <[email protected]>
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")Signed-off-by Stephen Hemminger <[email protected]>--- net/core/ethtool.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-)net/core/ethtool.c +2
-14@@ -770,15 +770,6 @@ static int ethtool_set_link_ksettings(struct net_device *dev,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, @@ -805,10 +796,8 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr) &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 ; --2.11.0
David Miller
maintainerFrom: Stephen Hemminger <[email protected]>
Date: Fri, 29 Dec 2017 10:02:52 -0800
Quoted 9 lines
From: Stephen Hemminger <[email protected]>
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.
Chrome on my machine doesn't do this, FWIW...
Quoted 7 lines
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")Signed-off-by Stephen Hemminger <[email protected]>
Applied and queued up for -stable.
Quoted 9 lines · On Tue, 02 Jan 2018 21:50:02 -0500 (EST) David Miller <[email protected]>…
From: Stephen Hemminger <[email protected]>
Date: Fri, 29 Dec 2017 10:02:52 -0800Quoted 6 lines
From: Stephen Hemminger <[email protected]>
In kernel log ths message appears on every boot:
"warning: `NetworkChangeNo' uses legacy ethtool link settings API,
link modes are only partially reported"
Quoted 5 lines
Quoted 3 lines
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.
Chrome on my machine doesn't do this, FWIW...
I did report a bug to chrome team as well.