netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Andrew Lunn <andrew@lunn.ch>, Michal Kubecek <mkubecek@suse.cz>
Cc: Jamie Gloudon <jamie.gloudon@gmx.fr>, netdev@vger.kernel.org
Subject: Re: Broken link partner advertised reporting in ethtool
Date: Mon, 27 Jul 2020 14:18:19 -0700	[thread overview]
Message-ID: <6bc49b72-5698-ef93-9be1-a40e34be8803@intel.com> (raw)
In-Reply-To: <20200727210141.GA1705504@lunn.ch>



On 7/27/2020 2:01 PM, Andrew Lunn wrote:
> Here are the netlink messages.
> 
> sending genetlink packet (32 bytes):
>     msg length 32 genl-ctrl
>     CTRL_CMD_GETFAMILY
>         CTRL_ATTR_FAMILY_NAME = "ethtool"
> ...
> ...
> sending genetlink packet (36 bytes):
>     msg length 36 ethool ETHTOOL_MSG_LINKMODES_GET
>     ETHTOOL_MSG_LINKMODES_GET
>         ETHTOOL_A_LINKMODES_HEADER
>             ETHTOOL_A_HEADER_DEV_NAME = "green"
> received genetlink packet (572 bytes):
>     msg length 572 ethool ETHTOOL_MSG_LINKMODES_GET_REPLY
>     ETHTOOL_MSG_LINKMODES_GET_REPLY
>         ETHTOOL_A_LINKMODES_HEADER
>             ETHTOOL_A_HEADER_DEV_INDEX = 8
>             ETHTOOL_A_HEADER_DEV_NAME = "green"
>         ETHTOOL_A_LINKMODES_AUTONEG = on
>         ETHTOOL_A_LINKMODES_OURS
>             ETHTOOL_A_BITSET_SIZE = 90
>             ETHTOOL_A_BITSET_BITS
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 0
>                     ETHTOOL_A_BITSET_BIT_NAME = "10baseT/Half"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 1
>                     ETHTOOL_A_BITSET_BIT_NAME = "10baseT/Full"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 2
>                     ETHTOOL_A_BITSET_BIT_NAME = "100baseT/Half"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 3
>                     ETHTOOL_A_BITSET_BIT_NAME = "100baseT/Full"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 5
>                     ETHTOOL_A_BITSET_BIT_NAME = "1000baseT/Full"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 6
>                     ETHTOOL_A_BITSET_BIT_NAME = "Autoneg"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 7
>                     ETHTOOL_A_BITSET_BIT_NAME = "TP"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 9
>                     ETHTOOL_A_BITSET_BIT_NAME = "MII"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 13
>                     ETHTOOL_A_BITSET_BIT_NAME = "Pause"
>                     ETHTOOL_A_BITSET_BIT_VALUE = true
>         ETHTOOL_A_LINKMODES_PEER
>             ETHTOOL_A_BITSET_NOMASK = true
>             ETHTOOL_A_BITSET_SIZE = 90
>             ETHTOOL_A_BITSET_BITS
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 0
>                     ETHTOOL_A_BITSET_BIT_NAME = "10baseT/Half"
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 1
>                     ETHTOOL_A_BITSET_BIT_NAME = "10baseT/Full"
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 2
>                     ETHTOOL_A_BITSET_BIT_NAME = "100baseT/Half"
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 3
>                     ETHTOOL_A_BITSET_BIT_NAME = "100baseT/Full"
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 5
>                     ETHTOOL_A_BITSET_BIT_NAME = "1000baseT/Full"
>                 ETHTOOL_A_BITSET_BITS_BIT
>                     ETHTOOL_A_BITSET_BIT_INDEX = 6
>                     ETHTOOL_A_BITSET_BIT_NAME = "Autoneg"
>         ETHTOOL_A_LINKMODES_SPEED = 1000
>         ETHTOOL_A_LINKMODES_DUPLEX = 1

Based on the netlink contents here it looks like a bug at
netlink/settings.c:357, where we check for ETHTOOL_A_BITSET_BIT_VALUE,
but these aren't sent when you send the bitset using a individual
BIT_INDEX/BIT_NAME like this. I think that's a bug.

I'm working up a simple to verify this and if my suspicion is confirmed
I can write up a patch.

Thanks,
Jake

      parent reply	other threads:[~2020-07-27 21:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 15:47 Broken link partner advertised reporting in ethtool Jamie Gloudon
2020-07-27 19:19 ` Jacob Keller
2020-07-27 20:09   ` Jamie Gloudon
2020-07-27 20:42     ` Michal Kubecek
2020-07-27 21:01       ` Andrew Lunn
2020-07-27 21:08         ` Michal Kubecek
2020-07-27 21:25           ` Andrew Lunn
2020-07-27 21:30             ` Jacob Keller
2020-07-27 21:42             ` Jacob Keller
2020-07-27 21:27           ` Jacob Keller
2020-07-27 22:00             ` Michal Kubecek
2020-07-27 22:15               ` Jacob Keller
2020-07-27 21:18         ` Jacob Keller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6bc49b72-5698-ef93-9be1-a40e34be8803@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew@lunn.ch \
    --cc=jamie.gloudon@gmx.fr \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).