From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 267431B1CD for ; Wed, 20 Dec 2017 23:02:51 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 79CCD20BFD; Wed, 20 Dec 2017 17:02:50 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 20 Dec 2017 17:02:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; 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=mesmtp; bh=fC5e22pxmtvH87AG7BErQAWco7 WPPqpBHUuNC57/rT8=; b=CmCqxUbNf1DJ5X1Jzq8U5d9ZRKCIgNL5PI3W83YvSH /FfYI+iZRSI9UGz6Bof/mBwKA7TrfXn/N//D/0IlNWkrmTAtaQI9rHmkDQU6gE8W qk5Yv/ceLpwCG4Gzg/2C0Vg9sU9sBk8WNJhz9xl5H5Kw7QgTeUGyO01VTZz9bczF Q= 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=fC5e22 pxmtvH87AG7BErQAWco7WPPqpBHUuNC57/rT8=; b=UtIjiNTPP+pvvR6V7NUUpM UYYKaj8yEbVUdZ/TAUthR8fug467q+Q1Lj30UVQ4NwTmOLInJemT3fgHnY8gknS6 w528Y0XlC6xTRwvxF0e9Kp/YvaroMkbG74gDqlBWhkrlW96Ie1orhLLl+eo8ahvi UzJxP+oyb3J2Qgo4ccmQZqf4URC+XKFfToYCQoAbYlZrqJG5fqk7HeWEt48RBDuW 8TlNkkwGbXFqUd8VQwv0Xsh1H76pzFKJdlrhcqmSf3IIXArf24KfTBb2W0pJuZ5m pQs68avPYeDyWI8ndHpk9S+0Y78BM0wzcJRS/ieHvSKo8w8V0l1bzEmjcL5kzvEQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 1C57024724; Wed, 20 Dec 2017 17:02:50 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: Yuanhan Liu , Adrien Mazarguil , Ciara Loftus , Kevin Traynor , stephen@networkplumber.org, ferruh.yigit@intel.com Date: Wed, 20 Dec 2017 23:02:48 +0100 Message-ID: <7044959.u7szEIarlR@xps> In-Reply-To: <1743809.pZtjZi6UOT@xps> References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> <1743809.pZtjZi6UOT@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] standardize device identification 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: Wed, 20 Dec 2017 22:02:52 -0000 Changing the title and adding more comments inline: 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) The key/value pair describing the category scope is mandatory and must be the first pair in the category properties. Example: bus=pci, must be placed before id=0000:01:00.0 > 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=BUS_NAME,id=BUS_ID/class=CLASS_NAME,dev_port=PORT_NUM,mac=MAC_ADDRESS/driver=DRIVER_NAME,driverspecificproperty=VALUE > > 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=pci,id=0000:01:00.0 > > It is possible to mix some settings in these devargs syntax if the keys > are differents. Example: mac= is for identification by MAC, whereas > newmac= would be for specifying a MAC address to set. > > Agreement? Yuanhan is proposing to use this syntax in OVS option dpdk-devargs: https://mail.openvswitch.org/pipermail/ovs-dev/2017-December/342273.html Please, any feedback or approval that this syntax is good?