get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/137332/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 137332,
    "url": "http://patchwork.dpdk.org/api/patches/137332/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240227093550.562539-3-nishikanta.nayak@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20240227093550.562539-3-nishikanta.nayak@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20240227093550.562539-3-nishikanta.nayak@intel.com",
    "date": "2024-02-27T09:35:48",
    "name": "[v3,2/4] common/qat: update common driver to support GEN LCE",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c847f69b07b38a97c590d373e6c0d874d7922b31",
    "submitter": {
        "id": 3253,
        "url": "http://patchwork.dpdk.org/api/people/3253/?format=api",
        "name": "Nayak, Nishikanta",
        "email": "nishikanta.nayak@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "http://patchwork.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240227093550.562539-3-nishikanta.nayak@intel.com/mbox/",
    "series": [
        {
            "id": 31239,
            "url": "http://patchwork.dpdk.org/api/series/31239/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31239",
            "date": "2024-02-27T09:35:47",
            "name": "[v3,1/4] common/qat: add files specific to GEN LCE",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/31239/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/137332/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/137332/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id CDDF343BE0;\n\tTue, 27 Feb 2024 10:36:10 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id ECFEC42EAA;\n\tTue, 27 Feb 2024 10:36:03 +0100 (CET)",
            "from mgamail.intel.com (mgamail.intel.com [198.175.65.11])\n by mails.dpdk.org (Postfix) with ESMTP id 43B4C42EA2\n for <dev@dpdk.org>; Tue, 27 Feb 2024 10:36:01 +0100 (CET)",
            "from orviesa003.jf.intel.com ([10.64.159.143])\n by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Feb 2024 01:36:00 -0800",
            "from silpixa00401797.ir.intel.com (HELO\n silpixa00400355.ger.corp.intel.com) ([10.237.222.113])\n by orviesa003.jf.intel.com with ESMTP; 27 Feb 2024 01:35:59 -0800"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1709026561; x=1740562561;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=7tsqR2TNTiroe2Vyp2zRfhbMr9cQCyk+RvcBfPmQmPY=;\n b=K1zGtjLMvLG7PabF2TVXW14TS1FwSD2X5TiZWq888sprQ5uWXI3wv/Y0\n 2HfYP6miK83lVvsTOvRl/SpZ/ETtf/kLilVNmRtZJRU7uIoIwMyEPNmaD\n ZnNQRUdI3ITBbSrjG0jEyFq0iYgJ6RW3ieKnivZpX27a3GXGFAoCpNBiT\n ZnwakVgc6Cdx4KRUR8BeEn0V/x+Uz4iNOwepKSwPN4yEmA6ME6zzSYmm4\n uoz1Sp4qiRTKpN+ZVcYCuyDWuy2lNiVhscyim//DD1tGbLm5EalvUXjjr\n b+Pr4cSa8ihuzDPJBgO8mscUHynwZKn+2+88IMjPo2GbeVR500S1+4+vg g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10996\"; a=\"13908892\"",
            "E=Sophos;i=\"6.06,187,1705392000\"; d=\"scan'208\";a=\"13908892\"",
            "E=Sophos;i=\"6.06,187,1705392000\"; d=\"scan'208\";a=\"11716039\""
        ],
        "X-ExtLoop1": "1",
        "From": "Nishikant Nayak <nishikanta.nayak@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "ciara.power@intel.com, kai.ji@intel.com, arkadiuszx.kusztal@intel.com,\n rakesh.s.joshi@intel.com, Nishikant Nayak <nishikanta.nayak@intel.com>",
        "Subject": "[PATCH v3 2/4] common/qat: update common driver to support GEN LCE",
        "Date": "Tue, 27 Feb 2024 09:35:48 +0000",
        "Message-Id": "<20240227093550.562539-3-nishikanta.nayak@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20240227093550.562539-1-nishikanta.nayak@intel.com>",
        "References": "<20231220132616.318983-1-nishikanta.nayak@intel.com>\n <20240227093550.562539-1-nishikanta.nayak@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "Adding GEN LCE specific macros which is required for updating\nthe support for GEN LCE features.\nAlso this patch adds other macros which is being used by GEN LCE\nSpecific APIs.\n\nSigned-off-by: Nishikant Nayak <nishikanta.nayak@intel.com>\n---\nv2:\n    - Renamed device from GEN 5 to GEN LCE.\n    - Removed unused code.\n    - Updated macro names.\n    - Fixed code formatting\n---\n---\n .../qat/qat_adf/adf_transport_access_macros.h |  1 +\n drivers/common/qat/qat_adf/icp_qat_fw.h       | 34 ++++++++++++++\n drivers/common/qat/qat_adf/icp_qat_fw_la.h    | 45 ++++++++++++++++++-\n drivers/common/qat/qat_device.c               |  9 ++++\n 4 files changed, 88 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/common/qat/qat_adf/adf_transport_access_macros.h b/drivers/common/qat/qat_adf/adf_transport_access_macros.h\nindex 12a7258c60..19bd812419 100644\n--- a/drivers/common/qat/qat_adf/adf_transport_access_macros.h\n+++ b/drivers/common/qat/qat_adf/adf_transport_access_macros.h\n@@ -47,6 +47,7 @@\n #define ADF_RING_SIZE_512 0x03\n #define ADF_RING_SIZE_4K 0x06\n #define ADF_RING_SIZE_16K 0x08\n+#define ADF_RING_SIZE_64K 0x0A\n #define ADF_RING_SIZE_4M 0x10\n #define ADF_MIN_RING_SIZE ADF_RING_SIZE_128\n #define ADF_MAX_RING_SIZE ADF_RING_SIZE_4M\ndiff --git a/drivers/common/qat/qat_adf/icp_qat_fw.h b/drivers/common/qat/qat_adf/icp_qat_fw.h\nindex 3aa17ae041..b78158e01d 100644\n--- a/drivers/common/qat/qat_adf/icp_qat_fw.h\n+++ b/drivers/common/qat/qat_adf/icp_qat_fw.h\n@@ -57,6 +57,12 @@ struct icp_qat_fw_comn_req_hdr_cd_pars {\n \t} u;\n };\n \n+struct lce_key_buff_desc {\n+\tuint64_t keybuff;\n+\tuint32_t keybuff_resrvd1;\n+\tuint32_t keybuff_resrvd2;\n+};\n+\n struct icp_qat_fw_comn_req_mid {\n \tuint64_t opaque_data;\n \tuint64_t src_data_addr;\n@@ -123,6 +129,12 @@ struct icp_qat_fw_comn_resp {\n #define ICP_QAT_FW_COMN_NULL_VERSION_FLAG_BITPOS 0\n #define ICP_QAT_FW_COMN_NULL_VERSION_FLAG_MASK 0x1\n \n+/* GEN_LCE specific Common Header fields */\n+#define ICP_QAT_FW_COMN_DESC_LAYOUT_BITPOS 5\n+#define ICP_QAT_FW_COMN_DESC_LAYOUT_MASK 0x3\n+#define ICP_QAT_FW_COMN_GEN_LCE_DESC_LAYOUT 3\n+#define ICP_QAT_FW_COMN_GEN_LCE_STATUS_FLAG_ERROR 0\n+\n #define ICP_QAT_FW_COMN_OV_SRV_TYPE_GET(icp_qat_fw_comn_req_hdr_t) \\\n \ticp_qat_fw_comn_req_hdr_t.service_type\n \n@@ -168,6 +180,12 @@ struct icp_qat_fw_comn_resp {\n \t(((valid) & ICP_QAT_FW_COMN_VALID_FLAG_MASK) << \\\n \t ICP_QAT_FW_COMN_VALID_FLAG_BITPOS)\n \n+#define ICP_QAT_FW_COMN_HDR_FLAGS_BUILD_GEN_LCE(valid, desc_layout) \\\n+\t((((valid) & ICP_QAT_FW_COMN_VALID_FLAG_MASK) << \\\n+\tICP_QAT_FW_COMN_VALID_FLAG_BITPOS) | \\\n+\t(((desc_layout) & ICP_QAT_FW_COMN_DESC_LAYOUT_MASK) << \\\n+\tICP_QAT_FW_COMN_DESC_LAYOUT_BITPOS))\n+\n #define QAT_COMN_PTR_TYPE_BITPOS 0\n #define QAT_COMN_PTR_TYPE_MASK 0x1\n #define QAT_COMN_CD_FLD_TYPE_BITPOS 1\n@@ -180,10 +198,20 @@ struct icp_qat_fw_comn_resp {\n #define QAT_COMN_EXT_FLAGS_MASK 0x1\n #define QAT_COMN_EXT_FLAGS_USED 0x1\n \n+/* GEN_LCE specific Common Request Flags fields */\n+#define QAT_COMN_KEYBUF_USAGE_BITPOS 1\n+#define QAT_COMN_KEYBUF_USAGE_MASK 0x1\n+#define QAT_COMN_KEY_BUFFER_USED 1\n+\n #define ICP_QAT_FW_COMN_FLAGS_BUILD(cdt, ptr) \\\n \t((((cdt) & QAT_COMN_CD_FLD_TYPE_MASK) << QAT_COMN_CD_FLD_TYPE_BITPOS) \\\n \t | (((ptr) & QAT_COMN_PTR_TYPE_MASK) << QAT_COMN_PTR_TYPE_BITPOS))\n \n+#define ICP_QAT_FW_COMN_FLAGS_BUILD_GEN_LCE(ptr, keybuf) \\\n+\t((((ptr) & QAT_COMN_PTR_TYPE_MASK) << QAT_COMN_PTR_TYPE_BITPOS) | \\\n+\t (((keybuf) & QAT_COMN_PTR_TYPE_MASK) << \\\n+\t   QAT_COMN_KEYBUF_USAGE_BITPOS))\n+\n #define ICP_QAT_FW_COMN_PTR_TYPE_GET(flags) \\\n \tQAT_FIELD_GET(flags, QAT_COMN_PTR_TYPE_BITPOS, QAT_COMN_PTR_TYPE_MASK)\n \n@@ -249,6 +277,8 @@ struct icp_qat_fw_comn_resp {\n #define QAT_COMN_RESP_CMP_END_OF_LAST_BLK_MASK 0x1\n #define QAT_COMN_RESP_UNSUPPORTED_REQUEST_BITPOS 2\n #define QAT_COMN_RESP_UNSUPPORTED_REQUEST_MASK 0x1\n+#define QAT_COMN_RESP_INVALID_PARAM_BITPOS 1\n+#define QAT_COMN_RESP_INVALID_PARAM_MASK 0x1\n #define QAT_COMN_RESP_XLT_WA_APPLIED_BITPOS 0\n #define QAT_COMN_RESP_XLT_WA_APPLIED_MASK 0x1\n \n@@ -280,6 +310,10 @@ struct icp_qat_fw_comn_resp {\n \tQAT_FIELD_GET(status, QAT_COMN_RESP_UNSUPPORTED_REQUEST_BITPOS, \\\n \tQAT_COMN_RESP_UNSUPPORTED_REQUEST_MASK)\n \n+#define ICP_QAT_FW_COMN_RESP_INVALID_PARAM_STAT_GET(status) \\\n+\tQAT_FIELD_GET(status, QAT_COMN_RESP_INVALID_PARAM_BITPOS, \\\n+\tQAT_COMN_RESP_INVALID_PARAM_MASK)\n+\n #define ICP_QAT_FW_COMN_STATUS_FLAG_OK 0\n #define ICP_QAT_FW_COMN_STATUS_FLAG_ERROR 1\n #define ICP_QAT_FW_COMN_STATUS_CMP_END_OF_LAST_BLK_FLAG_CLR 0\ndiff --git a/drivers/common/qat/qat_adf/icp_qat_fw_la.h b/drivers/common/qat/qat_adf/icp_qat_fw_la.h\nindex 215b291b74..eba9f96685 100644\n--- a/drivers/common/qat/qat_adf/icp_qat_fw_la.h\n+++ b/drivers/common/qat/qat_adf/icp_qat_fw_la.h\n@@ -22,14 +22,24 @@ enum icp_qat_fw_la_cmd_id {\n \tICP_QAT_FW_LA_CMD_DELIMITER = 18\n };\n \n+/* In GEN_LCE Command ID 4 corresponds to AEAD */\n+#define ICP_QAT_FW_LA_CMD_AEAD 4\n+\n #define ICP_QAT_FW_LA_ICV_VER_STATUS_PASS ICP_QAT_FW_COMN_STATUS_FLAG_OK\n #define ICP_QAT_FW_LA_ICV_VER_STATUS_FAIL ICP_QAT_FW_COMN_STATUS_FLAG_ERROR\n #define ICP_QAT_FW_LA_TRNG_STATUS_PASS ICP_QAT_FW_COMN_STATUS_FLAG_OK\n #define ICP_QAT_FW_LA_TRNG_STATUS_FAIL ICP_QAT_FW_COMN_STATUS_FLAG_ERROR\n \n+/* GEN_LCE Hash, HMAC and GCM Verification Status */\n+#define ICP_QAT_FW_LA_VER_STATUS_FAIL ICP_QAT_FW_COMN_GEN_LCE_STATUS_FLAG_ERROR\n+\n+\n struct icp_qat_fw_la_bulk_req {\n \tstruct icp_qat_fw_comn_req_hdr comn_hdr;\n-\tstruct icp_qat_fw_comn_req_hdr_cd_pars cd_pars;\n+\tunion {\n+\t\tstruct icp_qat_fw_comn_req_hdr_cd_pars cd_pars;\n+\t\tstruct lce_key_buff_desc key_buff;\n+\t};\n \tstruct icp_qat_fw_comn_req_mid comn_mid;\n \tstruct icp_qat_fw_comn_req_rqpars serv_specif_rqpars;\n \tstruct icp_qat_fw_comn_req_cd_ctrl cd_ctrl;\n@@ -81,6 +91,21 @@ struct icp_qat_fw_la_bulk_req {\n #define ICP_QAT_FW_LA_PARTIAL_END 2\n #define QAT_LA_PARTIAL_BITPOS 0\n #define QAT_LA_PARTIAL_MASK 0x3\n+\n+/* GEN_LCE specific Crypto Flags fields */\n+#define ICP_QAT_FW_SYM_AEAD_ALGO_BITPOS 6\n+#define ICP_QAT_FW_SYM_AEAD_ALGO_MASK 0x3\n+#define ICP_QAT_FW_SYM_IV_SIZE_BITPOS 9\n+#define ICP_QAT_FW_SYM_IV_SIZE_MASK 0x3\n+#define ICP_QAT_FW_SYM_IV_IN_DESC_BITPOS 11\n+#define ICP_QAT_FW_SYM_IV_IN_DESC_MASK 0x1\n+#define ICP_QAT_FW_SYM_IV_IN_DESC_VALID 1\n+#define ICP_QAT_FW_SYM_DIRECTION_BITPOS 15\n+#define ICP_QAT_FW_SYM_DIRECTION_MASK 0x1\n+\n+/* In GEN_LCE AEAD AES GCM Algorithm has ID 0 */\n+#define QAT_LA_CRYPTO_AEAD_AES_GCM_GEN_LCE 0\n+\n #define ICP_QAT_FW_LA_FLAGS_BUILD(zuc_proto, gcm_iv_len, auth_rslt, proto, \\\n \tcmp_auth, ret_auth, update_state, \\\n \tciph_iv, ciphcfg, partial) \\\n@@ -188,6 +213,23 @@ struct icp_qat_fw_la_bulk_req {\n \tQAT_FIELD_SET(flags, val, QAT_LA_PARTIAL_BITPOS, \\\n \tQAT_LA_PARTIAL_MASK)\n \n+/* GEN_LCE specific Crypto Flags operations */\n+#define ICP_QAT_FW_SYM_AEAD_ALGO_SET(flags, val) \\\n+\tQAT_FIELD_SET(flags, val, ICP_QAT_FW_SYM_AEAD_ALGO_BITPOS, \\\n+\tICP_QAT_FW_SYM_AEAD_ALGO_MASK)\n+\n+#define ICP_QAT_FW_SYM_IV_SIZE_SET(flags, val) \\\n+\tQAT_FIELD_SET(flags, val, ICP_QAT_FW_SYM_IV_SIZE_BITPOS, \\\n+\tICP_QAT_FW_SYM_IV_SIZE_MASK)\n+\n+#define ICP_QAT_FW_SYM_IV_IN_DESC_FLAG_SET(flags, val) \\\n+\tQAT_FIELD_SET(flags, val, ICP_QAT_FW_SYM_IV_IN_DESC_BITPOS, \\\n+\tICP_QAT_FW_SYM_IV_IN_DESC_MASK)\n+\n+#define ICP_QAT_FW_SYM_DIR_FLAG_SET(flags, val) \\\n+\tQAT_FIELD_SET(flags, val, ICP_QAT_FW_SYM_DIRECTION_BITPOS, \\\n+\tICP_QAT_FW_SYM_DIRECTION_MASK)\n+\n #define QAT_FW_LA_MODE2 1\n #define QAT_FW_LA_NO_MODE2 0\n #define QAT_FW_LA_MODE2_MASK 0x1\n@@ -424,4 +466,5 @@ struct icp_qat_fw_la_cipher_30_req_params {\n \n \t\t} u;\n };\n+\n #endif\ndiff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c\nindex f55dc3c6f0..18e652e393 100644\n--- a/drivers/common/qat/qat_device.c\n+++ b/drivers/common/qat/qat_device.c\n@@ -62,6 +62,12 @@ static const struct rte_pci_id pci_id_qat_map[] = {\n \t\t{\n \t\t\tRTE_PCI_DEVICE(0x8086, 0x4945),\n \t\t},\n+\t\t{\n+\t\t\tRTE_PCI_DEVICE(0x8086, 0x1454),\n+\t\t},\n+\t\t{\n+\t\t\tRTE_PCI_DEVICE(0x8086, 0x1456),\n+\t\t},\n \t\t{.device_id = 0},\n };\n \n@@ -199,6 +205,9 @@ pick_gen(const struct rte_pci_device *pci_dev)\n \tcase 0x4943:\n \tcase 0x4945:\n \t\treturn QAT_GEN4;\n+\tcase 0x1454:\n+\tcase 0x1456:\n+\t\treturn QAT_GEN_LCE;\n \tdefault:\n \t\tQAT_LOG(ERR, \"Invalid dev_id, can't determine generation\");\n \t\treturn QAT_N_GENS;\n",
    "prefixes": [
        "v3",
        "2/4"
    ]
}