From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 97A9E1B1AB for ; Tue, 16 Jan 2018 15:52:25 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 01D6E20E3F; Tue, 16 Jan 2018 09:52:25 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 16 Jan 2018 09:52:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=/tbkVIQFIwTBIFLnIdcsLScGH3igDoj5JHEMaWL0h VU=; b=KX4fR4cAHkSgaz+iGoMqFfGb6hAaC7H1uX4zFp9wlNLf6/2Ajk7obFmWn 7yfUFDtwzIZHMhDrgGqeEGNoyFY5VQNVr5KdkQJXIXIfSAjDt7FLHgi7hig0DuDT vnNhUZcmW9SIIbsRBzQE1Kl+TqRBVbAnGf5SmzszzNv56EcvpipJaV75GZczEfBv iI6PXibnCC4+wAdE5v9XgZmaxE+nR0cSjFeuhbp/kywKBmC2WCZZtFr2v5dKvFVR 5Wd0Ed46vGOfcZ+p86UCmQZEJ7jKUT8MD+yZ5HAqkrG7nX0uEWt/Ih5jb3dvVj0Y Zr5DLreAxuyBHemmdTQxlIqZN63iA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=/tbkVIQFIwTBIFLnI dcsLScGH3igDoj5JHEMaWL0hVU=; b=sDZ1PqKvil63LLZoJS33niWlB0TesvbFV VCO048utKPv9GxRMtkL/Rabsmp6iKuKy+PWvxYaENKCIW5lgvJCWASoN+sNgWeJO 7BfaYXZK9lj+2YXgkVBhuJ2S01GW/FgVzeFZnnJxJXlsrAFjq++jFwU5dyAF7Acy ud+hUYP4lmhSFse90nzDmsV7sD/HOLWcfqmg8WMQsiqSnIozE6+Bwgcq81LIF1pT h6Lc1ooTT4FBkRi1wwtzIJUdPfKHenIFEB69ro2fmFUcfjbnT0dgr4QvGnIflG0c coQPFbIaQxSOIEplsRWANgNdsqvtONVC0f3n9mv+cVXQSh9Gu2Nyw== X-ME-Sender: Received: from localhost.localdomain (unknown [182.84.161.50]) by mail.messagingengine.com (Postfix) with ESMTPA id D5DAD7E322; Tue, 16 Jan 2018 09:52:22 -0500 (EST) From: Yuanhan Liu To: dev@dpdk.org Cc: Thomas Monjalon , Yuanhan Liu Date: Tue, 16 Jan 2018 22:50:18 +0800 Message-Id: <1516114218-21501-1-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] doc: document the new devargs syntax 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: Tue, 16 Jan 2018 14:52:25 -0000 This patch documents the new devargs syntax, which is going to be implemented in DPDK v18.05. The new devargs proposal is introduced for having a consistent interface for: - whitelisting/blacklisting devices - identifying ports - attaching/detaching devices Please check the patch content for the details. Also, here is link for the background: http://dpdk.org/ml/archives/dev/2017-November/082600.html This syntax is suggestd by Thomas: http://dpdk.org/ml/archives/dev/2017-December/084234.html Signed-off-by: Yuanhan Liu --- doc/guides/prog_guide/env_abstraction_layer.rst | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/guides/prog_guide/env_abstraction_layer.rst b/doc/guides/prog_guide/env_abstraction_layer.rst index 34d871c..12f37f2 100644 --- a/doc/guides/prog_guide/env_abstraction_layer.rst +++ b/doc/guides/prog_guide/env_abstraction_layer.rst @@ -213,6 +213,40 @@ device having emitted a Device Removal Event. In such case, calling callback. Care must be taken not to close the device from the interrupt handler context. It is necessary to reschedule such closing operation. +Devargs +~~~~~~~ + +The ``devargs`` can be used for whitelisting/blacklisting devices, identifying +DPDK ports and attaching/deatching devices. They all share the same syntax. + +It is split in 3 categories, where almost everything is optional key/value pairs: + +* bus (pci, vdev, vmbus, fslmc, etc) +* class (eth, crypto, etc) +* 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. + +The syntax has below rules: + +* 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. +* Each category can be used alone. + +Here is an example with all categories:: + + bus=pci,id=0000:01:00.0/class=eth,mac=00:11:22:33:44:55/driver=PMD_NAME,driverspecificproperty=VALUE + +It can also be simple like below:: + + class=eth,mac=00:11:22:33:44:55 + +A device is identified when every properties are matched. Before device is +probed, only the bus category is relevant. + Blacklisting ~~~~~~~~~~~~ -- 2.7.4