DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Yuanhan Liu <yliu@fridaylinux.org>
Cc: dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,
	Adrien Mazarguil <adrien.mazarguil@6wind.com>,
	Ciara Loftus <ciara.loftus@intel.com>,
	Kevin Traynor <ktraynor@redhat.com>
Subject: Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name
Date: Thu, 30 Nov 2017 09:15:52 -0800	[thread overview]
Message-ID: <20171130091552.3aa6e46c@xeon-e3> (raw)
In-Reply-To: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org>

On Thu, 30 Nov 2017 15:35:30 +0800
Yuanhan Liu <yliu@fridaylinux.org> wrote:

> The ethdev name is taken from the "name" parameter from the helper
> function rte_eth_dev_allocate(name). The name is given by the caller,
> thus, there is no way to guarantee all the callers will follow the
> same syntax, leaving us the port name is not standardized.
> 
> For example, for all ports probed by the generic pci probe function,
> the name is set to the PCI id. For all others, it's set by the caller,
> aka, the PMD driver. Taking mlx PMD driver as the example, it's set
> to something like "mlx5_0 port 0".
> 
> Unfortunately, ovs-dpdk uses such name for referencing a specific port.
> Since there is no standard, user has to figure out what is the right
> name for the nic he is using. That adds extra (unnecessary) obstruction
> to users.
> 
> Thus, the name should be standardized. We should give user a consistent
> interface for finding a specific port.
> 
> What this patch proposes is to use "name[,mac]" syntax. "name" is the
> PCI id for pci device. For vdev, it's the vdev name given by user. The
> reason "mac" is needed is for some devices (say ConnectX-3), 2 ports
> (in a single NIC) have the same PCI id.
> 
> There are 2 reasons I didn't make "mac" mandatory:
> - it keeps the compatibility
> - in most cases, the pci id is good enough to identify a port
> 
> However, while writing this commit log, I think it might be better to
> use something like UUID for standardizing the port name. This way, we
> will always have a very consistent naming, no matter whether it's PCI
> device or vdev device and whether a PCI devices has 2 ports share the
> same PIC id, or something we have considered so far (say, few ports
> sharing same PCI and mac address :/).
> 
> It's also simpler and cleaner. The only drawback is such ID is meaningless
> to human.
> 
> Please also note that this patch just comes up with an API to query
> a port from standard name suggested above. The ethdev name isn't really
> standardized here. This patch is asking for comments after all.
> 
> Thoughts?
> 
> Cc: Thomas Monjalon <thomas@monjalon.net>
> Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> Cc: Ciara Loftus <ciara.loftus@intel.com>
> Cc: Kevin Traynor <ktraynor@redhat.com>
> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>

Some thoughts.
1) Not all devices are PCI; look at recent VMBUS
2) The name may have to be set before MAC address is determined on boot.
3) The names themselves are not persistent or human friendly. This is hard
   see the effort udev goes to.

  reply	other threads:[~2017-11-30 17:16 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-30  7:35 Yuanhan Liu
2017-11-30 17:15 ` Stephen Hemminger [this message]
2017-11-30 17:35   ` Thomas Monjalon
2017-11-30 21:21     ` Stephen Hemminger
2017-11-30 21:44       ` Thomas Monjalon
2017-12-01  9:47         ` Gaëtan Rivet
2017-12-04 13:55           ` Yuanhan Liu
2017-12-05 11:04             ` Adrien Mazarguil
2017-12-05 13:20               ` Thomas Monjalon
2017-12-05 13:58                 ` Yuanhan Liu
2017-12-05 15:28                   ` Thomas Monjalon
2017-12-05 17:22                     ` Adrien Mazarguil
2017-12-06 15:49                       ` Yuanhan Liu
2017-12-18 22:25                 ` Thomas Monjalon
2017-12-18 22:30                   ` Stephen Hemminger
2017-12-18 22:41                     ` Thomas Monjalon
2017-12-18 23:05 ` Thomas Monjalon
2017-12-20 22:02   ` [dpdk-dev] standardize device identification Thomas Monjalon
2017-12-22  7:01     ` Shreyansh Jain
2017-12-22  9:00       ` Thomas Monjalon
2018-01-05  7:52     ` Finn Christensen
2018-01-05  8:39       ` Thomas Monjalon
2018-01-05 11:09         ` Finn Christensen
2018-01-05 12:01           ` Thomas Monjalon
2018-01-05 14:14             ` Finn Christensen
2018-01-05 15:34               ` Thomas Monjalon
2018-01-05 20:32                 ` Finn Christensen
2018-01-16 20:20 ` [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name Ferruh Yigit

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=20171130091552.3aa6e46c@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=adrien.mazarguil@6wind.com \
    --cc=ciara.loftus@intel.com \
    --cc=dev@dpdk.org \
    --cc=ktraynor@redhat.com \
    --cc=thomas@monjalon.net \
    --cc=yliu@fridaylinux.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 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).