From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id EA902239 for ; Mon, 4 Dec 2017 14:55:36 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 682D120B90; Mon, 4 Dec 2017 08:55:36 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 04 Dec 2017 08:55:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:content-transfer-encoding:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=nObo07MPUMkFIqgQu 6RtaDh0GMlMgOghaM54O3eUVMA=; b=JUMVylAlBf7xDdaqn4eEIhE1CjP3VTkcs la3G/a1HqVtlP0s7/nyGicX97Vd0Q/5YRabLR5aO9Z3+tarTP+16368n9ZyvdQG/ 6wFhaRnNjIDICmN60xqGya+sIL7XJ49Xr98YCnZ6gPE8WbkVjjPELFz4eIJg/UUU 2h0gsep8GbTvXePkf3qtRae8KoiePeg5r0bR/pxgznJXBjsfd4Y2rDK7ykVX+D1X G4Yaso24gdJnfap0DRg+RoOZXTlJWvP9vRYl6EjgszCv3hT7fSWXsf0siWQj2ofr QP0gDWzW83NRNsaopEgrv7HY6xaa/NNhGbqsXikwBXYmGhbMwNMXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=nObo07 MPUMkFIqgQu6RtaDh0GMlMgOghaM54O3eUVMA=; b=iz10S/FHff1/fmbTmxZs0t bsypOKTJOZSGVW3S1qRtEgj6n9RwBFHw8DAKuhrBwDqzUr0xH4Tok9fi5aL3qIEe t0gMaqRtF3ZwNK0Yu7hNNh9kan9J/pAJ21RtI1hXyEHTHNbzBBO7SSIr/RRLGEbP uBzZiza8zTjA1q5YyCHLyLc8dIZm6XkfIXOvmTd/+fLbJh8Jw18NNGNgTBszAUud I/1LcmPb8r4h3w3IQvMatI+5Ln9Ng05yacU0H+b3FYrVPyk6sq4iKJ5mMoAHgvn8 F/rqFR8+1oirZnkXhtzDdhK0p0CavJSmEDSOivll7VQ0z633nJQTazAEzsGE6UTw == X-ME-Sender: Received: from yliu-dev (unknown [180.158.55.119]) by mail.messagingengine.com (Postfix) with ESMTPA id 081A4245A8; Mon, 4 Dec 2017 08:55:34 -0500 (EST) Date: Mon, 4 Dec 2017 21:55:31 +0800 From: Yuanhan Liu To: =?iso-8859-1?Q?Ga=EBtan?= Rivet Cc: Thomas Monjalon , Stephen Hemminger , dev@dpdk.org, Adrien Mazarguil , Ciara Loftus , Kevin Traynor , hemant.agrawal@nxp.com Message-ID: <20171204135531.GB13614@yliu-dev> References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <6035648.0D6NuDDM7V@xps> <20171130132126.13761c50@xeon-e3> <1581666.Z35b0Iulko@xps> <20171201094750.tpsbovk6julcyzrm@bidouze.vm.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171201094750.tpsbovk6julcyzrm@bidouze.vm.6wind.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH] [RFC] ether: standardize getting the port by name X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 13:55:37 -0000 On Fri, Dec 01, 2017 at 10:47:50AM +0100, Gaëtan Rivet wrote: > On Thu, Nov 30, 2017 at 10:44:58PM +0100, Thomas Monjalon wrote: > > 30/11/2017 22:21, Stephen Hemminger: > > > On Thu, 30 Nov 2017 18:35:11 +0100 > > > Thomas Monjalon wrote: > > > > > > > 30/11/2017 18:15, Stephen Hemminger: > > > > > Some thoughts. > > > > > 1) Not all devices are PCI; look at recent VMBUS > > > > > > > > Yes, we need a syntax which works for every devices. > > > > I suggest to use the prefix "pci:" before the PCI id. > > > > We need also a prefix and ids for NXP buses. > > > > We could use "vmbus:" before VMBUS ids. > > > > How VMBUS ids look like? > > > > > > rte_devargs are easily accessible, user-readable. Only thing missing > would be requiring a 1-1 mapping between an rte_devargs and a port, thus > requiring PMDs to have at least one version of a device string that > would probe a single port (as is done with port= in mlx4). > > Implementing an rte_devargs to rte_device in rte_bus is simple enough, > and this would allow implementing an rte_devargs to port_id in rte_eth. > > What am I missing? rte_devargs is identified by the name (pci id for pci device). It also includes other driver specific key-value options. It's not clear for the user to know which one (or few) of them should be used together with the PCI id to identify a specific port. For example, as you mentioned, in mlx4, it's "pci_id,port=x". It could be something else in other drivers. Actually, this patch also proposes a devarg like naming style: "name[,mac]". What it does try to do is to define a standard syntax, so that the user doesn't have to know any driver specific options. However, the mac address is changeable, leaving this naming inconsistent. Well, in practice, PCI id is also changeable. OTOH, having a consistent naming seems a bit far away from this patch's goal: define a standard ethdev naming and leave less harassment to the users. --yliu > > > > > > 2) The name may have to be set before MAC address is determined on boot. > > > > > > > > I don't understand this comment. > > > > Do you mean MAC may be unknown when starting DPDK? > > > > > > The MAC be known by the hardware, but the device would have to be > > > created before using hardware to read it. > > > > Indeed, it is a problem if we want to use this syntax for blacklist. > > > > > > > > > 3) The names themselves are not persistent or human friendly. This is hard > > > > > see the effort udev goes to. > > > > > > > > Yes udev has a syntax to identify devices. It can be inspiring. > > > > Qemu may also be inspiring: > > > > https://github.com/qemu/qemu/blob/master/docs/qdev-device-use.txt > > > > -- > Gaëtan Rivet > 6WIND