[PATCH v4 1/1] ethdev: add support to provide link type

Stephen Hemminger stephen at networkplumber.org
Thu Aug 14 18:15:56 CEST 2025


On Thu, 14 Aug 2025 11:04:18 +0200
Morten Brørup <mb at smartsharesystems.com> wrote:

> > From: skori at marvell.com [mailto:skori at marvell.com]
> > Sent: Thursday, 14 August 2025 10.10
> > 
> > Adding link type parameter to provide the type
> > of port like twisted pair, fibre etc.
> > 
> > Also added an API to convert the RTE_ETH_LINK_TYPE_XXX
> > to a readable string.  
> 
> Please consider if "connector" is a better name than "link type", if this is related to physical interfaces only.
> E.g. is there an "LACP" link type for link aggregates (bonded links)?
> 
> Also, should a "virtual" link type (or connector) be added for TAP/Virtio/VMXNET3/ring and similar non-physical interfaces?
> 
> More comments inline below.

My preference is that a new feature like this follow what other commands and standards do.
There is Linux ethtool as the most common example.
Also, there is probably something IEEE standard but that is behind stupid paywall.

Ethtool on real NIC.
# ethtool enp87s0
Settings for enp87s0:
	Supported ports: [ TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Supported pause frame use: Symmetric
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: 2500Mb/s
	Duplex: Full
	Auto-negotiation: on
	Port: Twisted Pair
	PHYAD: 0
	Transceiver: internal
	MDI-X: off (auto)
	Supports Wake-on: pumbg
	Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
	Link detected: yes

And on virtio
# ethtool enp1s0
Settings for enp1s0:
	Supported ports: [  ]
	Supported link modes:   Not reported
	Supported pause frame use: No
	Supports auto-negotiation: No
	Supported FEC modes: Not reported
	Advertised link modes:  Not reported
	Advertised pause frame use: No
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Speed: Unknown!
	Duplex: Unknown! (255)
	Auto-negotiation: off
	Port: Other
	PHYAD: 0
	Transceiver: internal
	Link detected: yes


More information about the dev mailing list