All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Ido Schimmel <idosch@idosch.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	jiri@nvidia.com, danieller@nvidia.com, andrew@lunn.ch,
	f.fainelli@gmail.com, mlxsw@nvidia.com,
	Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes
Date: Mon, 12 Oct 2020 19:03:59 +0200	[thread overview]
Message-ID: <20201012170359.tmh5hgvgjuuigaio@lion.mk-sys.cz> (raw)
In-Reply-To: <20201010154119.3537085-2-idosch@idosch.org>

On Sat, Oct 10, 2020 at 06:41:14PM +0300, Ido Schimmel wrote:
> From: Danielle Ratson <danieller@nvidia.com>
> 
> Currently, when auto negotiation is on, the user can advertise all the
> linkmodes which correspond to a specific speed, but does not have a
> similar selector for the number of lanes. This is significant when a
> specific speed can be achieved using different number of lanes.  For
> example, 2x50 or 4x25.
> 
> Add 'ETHTOOL_A_LINKMODES_LANES' attribute and expand 'struct
> ethtool_link_settings' with lanes field in order to implement a new
> lanes-selector that will enable the user to advertise a specific number
> of lanes as well.
> 
> When auto negotiation is off, lanes parameter can be forced only if the
> driver supports it. Add a capability bit in 'struct ethtool_ops' that
> allows ethtool know if the driver can handle the lanes parameter when
> auto negotiation is off, so if it does not, an error message will be
> returned when trying to set lanes.
> 
> Example:
> 
> $ ethtool -s swp1 lanes 4
> $ ethtool swp1
>   Settings for swp1:
> 	Supported ports: [ FIBRE ]
>         Supported link modes:   1000baseKX/Full
>                                 10000baseKR/Full
>                                 40000baseCR4/Full
> 				40000baseSR4/Full
> 				40000baseLR4/Full
>                                 25000baseCR/Full
>                                 25000baseSR/Full
> 				50000baseCR2/Full
>                                 100000baseSR4/Full
> 				100000baseCR4/Full
>         Supported pause frame use: Symmetric Receive-only
>         Supports auto-negotiation: Yes
>         Supported FEC modes: Not reported
>         Advertised link modes:  40000baseCR4/Full
> 				40000baseSR4/Full
> 				40000baseLR4/Full
>                                 100000baseSR4/Full
> 				100000baseCR4/Full
>         Advertised pause frame use: No
>         Advertised auto-negotiation: Yes
>         Advertised FEC modes: Not reported
>         Speed: Unknown!
>         Duplex: Unknown! (255)
>         Auto-negotiation: on
>         Port: Direct Attach Copper
>         PHYAD: 0
>         Transceiver: internal
>         Link detected: no
> 
> Signed-off-by: Danielle Ratson <danieller@nvidia.com>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Ido Schimmel <idosch@nvidia.com>
> ---
[...]
>  static const struct link_mode_info link_mode_params[] = {
> -	__DEFINE_LINK_MODE_PARAMS(10, T, Half),
> -	__DEFINE_LINK_MODE_PARAMS(10, T, Full),
> -	__DEFINE_LINK_MODE_PARAMS(100, T, Half),
> -	__DEFINE_LINK_MODE_PARAMS(100, T, Full),
> -	__DEFINE_LINK_MODE_PARAMS(1000, T, Half),
> -	__DEFINE_LINK_MODE_PARAMS(1000, T, Full),
> +	__DEFINE_LINK_MODE_PARAMS(10, T, 1, Half),
> +	__DEFINE_LINK_MODE_PARAMS(10, T, 1, Full),
> +	__DEFINE_LINK_MODE_PARAMS(100, T, 1, Half),
> +	__DEFINE_LINK_MODE_PARAMS(100, T, 1, Full),
> +	__DEFINE_LINK_MODE_PARAMS(1000, T, 1, Half),
> +	__DEFINE_LINK_MODE_PARAMS(1000, T, 1, Full),

Technically, 4 may be more appropriate for 1000base-T, 2500base-T,
5000base-T and 10000base-T but it's probably just a formality. While
there is 1000base-T1, I'm not sure if we can expect a device which would
support e.g. both 1000base-T and 1000base-T1 (or some other colliding
combination of modes).

Michal

  parent reply	other threads:[~2020-10-12 17:04 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-10 15:41 [PATCH net-next 0/6] Support setting lanes via ethtool Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 1/6] ethtool: Extend link modes settings uAPI with lanes Ido Schimmel
2020-10-11 22:37   ` Jakub Kicinski
2020-10-12 15:33     ` Danielle Ratson
2020-10-12 15:58       ` Jakub Kicinski
2020-10-13 14:29         ` Danielle Ratson
2020-10-13 15:43           ` Jakub Kicinski
2020-10-16 22:15           ` Andrew Lunn
2020-10-19  7:19             ` Danielle Ratson
2020-10-19 11:04               ` Michal Kubecek
2020-10-19 12:26                 ` Jiri Pirko
2020-10-19 13:24                   ` Michal Kubecek
2020-10-20  7:39                     ` Danielle Ratson
2020-10-21  7:08                       ` Michal Kubecek
2020-10-21  7:20                         ` Danielle Ratson
2020-10-21  8:47                           ` Michal Kubecek
2020-10-22  6:15                             ` Danielle Ratson
2020-10-22 16:27                               ` Michal Kubecek
2020-11-23  9:47                                 ` Danielle Ratson
2020-11-24 22:12                                   ` Michal Kubecek
2020-11-25 10:35                                     ` Danielle Ratson
2020-11-26 21:07                                       ` Michal Kubecek
2020-12-01 17:22                                         ` Danielle Ratson
2020-12-02  0:52                                           ` Edwin Peer
2020-12-02  1:17                                           ` Edwin Peer
2020-10-19 12:24             ` Jiri Pirko
2020-10-19 12:38               ` Andrew Lunn
2020-10-12 16:40       ` Michal Kubecek
2020-10-12 19:10     ` Johannes Berg
2020-10-12 20:08       ` Jakub Kicinski
2020-10-12 17:03   ` Michal Kubecek [this message]
2020-11-19 20:38   ` Edwin Peer
2020-11-23  9:40     ` Jiri Pirko
2020-11-30 17:01       ` Edwin Peer
2020-11-30 17:14         ` Jiri Pirko
2020-11-30 18:00           ` Edwin Peer
2020-12-01 11:22             ` Jiri Pirko
2020-12-02  0:32               ` Edwin Peer
2020-12-02 10:09                 ` Jiri Pirko
2020-12-02 17:53                   ` Edwin Peer
2020-10-10 15:41 ` [PATCH net-next 2/6] ethtool: Expose the number of lanes in use Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 3/6] mlxsw: ethtool: Remove max lanes filtering Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 4/6] mlxsw: ethtool: Add support for setting lanes when autoneg is off Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 5/6] mlxsw: ethtool: Expose the number of lanes in use Ido Schimmel
2020-10-10 15:41 ` [PATCH net-next 6/6] net: selftests: Add lanes setting test Ido Schimmel

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=20201012170359.tmh5hgvgjuuigaio@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=andrew@lunn.ch \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@idosch.org \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.