From mboxrd@z Thu Jan 1 00:00:00 1970 From: Finn Christensen Subject: Re: standardize device identification Date: Fri, 5 Jan 2018 07:52:14 +0000 Message-ID: References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <1743809.pZtjZi6UOT@xps> <7044959.u7szEIarlR@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Yuanhan Liu , Adrien Mazarguil , Ciara Loftus , "Kevin Traynor" , "stephen@networkplumber.org" , "ferruh.yigit@intel.com" To: Thomas Monjalon , "dev@dpdk.org" Return-path: Received: from mail01.napatech.com (mail01.napatech.com [188.120.77.121]) by dpdk.org (Postfix) with ESMTP id 555012951 for ; Fri, 5 Jan 2018 08:52:18 +0100 (CET) In-Reply-To: <7044959.u7szEIarlR@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" -----Original Message----- From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon Sent: 20. december 2017 23:03 To: dev@dpdk.org Cc: Yuanhan Liu ; Adrien Mazarguil ; Ciara Loftus ; Kevin Traynor ; stephen@networkplumber.org; ferruh.yigit@intel.com Subject: Re: [dpdk-dev] standardize device identification =20 Changing the title and adding more comments inline: =20 19/12/2017 00:05, Thomas Monjalon: > Let's summarize and resume this thread. > > We need a generic syntax to describe a device. > This syntax can be used > - before initializing the device (i.e. whitelist/blacklist) > - or after the initialization (e.g. user config) > > We need to answer 4 questions: > 1/ what are the separators (comma, colon, etc)? > 2/ how to distinguish a device identification from a configuration? > 3/ what are the mandatory parts? > 4/ what can be the optional properties? > > 30/11/2017 08:35, Yuanhan Liu: > > 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. > > Based on the feedbacks we had, I suggest a syntax where everything is > optional key/value pairs, and split in 3 categories: > - bus (pci, vdev, vmbus, fslmc, etc) > - class (eth, crypto) > - driver (i40e, mlx5, virtio, etc) =20 The key/value pair describing the category scope is mandatory and must be the first pair in the category properties. Example: bus=3Dpci, must be placed before id=3D0000:01:00.0 =20 > Between categories, the separator is a slash. > Inside a category, the separator is a comma. > Inside a key/value pair, the separator is an equal sign. > > It may look like this: > bus=3DBUS_NAME,id=3DBUS_ID/class=3DCLASS_NAME,dev_port=3DPORT_NUM,m ac=3DMAC_ADDR > ESS/driver=3DDRIVER_NAME,driverspecificproperty=3DVALUE > > A device is identified when every properties are matched. > Before device is probed, only the bus category is relevant. > For the simple PCI whitelist, it means moving from > -w 0000:01:00.0 > to > -w bus=3Dpci,id=3D0000:01:00.0 > > It is possible to mix some settings in these devargs syntax if the > keys are differents. Example: mac=3D is for identification by MAC, > whereas newmac=3D would be for specifying a MAC address to set. > > Agreement? =20 =20 We also need to distinguish between multiple ports sitting on same PCI bus = ID. and from our point of view, this will fully cover our needs. Thanks - great proposal. Regards, Finn Christensen, Napatech Yuanhan is proposing to use this syntax in OVS option dpdk-devargs: https://mail.openvswitch.org/pipermail/ovs-dev/2017- December/342273.html =20 Please, any feedback or approval that this syntax is good?