public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, Donald Hunter <donald.hunter@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	Michael Chan <michael.chan@broadcom.com>,
	Hariprasad Kelam <hkelam@marvell.com>,
	Ido Schimmel <idosch@nvidia.com>,
	Danielle Ratson <danieller@nvidia.com>,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [RFC net-next 0/4] ethtool: CMIS module diagnostic loopback support
Date: Wed, 4 Mar 2026 17:09:05 +0100	[thread overview]
Message-ID: <9c674e92-efc4-4f4d-9bd6-2b210ffd7c9e@bootlin.com> (raw)
In-Reply-To: <CAJ+HfNga2510HrgpDH==H7CpmKBAEsoQkEmhFBMPxqM296p2eA@mail.gmail.com>

Hi Björn,

On 04/03/2026 16:52, Björn Töpel wrote:
> Hey!
> 
> On Mon, 2 Mar 2026 at 10:01, Maxime Chevallier
> <maxime.chevallier@bootlin.com> wrote:
> 
>> The overall approach after all these discussions sounds fine to me, I do
>> think that the index of the component that does the loopback needs to be
>> there somewhere, when relevant.
>>
>> Either through a name string, or a combo of an enum indicating the
>> component type (MAC/PHY/Module/etc.) + its index. I think it's safe to
>> assume that indices will fit in u32 ?
>>
>> something like :
>>
>> # MAC PCS loopback
>> ethtool --set-loopback eth0 loc mac name pcs
>>
>> # PHY id 2 PMA loopback (I'm making things up here)
>> ethtool --set-loopback eth0 loc phy id 2 name pma
>>
>> That way we can extend that fairly easily for, say, combo-port devices
>> where we could select which of the port we want to loopback :)
> 
> Ok! I'll spin a new version with this in mind. To improve my mental
> model, could you give an example how you would use a combo-port from a
> userland perspective?

Of course :)

Considering this setup :

 +-----+     +-----+
 | MAC |     | PHY |----- SFP
 |     |-----|     |----- RJ45
 +-----+     +-----+

It's still WIP but the current state of what I have in the pipe looks like :

# List the ports
ethtool --show-ports eth0

Port for eth10:       # <- This port represents the RJ45 port of the PHY
	Port id: 1
	Supported link modes:  10baseT/Half 10baseT/Full
	                       100baseT/Half 100baseT/Full
	                       1000baseT/Full
	                       10000baseT/Full
	                       2500baseT/Full
	                       5000baseT/Full
	Port type: mdi
	Active: yes
	Link: up

Port for eth1:          # <- This port represents the SFP cage
	Port id: 2
	Vacant: no
	Supported MII interfaces : 10gbase-r
	Port type: sfp
	Active: no

Port for eth1:          # <- This port represents the SFP module inside the cage
	Port id: 4
	Supported link modes:  10000baseCR/Full
	Port type: mdi
	Active: no
	Link: up


# Select the SFP port as the active one (note that we could either use
port 2 or 4 here for the same result) :

ethtool --set-port eth0 id 4 active on 

I may add something like :

ethtool --set-port eth0 type sfp active on
ethtool --set-port eth0 type tp active on
 
Maxime


  reply	other threads:[~2026-03-04 16:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19 13:00 [RFC net-next 0/4] ethtool: CMIS module diagnostic loopback support Björn Töpel
2026-02-19 13:00 ` [RFC net-next 1/4] ethtool: module: Define CMIS loopback YAML spec and UAPI Björn Töpel
2026-02-19 13:00 ` [RFC net-next 2/4] ethtool: module: Add CMIS loopback GET/SET support Björn Töpel
2026-02-19 15:59   ` Andrew Lunn
2026-02-19 13:00 ` [RFC net-next 3/4] ethtool: module: refactor fw flash init to reuse CMIS helpers Björn Töpel
2026-02-19 13:00 ` [RFC net-next 4/4] net/mlx5e: Implement set_module_eeprom_by_page ethtool callback Björn Töpel
2026-02-19 13:16 ` [RFC net-next 0/4] ethtool: CMIS module diagnostic loopback support Björn Töpel
2026-02-19 15:51 ` Andrew Lunn
2026-02-20  0:05   ` Jakub Kicinski
2026-02-20 14:18     ` Andrew Lunn
2026-02-20 21:12       ` Jakub Kicinski
2026-02-22 19:58         ` Björn Töpel
2026-02-23 14:30           ` Andrew Lunn
2026-02-23 14:41             ` Björn Töpel
2026-02-23 23:04           ` Jakub Kicinski
2026-02-24 10:28             ` Björn Töpel
2026-02-25  4:04               ` Andrew Lunn
2026-02-25  8:39                 ` Björn Töpel
2026-02-25 13:14                   ` Andrew Lunn
2026-03-02  9:00                     ` Maxime Chevallier
2026-03-04 15:52                       ` Björn Töpel
2026-03-04 16:09                         ` Maxime Chevallier [this message]
2026-02-25 10:22           ` Maxime Chevallier
2026-02-25 11:20             ` Björn Töpel
2026-02-20  8:11   ` Björn Töpel

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=9c674e92-efc4-4f4d-9bd6-2b210ffd7c9e@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=bjorn@kernel.org \
    --cc=danieller@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=tariqt@nvidia.com \
    /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