From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] doc: document the new devargs syntax Date: Wed, 24 Jan 2018 23:24:32 +0800 Message-ID: <20180124152432.GX29540@yliu-mob> References: <1516114218-21501-1-git-send-email-yliu@fridaylinux.org> <20180118094623.gu5ahrfd75b5gcct@bidouze.vm.6wind.com> <20180123124602.GS29540@yliu-mob> <17059484.9s6tGoQGou@xps> <20180123160816.uvsvegtltmzrr4yi@bidouze.vm.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Thomas Monjalon , Ferruh Yigit , dev@dpdk.org To: =?iso-8859-1?Q?Ga=EBtan?= Rivet Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id C57341B16F for ; Wed, 24 Jan 2018 16:24:36 +0100 (CET) Content-Disposition: inline In-Reply-To: <20180123160816.uvsvegtltmzrr4yi@bidouze.vm.6wind.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Jan 23, 2018 at 05:08:16PM +0100, Gaëtan Rivet wrote: > Drivers answers to a specific API (ethdev, cryptodev, ...), to create > standardized objects in response to parameters that are given to them > for init. I think matching properties should be restricted to higher > classes (bus, eth/crypto), That's also what I thought. But I'm okay to have "driver" category included for matching. I just don't really see a good example for that. > while the driver class should be left > free-form and to the responsibility of the PMD itself (while having the > proper libraries for helping parsing safely, thus driving developpers > toward similar syntaxes, while not forcing them in those). I agree. The drv args are parsed by the drivers after all. It's hard to have a good parser for all. I also don't know why we have to force them to use "key=value" pairs. I even see some drawbacks from the forcement: - some PMDs already use none key/value format. Forcing them breaks more. If the "-w" "--vdev" compatibility is kept", nothing will be broken from the user point of view. However, if "key=value" pair is going to be used, user have to do some changes. - Some "value" might have to use the nested "=". Handling the nested pairs introduces more complexity. - sometimes, it's simple without an assignment. For example, it could be "driver=vhost-pmd,...,client" to let the vhost PMD acts as the client mode. Both Linux kernel and QEMU don't force the "key=value" pair usage, I don't see any good reason why we have to do that. --yliu