DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Sunil Kumar Kori" <skori@marvell.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>
Cc: "Thomas Monjalon" <thomas@monjalon.net>,
	"Andrew Rybchenko" <andrew.rybchenko@oktetlabs.ru>,
	<dev@dpdk.org>,
	"Nithin Kumar Dabilpuram" <ndabilpuram@marvell.com>
Subject: RE: [EXTERNAL] Re: [PATCH v4 1/1] ethdev: add support to provide link type
Date: Mon, 18 Aug 2025 09:24:09 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9FE41@smartserver.smartshare.dk> (raw)
In-Reply-To: <CO6PR18MB3860FCC393EF51C8664B364BB431A@CO6PR18MB3860.namprd18.prod.outlook.com>

> From: Sunil Kumar Kori [mailto:skori@marvell.com]
> Sent: Monday, 18 August 2025 08.22
> 
> > On Thu, 14 Aug 2025 11:04:18 +0200
> > Morten Brørup <mb@smartsharesystems.com> wrote:
> >
> > > > From: skori@marvell.com [mailto:skori@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
> 
> Agreed, hence adding one more type RTE_ETH_LINK_TYPE_OTHER to align.

Ethtool has both NONE and OTHER:
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/tree/uapi/linux/ethtool.h#n2242

Ethtool doesn't have a 3rd value UNKNOWN, and I think having a 3rd value complicates things too much.

I still think we should consider OTHER==UNKNOWN, and that NONE (having no connector) cannot happen and thus should be omitted.
Having more than one of these adds complexity, and I fail to see the benefit.

"Because Ethtool also has NONE" is not a good argument. Linux has plenty of obsolete stuff, which we don't need to copy to DPDK.
However, referring to the reason why Ethtool also has NONE (in addition to OTHER) might reveal a valid argument for having it in DPDK too.

Anyway, if we have more than one value (in addition to the actual physical connector values), they need good descriptions, so it is crystal clear what the difference is between NONE and OTHER (and UNKNOWN, if we proceed with this 3rd value).


  reply	other threads:[~2025-08-18  7:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 11:31 [PATCH] " skori
2025-06-05 15:26 ` Stephen Hemminger
2025-06-06  9:28 ` [PATCH v2 1/1] " skori
2025-06-06  9:54   ` Morten Brørup
2025-06-06 15:23     ` Stephen Hemminger
2025-06-10  5:02       ` [EXTERNAL] " Sunil Kumar Kori
2025-06-10  6:45         ` Morten Brørup
2025-08-13  7:42           ` Sunil Kumar Kori
2025-08-13  8:42   ` [PATCH] " skori
2025-08-13  8:43   ` [PATCH v3 1/1] " skori
2025-08-13 10:25     ` Thomas Monjalon
2025-08-13 12:16       ` Ivan Malov
2025-08-13 14:17         ` Stephen Hemminger
2025-08-14  5:09       ` [EXTERNAL] " Sunil Kumar Kori
2025-08-13 15:04     ` Stephen Hemminger
2025-08-14  8:10     ` [PATCH v4 " skori
2025-08-14  9:04       ` Morten Brørup
2025-08-14 16:15         ` Stephen Hemminger
2025-08-18  6:21           ` [EXTERNAL] " Sunil Kumar Kori
2025-08-18  7:24             ` Morten Brørup [this message]
2025-08-18  8:13               ` Ivan Malov
2025-08-18  8:39                 ` Morten Brørup
2025-08-18  8:50                   ` Ivan Malov
2025-08-18  6:20         ` Sunil Kumar Kori
2025-08-14 16:07       ` Stephen Hemminger
2025-08-18  6:13         ` [EXTERNAL] " Sunil Kumar Kori

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=98CBD80474FA8B44BF855DF32C47DC35E9FE41@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ndabilpuram@marvell.com \
    --cc=skori@marvell.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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).