netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] ethtool: do not print warning for applications using legacy API
@ 2017-12-29 18:02 Stephen Hemminger
  2017-12-31  3:56 ` David Decotigny
  2018-01-03  2:50 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2017-12-29 18:02 UTC (permalink / raw)
  To: davem, David Decotigny; +Cc: netdev, linux-kernel, Stephen Hemminger

From: Stephen Hemminger <stephen@networkplumber.org>

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 <stephen@networkplumber.org>
---
 net/core/ethtool.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index f8fcf450a36e..8225416911ae 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net] ethtool: do not print warning for applications using legacy API
  2017-12-29 18:02 [PATCH net] ethtool: do not print warning for applications using legacy API Stephen Hemminger
@ 2017-12-31  3:56 ` David Decotigny
  2018-01-03  2:50 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Decotigny @ 2017-12-31  3:56 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David S. Miller, netdev, linux-kernel

Signed-off-by: David Decotigny <decot@googlers.com>


On Fri, Dec 29, 2017 at 10:02 AM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> From: Stephen Hemminger <stephen@networkplumber.org>
>
> 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 <stephen@networkplumber.org>
> ---
>  net/core/ethtool.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> index f8fcf450a36e..8225416911ae 100644
> --- a/net/core/ethtool.c
> +++ b/net/core/ethtool.c
> @@ -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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] ethtool: do not print warning for applications using legacy API
  2017-12-29 18:02 [PATCH net] ethtool: do not print warning for applications using legacy API Stephen Hemminger
  2017-12-31  3:56 ` David Decotigny
@ 2018-01-03  2:50 ` David Miller
  2018-01-03 15:19   ` Stephen Hemminger
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2018-01-03  2:50 UTC (permalink / raw)
  To: stephen; +Cc: decot, netdev, linux-kernel

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Fri, 29 Dec 2017 10:02:52 -0800

> From: Stephen Hemminger <stephen@networkplumber.org>
> 
> 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...

> 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 <stephen@networkplumber.org>

Applied and queued up for -stable.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net] ethtool: do not print warning for applications using legacy API
  2018-01-03  2:50 ` David Miller
@ 2018-01-03 15:19   ` Stephen Hemminger
  0 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2018-01-03 15:19 UTC (permalink / raw)
  To: David Miller; +Cc: decot, netdev, linux-kernel

On Tue, 02 Jan 2018 21:50:02 -0500 (EST)
David Miller <davem@davemloft.net> wrote:

> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Fri, 29 Dec 2017 10:02:52 -0800
> 
> > From: Stephen Hemminger <stephen@networkplumber.org>
> > 
> > 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...

I did report a bug to chrome team as well.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-03 15:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-29 18:02 [PATCH net] ethtool: do not print warning for applications using legacy API Stephen Hemminger
2017-12-31  3:56 ` David Decotigny
2018-01-03  2:50 ` David Miller
2018-01-03 15:19   ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).