diff mbox series

[ethtool,v2,2/2] ethtool: use "Not reported" when no FEC modes are provided

Message ID 20200727224937.9185-2-jacob.e.keller@intel.com
State Accepted
Delegated to: Michal Kubecek
Headers show
Series [ethtool,v2,1/2] ethtool: fix netlink bitmasks when sent as NOMASK | expand

Commit Message

Keller, Jacob E July 27, 2020, 10:49 p.m. UTC
When displaying the FEC link modes advertised by the peer, we used the
string "No" to indicate when nothing was provided. This does not match
the IOCTL output which indicates "Not reported". It also doesn't match
the local advertised FEC modes, which also used the "Not reported"
string.

This is especially confusing for FEC, because the FEC bits include
a "None" bit which indicates that FEC is definitely not supported. Avoid
this confusion and match both the local advertised settings display and
the old IOCTL output by using "Not reported" when FEC settings aren't
reported.

Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 netlink/settings.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Kubecek July 30, 2020, 7:32 p.m. UTC | #1
On Mon, Jul 27, 2020 at 03:49:37PM -0700, Jacob Keller wrote:
> When displaying the FEC link modes advertised by the peer, we used the
> string "No" to indicate when nothing was provided. This does not match
> the IOCTL output which indicates "Not reported". It also doesn't match
> the local advertised FEC modes, which also used the "Not reported"
> string.
> 
> This is especially confusing for FEC, because the FEC bits include
> a "None" bit which indicates that FEC is definitely not supported. Avoid
> this confusion and match both the local advertised settings display and
> the old IOCTL output by using "Not reported" when FEC settings aren't
> reported.
> 
> Reported-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>

Applied with

  Fixes: 10cc3ea337d1 ("netlink: partial netlink handler for gset (no option)")

Michal

> ---
>  netlink/settings.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/netlink/settings.c b/netlink/settings.c
> index 66b0d4892cdd..726259d83702 100644
> --- a/netlink/settings.c
> +++ b/netlink/settings.c
> @@ -481,7 +481,7 @@ static int dump_peer_modes(struct nl_context *nlctx, const struct nlattr *attr)
>  
>  	ret = dump_link_modes(nlctx, attr, false, LM_CLASS_FEC,
>  			      "Link partner advertised FEC modes: ",
> -			      " ", "\n", "No");
> +			      " ", "\n", "Not reported");
>  	return ret;
>  }
>  
> -- 
> 2.26.2
>
diff mbox series

Patch

diff --git a/netlink/settings.c b/netlink/settings.c
index 66b0d4892cdd..726259d83702 100644
--- a/netlink/settings.c
+++ b/netlink/settings.c
@@ -481,7 +481,7 @@  static int dump_peer_modes(struct nl_context *nlctx, const struct nlattr *attr)
 
 	ret = dump_link_modes(nlctx, attr, false, LM_CLASS_FEC,
 			      "Link partner advertised FEC modes: ",
-			      " ", "\n", "No");
+			      " ", "\n", "Not reported");
 	return ret;
 }