All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edwin Peer <edwin.peer@broadcom.com>
To: Danielle Ratson <danieller@mellanox.com>
Cc: netdev <netdev@vger.kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@nvidia.com>,
	Andrew Lunn <andrew@lunn.ch>,
	f.fainelli@gmail.com, Michal Kubecek <mkubecek@suse.cz>,
	mlxsw <mlxsw@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
	Danielle Ratson <danieller@nvidia.com>
Subject: Re: [PATCH net-next repost v2 0/7] Support setting lanes via ethtool
Date: Thu, 7 Jan 2021 09:36:03 -0800	[thread overview]
Message-ID: <CAKOOJTx=Cz1yCDxCC3AmroQUd=zHmw0NH1eCGVNd6u4PfBjR_Q@mail.gmail.com> (raw)
In-Reply-To: <20210106130622.2110387-1-danieller@mellanox.com>

[-- Attachment #1: Type: text/plain, Size: 3413 bytes --]

I still don't think it is appropriate for the UAPI to be defined in
terms of lanes. I would prefer to see it defined in terms of signal
modulation (for which multiple could conceivably exist for a given
lane configuration, even though no such ambiguity exists for today's
defined modes). Better still would be to define the UAPI in terms of
the absolute link mode enum index (with the modes that are not
compatible with the presently installed media type being rejected).

Regards,
Edwin Peer

On Wed, Jan 6, 2021 at 5:08 AM Danielle Ratson <danieller@mellanox.com> wrote:
>
> From: Danielle Ratson <danieller@nvidia.com>
>
> Some speeds can be achieved with different number of lanes. For example,
> 100Gbps can be achieved using two lanes of 50Gbps or four lanes of
> 25Gbps. This patch set adds a new selector that allows ethtool to
> advertise link modes according to their number of lanes and also force a
> specific number of lanes when autonegotiation is off.
>
> Advertising all link modes with a speed of 100Gbps that use two lanes:
>
> $ ethtool -s swp1 speed 100000 lanes 2 autoneg on
>
> Forcing a speed of 100Gbps using four lanes:
>
> $ ethtool -s swp1 speed 100000 lanes 4 autoneg off
>
> Patch set overview:
>
> Patch #1 allows user space to configure the desired number of lanes.
>
> Patch #2-#3 adjusts ethtool to dump to user space the number of lanes
> currently in use.
>
> Patches #4-#6 add support for lanes configuration in mlxsw.
>
> Patch #7 adds a selftest.
>
> v2:
>         * Patch #1: Remove ETHTOOL_LANES defines and simply use a number
>           instead.
>         * Patches #2,#6: Pass link mode from driver to ethtool instead
>         * of the parameters themselves.
>         * Patch #5: Add an actual width field for spectrum-2 link modes
>           in order to set the suitable link mode when lanes parameter is
>           passed.
>         * Patch #6: Changed lanes to be unsigned in
>           'struct link_mode_info'.
>         * Patch #7: Remove the test for recieving max_width when lanes
>         * is not set by user. When not setting lanes, we don't promise
>           anything regarding what number of lanes will be chosen.
>
> Danielle Ratson (7):
>   ethtool: Extend link modes settings uAPI with lanes
>   ethtool: Get link mode in use instead of speed and duplex parameters
>   ethtool: Expose the number of lanes in use
>   mlxsw: ethtool: Remove max lanes filtering
>   mlxsw: ethtool: Add support for setting lanes when autoneg is off
>   mlxsw: ethtool: Pass link mode in use to ethtool
>   net: selftests: Add lanes setting test
>
>  Documentation/networking/ethtool-netlink.rst  |  12 +-
>  .../net/ethernet/mellanox/mlxsw/spectrum.h    |  13 +-
>  .../mellanox/mlxsw/spectrum_ethtool.c         | 168 +++++----
>  include/linux/ethtool.h                       |   5 +
>  include/uapi/linux/ethtool.h                  |   4 +
>  include/uapi/linux/ethtool_netlink.h          |   1 +
>  net/ethtool/linkmodes.c                       | 321 +++++++++++-------
>  net/ethtool/netlink.h                         |   2 +-
>  .../selftests/net/forwarding/ethtool_lanes.sh | 186 ++++++++++
>  .../selftests/net/forwarding/ethtool_lib.sh   |  34 ++
>  tools/testing/selftests/net/forwarding/lib.sh |  28 ++
>  11 files changed, 570 insertions(+), 204 deletions(-)
>  create mode 100755 tools/testing/selftests/net/forwarding/ethtool_lanes.sh
>
> --
> 2.26.2
>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4160 bytes --]

      parent reply	other threads:[~2021-01-07 17:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 13:06 [PATCH net-next repost v2 0/7] Support setting lanes via ethtool Danielle Ratson
2021-01-06 13:06 ` [PATCH net-next repost v2 1/7] ethtool: Extend link modes settings uAPI with lanes Danielle Ratson
2021-01-08  0:35   ` Jakub Kicinski
2021-01-11 14:00     ` Danielle Ratson
2021-01-11 17:57       ` Jakub Kicinski
2021-01-06 13:06 ` [PATCH net-next repost v2 2/7] ethtool: Get link mode in use instead of speed and duplex parameters Danielle Ratson
2021-01-08  0:42   ` Jakub Kicinski
2021-01-08  1:11     ` Andrew Lunn
2021-01-06 13:06 ` [PATCH net-next repost v2 3/7] ethtool: Expose the number of lanes in use Danielle Ratson
2021-01-06 13:06 ` [PATCH net-next repost v2 4/7] mlxsw: ethtool: Remove max lanes filtering Danielle Ratson
2021-01-06 13:06 ` [PATCH net-next repost v2 5/7] mlxsw: ethtool: Add support for setting lanes when autoneg is off Danielle Ratson
2021-01-06 13:06 ` [PATCH net-next repost v2 6/7] mlxsw: ethtool: Pass link mode in use to ethtool Danielle Ratson
2021-01-06 13:06 ` [PATCH net-next repost v2 7/7] net: selftests: Add lanes setting test Danielle Ratson
2021-01-08  0:45   ` Jakub Kicinski
2021-01-10 12:35     ` Danielle Ratson
2021-01-07 17:36 ` Edwin Peer [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='CAKOOJTx=Cz1yCDxCC3AmroQUd=zHmw0NH1eCGVNd6u4PfBjR_Q@mail.gmail.com' \
    --to=edwin.peer@broadcom.com \
    --cc=andrew@lunn.ch \
    --cc=danieller@mellanox.com \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mkubecek@suse.cz \
    --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.