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 5BD3A271 for ; Tue, 19 Dec 2017 00:05:52 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A710420D26; Mon, 18 Dec 2017 18:05:51 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 18 Dec 2017 18:05:51 -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=vikW1sn6FpidaYganRH7WJHL0O UxlMiW/0um6IP4RMM=; b=MCsH6zPGUsjznkl5ARHjWJhI6Jv9UZNCymUFtz29xT kVJ571yNJ4RUid7WuHk+GZKSaayFTHBHNvajwsfj/zoy2BskF+pu9xZ62U0i8EXo fNshWX+bfUEpVu5FesvbwmA1v6jKWs1Bb1EuJ0hL/LH/FxWhd48OCqdYrqC3/5Hu M= 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=vikW1s n6FpidaYganRH7WJHL0OUxlMiW/0um6IP4RMM=; b=Fli5UnmsDYowwBma3l8osR ykxIZUMqxKpbVbDpjuUE7Xv5UPduc+gfSwnU9ISbA7p6Bd61u6++8RJUDnpGLVGn 7OzxzrXJh2GYEIPWr3Ah5nZi/p78J9SbDpTb8y4ypOr0dCngzERM/EHC/7OZyLHD YZVjO8TU028Yf1VYHjsdx2mBfjwPZabDn2c4bDL5dejZUTsLNykOcMS7dFN2SVQP UP52x72/fOWUHYRpRow3gE1sNP6UHMHB75+ssQpDHwHAzImbdHfJGaiBWo1T6rNK 91623YVlHih/cQEhORivTEawERcdsdpcX1hW4vPCvqpQoPeajr8uVTOCR6F1ORGA == 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 50B8B7E4AA; Mon, 18 Dec 2017 18:05:51 -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: Tue, 19 Dec 2017 00:05:50 +0100 Message-ID: <1743809.pZtjZi6UOT@xps> In-Reply-To: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> References: <1512027330-30030-1-git-send-email-yliu@fridaylinux.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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, 18 Dec 2017 23:05:52 -0000 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) 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?