From patchwork Wed Jun 13 12:13:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Jozwiak X-Patchwork-Id: 41033 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 4934C1D9E8; Wed, 13 Jun 2018 14:14:28 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id EDB231D5F4 for ; Wed, 13 Jun 2018 14:14:26 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jun 2018 05:14:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,218,1526367600"; d="scan'208";a="63727630" Received: from tjozwiax-mobl.ger.corp.intel.com (HELO localhost.localdomain) ([10.103.104.42]) by fmsmga001.fm.intel.com with ESMTP; 13 Jun 2018 05:14:23 -0700 From: Tomasz Jozwiak To: fiona.trahe@intel.com, tomaszx.jozwiak@intel.com, dev@dpdk.org Date: Wed, 13 Jun 2018 14:13:44 +0200 Message-Id: <1528892062-4997-1-git-send-email-tomaszx.jozwiak@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523040732-3290-1-git-send-email-fiona.trahe@intel.com> References: <1523040732-3290-1-git-send-email-fiona.trahe@intel.com> Subject: [dpdk-dev] [PATCH v3 00/38] crypto/qat: refactor to support multiple services 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" From: Pablo de Lara The QAT crypto PMD was peppered with references to rte_cryptodev artefacts. Also the pci device it presented to the API layer was entirely owned by the one cryptodev device instance created by the probe. This patchset refactors the PMD so one pci device can present out multiple different device instances to implement different APIs, specifically cryptodev and compressdev instances. The code is refactored into - common code which handles the pci device discovery, configuration, queue-pair setup, stats gathering and data-path enqueue and dequeue. - service-specific code for symmetric crypto, which is a thin layer implementing the cryptodev API and using the common code. - place-holder files for service-specific code to support asymmetric crypto and compression services in future. The code is all still in the crypto/qat directory as it is functionally unchanged, still only supporting a symmetric crypto service. The code will move to drivers/common, /crypto and /compress in a future patch when this is needed for a compression PMD. Changes for v3: - fixed some commit messages - fixed compilation issue in one of the patches - split two commits into multiple commits Changes for v2: - fixed some bugs compiled in when debug enabled - added patch to remove MAX_NB_SESSIONS from config file - removed SPDX license patch as already applied - documented device name formats Fiona Trahe (36): crypto/qat: add qat common header crypto/qat: add qat device files crypto/qat: add symmetric session file crypto/qat: change filename crypto to sym crypto/qat: rename fns for consistency crypto/qat: renamed sym-specific structs crypto/qat: make enqueue function generic crypto/qat: make dequeue function generic crypto/qat: move generic qp fn to qp file crypto/qat: separate sym-specific from generic qp setup crypto/qat: move sym-specific qp code to sym file crypto/qat: remove dependencies on cryptodev from common crypto/qat: move defines from sym to qp header file crypto/qat: create structures to support various generations crypto/qat: rename sgl related objects crypto/qat: move sgl related element to appropriate files crypto/qat: add QAT PCI device struct crypto/qat: use generic driver name for PCI registration crypto/qat: move to using new device structure crypto/qat: use common stats structures crypto/qat: rename functions which depend on cryptodev crypto/qat: move code into appropriate files crypto/qat: add lock around csr access and change logic crypto/qat: remove incorrect usage of bundle number crypto/qat: rename variables crypto/qat: modify debug message crypto/qat: free cookie pool on queue creation error crypto/qat: remove unused macro crypto/qat: move macro to common file crypto/qat: register appropriately named device crypto/qat: add max PCI devices to config file crypto/qat: optimize adf modulo function crypto/qat: remove unused arguments crypto/qat: make response process function inline crypto/qat: check for service type doc/qat: specify QAT driver and device name formats Tomasz Jozwiak (2): crypto/qat: remove unused includes crypto/qat: remove configurable max number of sessions config/common_base | 6 +- config/rte_config.h | 7 +- doc/guides/cryptodevs/qat.rst | 12 + drivers/crypto/qat/Makefile | 10 +- drivers/crypto/qat/meson.build | 9 +- .../qat/qat_adf/adf_transport_access_macros.h | 9 +- drivers/crypto/qat/qat_adf/qat_algs.h | 126 -- drivers/crypto/qat/qat_asym_pmd.c | 17 + drivers/crypto/qat/qat_asym_pmd.h | 15 + drivers/crypto/qat/qat_common.c | 107 ++ drivers/crypto/qat/qat_common.h | 76 + drivers/crypto/qat/qat_comp_pmd.c | 18 + drivers/crypto/qat/qat_comp_pmd.h | 29 + drivers/crypto/qat/qat_crypto.c | 1696 ----------------- drivers/crypto/qat/qat_crypto.h | 150 -- drivers/crypto/qat/qat_device.c | 242 +++ drivers/crypto/qat/qat_device.h | 78 + drivers/crypto/qat/qat_qp.c | 463 +++-- drivers/crypto/qat/qat_qp.h | 106 ++ drivers/crypto/qat/qat_sym.c | 568 ++++++ drivers/crypto/qat/qat_sym.h | 154 ++ ..._capabilities.h => qat_sym_capabilities.h} | 6 +- drivers/crypto/qat/qat_sym_pmd.c | 335 ++++ drivers/crypto/qat/qat_sym_pmd.h | 40 + ...at_algs_build_desc.c => qat_sym_session.c} | 786 +++++++- drivers/crypto/qat/qat_sym_session.h | 143 ++ drivers/crypto/qat/rte_qat_cryptodev.c | 180 -- 27 files changed, 3042 insertions(+), 2346 deletions(-) delete mode 100644 drivers/crypto/qat/qat_adf/qat_algs.h create mode 100644 drivers/crypto/qat/qat_asym_pmd.c create mode 100644 drivers/crypto/qat/qat_asym_pmd.h create mode 100644 drivers/crypto/qat/qat_common.c create mode 100644 drivers/crypto/qat/qat_common.h create mode 100644 drivers/crypto/qat/qat_comp_pmd.c create mode 100644 drivers/crypto/qat/qat_comp_pmd.h delete mode 100644 drivers/crypto/qat/qat_crypto.c delete mode 100644 drivers/crypto/qat/qat_crypto.h create mode 100644 drivers/crypto/qat/qat_device.c create mode 100644 drivers/crypto/qat/qat_device.h create mode 100644 drivers/crypto/qat/qat_qp.h create mode 100644 drivers/crypto/qat/qat_sym.c create mode 100644 drivers/crypto/qat/qat_sym.h rename drivers/crypto/qat/{qat_crypto_capabilities.h => qat_sym_capabilities.h} (99%) create mode 100644 drivers/crypto/qat/qat_sym_pmd.c create mode 100644 drivers/crypto/qat/qat_sym_pmd.h rename drivers/crypto/qat/{qat_adf/qat_algs_build_desc.c => qat_sym_session.c} (59%) create mode 100644 drivers/crypto/qat/qat_sym_session.h delete mode 100644 drivers/crypto/qat/rte_qat_cryptodev.c