From patchwork Mon Jul 1 15:55:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 55782 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EE2091BA64; Mon, 1 Jul 2019 17:56:29 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7DD7F1B9F9 for ; Mon, 1 Jul 2019 17:56:24 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jul 2019 08:56:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,439,1557212400"; d="scan'208";a="186523915" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by fmsmga004.fm.intel.com with ESMTP; 01 Jul 2019 08:56:14 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: thomas@monjalon.net, jerinj@marvell.com, jiayu.hu@intel.com, Bruce Richardson , Anatoly Burakov , Harry van Haaren Date: Mon, 1 Jul 2019 16:55:54 +0100 Message-Id: <20190701155600.43695-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190701155600.43695-1-bruce.richardson@intel.com> References: <20190530212525.40370-1-bruce.richardson@intel.com> <20190701155600.43695-1-bruce.richardson@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v4 3/9] usertools/dpdk-devbind.py: add support for IOAT devices 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In order to allow binding/unbinding of devices for use by the ioat_rawdev, we need to update the devbind script to add a new class of device, and add device ids for the specific HW instances. Signed-off-by: Bruce Richardson Acked-by: Anatoly Burakov Tested-by: Harry van Haaren --- V2: rather than adding a DMA section, add to "misc (rawdev)" section where other device types, e.g. ntb can also do. NOTE: this set largely overlaps with the equivalent changes made by the patchset adding NTB support [1]. Since it's unclear which set will be added first, this set is based off the latest head. [1] http://patches.dpdk.org/patch/55127/ --- doc/guides/rawdevs/ioat_rawdev.rst | 11 +++++++++++ usertools/dpdk-devbind.py | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/doc/guides/rawdevs/ioat_rawdev.rst b/doc/guides/rawdevs/ioat_rawdev.rst index 0c612e73a..1a4b0e03e 100644 --- a/doc/guides/rawdevs/ioat_rawdev.rst +++ b/doc/guides/rawdevs/ioat_rawdev.rst @@ -61,3 +61,14 @@ configurations. For builds using ``meson`` and ``ninja``, the driver will be built when the target platform is x86-based. + +Device Setup +------------- + +The Intel\ |reg| QuickData Technology HW devices will need to be bound to a +user-space IO driver for use. The script ``dpdk-devbind.py`` script +included with DPDK can be used to view the state of the devices and to bind +them to a suitable DPDK-supported kernel driver. When querying the status +of the devices, they will appear under the category of "Misc (rawdev) +devices", i.e. the command ``dpdk-devbind.py --status-dev misc`` can be +used to see the state of those devices alone. diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 9e79f0d28..5c1cd3548 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -36,11 +36,17 @@ octeontx2_npa = {'Class': '08', 'Vendor': '177d', 'Device': 'a0fb,a0fc', 'SVendor': None, 'SDevice': None} +intel_ioat_bdw = {'Class': '08', 'Vendor': '8086', 'Device': '6f20,6f21,6f22,6f23,6f24,6f25,6f26,6f27,6f2e,6f2f', + 'SVendor': None, 'SDevice': None} +intel_ioat_skx = {'Class': '08', 'Vendor': '8086', 'Device': '2021', + 'SVendor': None, 'SDevice': None} + network_devices = [network_class, cavium_pkx, avp_vnic, ifpga_class] crypto_devices = [encryption_class, intel_processor_class] eventdev_devices = [cavium_sso, cavium_tim, octeontx2_sso] mempool_devices = [cavium_fpa, octeontx2_npa] compress_devices = [cavium_zip] +misc_devices = [intel_ioat_bdw, intel_ioat_skx] # global dict ethernet devices present. Dictionary indexed by PCI address. # Each device within this is itself a dictionary of device properties @@ -595,6 +601,8 @@ def show_status(): if status_dev == "compress" or status_dev == "all": show_device_status(compress_devices , "Compress") + if status_dev == "misc" or status_dev == "all": + show_device_status(misc_devices, "Misc (rawdev)") def parse_args(): '''Parses the command-line arguments given by the user and takes the @@ -670,6 +678,7 @@ def do_arg_actions(): get_device_details(eventdev_devices) get_device_details(mempool_devices) get_device_details(compress_devices) + get_device_details(misc_devices) show_status() @@ -690,6 +699,7 @@ def main(): get_device_details(eventdev_devices) get_device_details(mempool_devices) get_device_details(compress_devices) + get_device_details(misc_devices) do_arg_actions() if __name__ == "__main__":