get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77375,
    "url": "https://patches.dpdk.org/api/patches/77375/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200911111901.2664106-1-pablo.de.lara.guarch@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<20200911111901.2664106-1-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200911111901.2664106-1-pablo.de.lara.guarch@intel.com",
    "date": "2020-09-11T11:18:59",
    "name": "[1/3] crypto/aesni_mb: support ZUC-EEA3/EIA3",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "be90e42910caf6b856b29d9ed999563ebcc085b1",
    "submitter": {
        "id": 9,
        "url": "https://patches.dpdk.org/api/people/9/?format=api",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200911111901.2664106-1-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [
        {
            "id": 12144,
            "url": "https://patches.dpdk.org/api/series/12144/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=12144",
            "date": "2020-09-11T11:18:59",
            "name": "[1/3] crypto/aesni_mb: support ZUC-EEA3/EIA3",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/12144/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/77375/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/77375/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D9083A04B5;\n\tFri, 11 Sep 2020 13:19:20 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id CC3441BFCD;\n\tFri, 11 Sep 2020 13:19:19 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 6990B1B9B7\n for <dev@dpdk.org>; Fri, 11 Sep 2020 13:19:17 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 04:19:14 -0700",
            "from silpixa00399593.ir.intel.com (HELO\n silpixa00399593.ger.corp.intel.com) ([10.237.223.27])\n by orsmga005.jf.intel.com with ESMTP; 11 Sep 2020 04:19:12 -0700"
        ],
        "IronPort-SDR": [
            "\n wqNYqCPRUWWzUmr+lRfWfOrSf/4LFJv6yfsiun3VHIphJOjm1LAqKtNyuYXUkN/M2DRHkEgUbK\n Zc24bMOTjRaA==",
            "\n IlosNOEAZ4EaIdO1hyo1huCi21jCWdUmQHCuhtwhStUkXYrxKotELyeNuaP/D+1HJr1e/2c9D0\n xwIynSqq8imw=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9740\"; a=\"138252063\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"138252063\"",
            "E=Sophos;i=\"5.76,415,1592895600\"; d=\"scan'208\";a=\"481289111\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "Date": "Fri, 11 Sep 2020 11:18:59 +0000",
        "Message-Id": "<20200911111901.2664106-1-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/3] crypto/aesni_mb: support ZUC-EEA3/EIA3",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>\n---\n doc/guides/cryptodevs/aesni_mb.rst            |  36 ++---\n doc/guides/cryptodevs/features/aesni_mb.ini   |   2 +\n doc/guides/rel_notes/release_20_11.rst        |   4 +\n .../crypto/aesni_mb/aesni_mb_pmd_private.h    | 127 ++++++++++--------\n drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c    |  60 ++++++++-\n .../crypto/aesni_mb/rte_aesni_mb_pmd_ops.c    |  47 +++++++\n 6 files changed, 204 insertions(+), 72 deletions(-)",
    "diff": "diff --git a/doc/guides/cryptodevs/aesni_mb.rst b/doc/guides/cryptodevs/aesni_mb.rst\nindex 15388d20a..0cb58bfe5 100644\n--- a/doc/guides/cryptodevs/aesni_mb.rst\n+++ b/doc/guides/cryptodevs/aesni_mb.rst\n@@ -32,23 +32,25 @@ Cipher algorithms:\n * RTE_CRYPTO_CIPHER_DES_CBC\n * RTE_CRYPTO_CIPHER_3DES_CBC\n * RTE_CRYPTO_CIPHER_DES_DOCSISBPI\n-\n-Hash algorithms:\n-\n-* RTE_CRYPTO_HASH_MD5_HMAC\n-* RTE_CRYPTO_HASH_SHA1_HMAC\n-* RTE_CRYPTO_HASH_SHA224_HMAC\n-* RTE_CRYPTO_HASH_SHA256_HMAC\n-* RTE_CRYPTO_HASH_SHA384_HMAC\n-* RTE_CRYPTO_HASH_SHA512_HMAC\n-* RTE_CRYPTO_HASH_AES_XCBC_HMAC\n-* RTE_CRYPTO_HASH_AES_CMAC\n-* RTE_CRYPTO_HASH_AES_GMAC\n-* RTE_CRYPTO_HASH_SHA1\n-* RTE_CRYPTO_HASH_SHA224\n-* RTE_CRYPTO_HASH_SHA256\n-* RTE_CRYPTO_HASH_SHA384\n-* RTE_CRYPTO_HASH_SHA512\n+* RTE_CRYPTO_CIPHER_ZUC_EEA3\n+\n+Authentication algorithms:\n+\n+* RTE_CRYPTO_AUTH_MD5_HMAC\n+* RTE_CRYPTO_AUTH_SHA1_HMAC\n+* RTE_CRYPTO_AUTH_SHA224_HMAC\n+* RTE_CRYPTO_AUTH_SHA256_HMAC\n+* RTE_CRYPTO_AUTH_SHA384_HMAC\n+* RTE_CRYPTO_AUTH_SHA512_HMAC\n+* RTE_CRYPTO_AUTH_AES_XCBC_HMAC\n+* RTE_CRYPTO_AUTH_AES_CMAC\n+* RTE_CRYPTO_AUTH_AES_GMAC\n+* RTE_CRYPTO_AUTH_SHA1\n+* RTE_CRYPTO_AUTH_SHA224\n+* RTE_CRYPTO_AUTH_SHA256\n+* RTE_CRYPTO_AUTH_SHA384\n+* RTE_CRYPTO_AUTH_SHA512\n+* RTE_CRYPTO_AUTH_ZUC_EIA3\n \n AEAD algorithms:\n \ndiff --git a/doc/guides/cryptodevs/features/aesni_mb.ini b/doc/guides/cryptodevs/features/aesni_mb.ini\nindex 38d255aff..47210333c 100644\n--- a/doc/guides/cryptodevs/features/aesni_mb.ini\n+++ b/doc/guides/cryptodevs/features/aesni_mb.ini\n@@ -30,6 +30,7 @@ AES DOCSIS BPI = Y\n DES CBC        = Y\n 3DES CBC       = Y\n DES DOCSIS BPI = Y\n+ZUC EEA3       = Y\n \n ;\n ; Supported authentication algorithms of the 'aesni_mb' crypto driver.\n@@ -49,6 +50,7 @@ SHA512 HMAC  = Y\n AES XCBC MAC = Y\n AES CMAC (128)  = Y\n AES GMAC     = Y\n+ZUC EIA3     = Y\n \n ;\n ; Supported AEAD algorithms of the 'aesni_mb' crypto driver.\ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex df227a177..1dc822cb7 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -55,6 +55,10 @@ New Features\n      Also, make sure to start the actual text at the margin.\n      =======================================================\n \n+* **Updated the AESNI MB crypto PMD.**\n+\n+  * Added support for ZUC-EEA3/EIA3 algorithms.\n+\n \n Removed Items\n -------------\ndiff --git a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h\nindex e0c7b4f7c..5dd94a87a 100644\n--- a/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h\n+++ b/drivers/crypto/aesni_mb/aesni_mb_pmd_private.h\n@@ -39,22 +39,25 @@ extern int aesni_mb_logtype_driver;\n /* Maximum length for digest */\n #define DIGEST_LENGTH_MAX 64\n static const unsigned auth_blocksize[] = {\n-\t\t[NULL_HASH]\t= 0,\n-\t\t[MD5]\t\t= 64,\n-\t\t[SHA1]\t\t= 64,\n-\t\t[SHA_224]\t= 64,\n-\t\t[SHA_256]\t= 64,\n-\t\t[SHA_384]\t= 128,\n-\t\t[SHA_512]\t= 128,\n-\t\t[AES_XCBC]\t= 16,\n-\t\t[AES_CCM]\t= 16,\n-\t\t[AES_CMAC]\t= 16,\n-\t\t[AES_GMAC]\t= 16,\n-\t\t[PLAIN_SHA1]\t= 64,\n-\t\t[PLAIN_SHA_224]\t= 64,\n-\t\t[PLAIN_SHA_256]\t= 64,\n-\t\t[PLAIN_SHA_384]\t= 128,\n-\t\t[PLAIN_SHA_512]\t= 128\n+\t\t[NULL_HASH]\t\t\t= 0,\n+\t\t[MD5]\t\t\t\t= 64,\n+\t\t[SHA1]\t\t\t\t= 64,\n+\t\t[SHA_224]\t\t\t= 64,\n+\t\t[SHA_256]\t\t\t= 64,\n+\t\t[SHA_384]\t\t\t= 128,\n+\t\t[SHA_512]\t\t\t= 128,\n+\t\t[AES_XCBC]\t\t\t= 16,\n+\t\t[AES_CCM]\t\t\t= 16,\n+\t\t[AES_CMAC]\t\t\t= 16,\n+\t\t[AES_GMAC]\t\t\t= 16,\n+\t\t[PLAIN_SHA1]\t\t\t= 64,\n+\t\t[PLAIN_SHA_224]\t\t\t= 64,\n+\t\t[PLAIN_SHA_256]\t\t\t= 64,\n+\t\t[PLAIN_SHA_384]\t\t\t= 128,\n+\t\t[PLAIN_SHA_512]\t\t\t= 128,\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\t\t[IMB_AUTH_ZUC_EIA3_BITLEN]\t= 16\n+#endif\n };\n \n /**\n@@ -70,22 +73,25 @@ get_auth_algo_blocksize(JOB_HASH_ALG algo)\n }\n \n static const unsigned auth_truncated_digest_byte_lengths[] = {\n-\t\t[MD5]\t\t= 12,\n-\t\t[SHA1]\t\t= 12,\n-\t\t[SHA_224]\t= 14,\n-\t\t[SHA_256]\t= 16,\n-\t\t[SHA_384]\t= 24,\n-\t\t[SHA_512]\t= 32,\n-\t\t[AES_XCBC]\t= 12,\n-\t\t[AES_CMAC]\t= 12,\n-\t\t[AES_CCM]\t= 8,\n-\t\t[NULL_HASH]\t= 0,\n-\t\t[AES_GMAC]\t= 16,\n-\t\t[PLAIN_SHA1]\t= 20,\n-\t\t[PLAIN_SHA_224]\t= 28,\n-\t\t[PLAIN_SHA_256]\t= 32,\n-\t\t[PLAIN_SHA_384]\t= 48,\n-\t\t[PLAIN_SHA_512]\t= 64\n+\t\t[MD5]\t\t\t\t= 12,\n+\t\t[SHA1]\t\t\t\t= 12,\n+\t\t[SHA_224]\t\t\t= 14,\n+\t\t[SHA_256]\t\t\t= 16,\n+\t\t[SHA_384]\t\t\t= 24,\n+\t\t[SHA_512]\t\t\t= 32,\n+\t\t[AES_XCBC]\t\t\t= 12,\n+\t\t[AES_CMAC]\t\t\t= 12,\n+\t\t[AES_CCM]\t\t\t= 8,\n+\t\t[NULL_HASH]\t\t\t= 0,\n+\t\t[AES_GMAC]\t\t\t= 16,\n+\t\t[PLAIN_SHA1]\t\t\t= 20,\n+\t\t[PLAIN_SHA_224]\t\t\t= 28,\n+\t\t[PLAIN_SHA_256]\t\t\t= 32,\n+\t\t[PLAIN_SHA_384]\t\t\t= 48,\n+\t\t[PLAIN_SHA_512]\t\t\t= 64,\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\t\t[IMB_AUTH_ZUC_EIA3_BITLEN]\t= 4\n+#endif\n };\n \n /**\n@@ -102,22 +108,25 @@ get_truncated_digest_byte_length(JOB_HASH_ALG algo)\n }\n \n static const unsigned auth_digest_byte_lengths[] = {\n-\t\t[MD5]\t\t= 16,\n-\t\t[SHA1]\t\t= 20,\n-\t\t[SHA_224]\t= 28,\n-\t\t[SHA_256]\t= 32,\n-\t\t[SHA_384]\t= 48,\n-\t\t[SHA_512]\t= 64,\n-\t\t[AES_XCBC]\t= 16,\n-\t\t[AES_CMAC]\t= 16,\n-\t\t[AES_CCM]\t= 16,\n-\t\t[AES_GMAC]\t= 12,\n-\t\t[NULL_HASH]\t= 0,\n-\t\t[PLAIN_SHA1]\t= 20,\n-\t\t[PLAIN_SHA_224]\t= 28,\n-\t\t[PLAIN_SHA_256]\t= 32,\n-\t\t[PLAIN_SHA_384]\t= 48,\n-\t\t[PLAIN_SHA_512]\t= 64\n+\t\t[MD5]\t\t\t\t= 16,\n+\t\t[SHA1]\t\t\t\t= 20,\n+\t\t[SHA_224]\t\t\t= 28,\n+\t\t[SHA_256]\t\t\t= 32,\n+\t\t[SHA_384]\t\t\t= 48,\n+\t\t[SHA_512]\t\t\t= 64,\n+\t\t[AES_XCBC]\t\t\t= 16,\n+\t\t[AES_CMAC]\t\t\t= 16,\n+\t\t[AES_CCM]\t\t\t= 16,\n+\t\t[AES_GMAC]\t\t\t= 12,\n+\t\t[NULL_HASH]\t\t\t= 0,\n+\t\t[PLAIN_SHA1]\t\t\t= 20,\n+\t\t[PLAIN_SHA_224]\t\t\t= 28,\n+\t\t[PLAIN_SHA_256]\t\t\t= 32,\n+\t\t[PLAIN_SHA_384]\t\t\t= 48,\n+\t\t[PLAIN_SHA_512]\t\t\t= 64,\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\t\t[IMB_AUTH_ZUC_EIA3_BITLEN]\t= 4\n+#endif\n \t/**< Vector mode dependent pointer table of the multi-buffer APIs */\n \n };\n@@ -189,6 +198,10 @@ struct aesni_mb_session {\n \t\tuint16_t length;\n \t\tuint16_t offset;\n \t} iv;\n+\tstruct {\n+\t\tuint16_t length;\n+\t\tuint16_t offset;\n+\t} auth_iv;\n \t/**< IV parameters */\n \n \t/** Cipher Parameters */const struct aesni_mb_op_fns *op_fns;\n@@ -209,19 +222,23 @@ struct aesni_mb_session {\n \t\t\t\tuint32_t decode[60] __rte_aligned(16);\n \t\t\t\t/**< decode key */\n \t\t\t} expanded_aes_keys;\n+\t\t\t/**< Expanded AES keys - Allocating space to\n+\t\t\t * contain the maximum expanded key size which\n+\t\t\t * is 240 bytes for 256 bit AES, calculate by:\n+\t\t\t * ((key size (bytes)) *\n+\t\t\t * ((number of rounds) + 1))\n+\t\t\t */\n \t\t\tstruct {\n \t\t\t\tconst void *ks_ptr[3];\n \t\t\t\tuint64_t key[3][16];\n \t\t\t} exp_3des_keys;\n+\t\t\t/**< Expanded 3DES keys */\n \n \t\t\tstruct gcm_key_data gcm_key;\n+\t\t\t/**< Expanded GCM key */\n+\t\t\tuint8_t zuc_cipher_key[16];\n+\t\t\t/**< ZUC cipher key */\n \t\t};\n-\t\t/**< Expanded AES keys - Allocating space to\n-\t\t * contain the maximum expanded key size which\n-\t\t * is 240 bytes for 256 bit AES, calculate by:\n-\t\t * ((key size (bytes)) *\n-\t\t * ((number of rounds) + 1))\n-\t\t */\n \t} cipher;\n \n \t/** Authentication Parameters */\n@@ -260,6 +277,8 @@ struct aesni_mb_session {\n \t\t\t\t\t\t    /**< k3. */\n \t\t\t} cmac;\n \t\t\t/**< Expanded XCBC authentication keys */\n+\t\t\tuint8_t zuc_auth_key[16];\n+\t\t\t/**< ZUC authentication key */\n \t\t};\n \t/** Generated digest size by the Multi-buffer library */\n \tuint16_t gen_digest_len;\ndiff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c\nindex 1bddbcf74..cdc33415a 100644\n--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c\n+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c\n@@ -146,6 +146,10 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,\n \t\treturn -1;\n \t}\n \n+\t/* Set IV parameters */\n+\tsess->auth_iv.offset = xform->auth.iv.offset;\n+\tsess->auth_iv.length = xform->auth.iv.length;\n+\n \t/* Set the request digest size */\n \tsess->auth.req_digest_len = xform->auth.digest_length;\n \n@@ -249,6 +253,22 @@ aesni_mb_set_session_auth_parameters(const MB_MGR *mb_mgr,\n \t\treturn 0;\n \t}\n \n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\tif (xform->auth.algo == RTE_CRYPTO_AUTH_ZUC_EIA3) {\n+\t\tsess->auth.algo = IMB_AUTH_ZUC_EIA3_BITLEN;\n+\t\tuint16_t zuc_eia3_digest_len =\n+\t\t\tget_truncated_digest_byte_length(IMB_AUTH_ZUC_EIA3_BITLEN);\n+\t\tif (sess->auth.req_digest_len != zuc_eia3_digest_len) {\n+\t\t\tAESNI_MB_LOG(ERR, \"Invalid digest size\\n\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\tsess->auth.gen_digest_len = sess->auth.req_digest_len;\n+\n+\t\tmemcpy(sess->auth.zuc_auth_key, xform->auth.key.data, 16);\n+\t\treturn 0;\n+\t}\n+#endif\n+\n \tswitch (xform->auth.algo) {\n \tcase RTE_CRYPTO_AUTH_MD5_HMAC:\n \t\tsess->auth.algo = MD5;\n@@ -381,6 +401,9 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr,\n \tuint8_t is_aes = 0;\n \tuint8_t is_3DES = 0;\n \tuint8_t is_docsis = 0;\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\tuint8_t is_zuc = 0;\n+#endif\n \n \tif (xform == NULL) {\n \t\tsess->cipher.mode = NULL_CIPHER;\n@@ -429,6 +452,12 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr,\n \t\tsess->cipher.mode = DES3;\n \t\tis_3DES = 1;\n \t\tbreak;\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\tcase RTE_CRYPTO_CIPHER_ZUC_EEA3:\n+\t\tsess->cipher.mode = IMB_CIPHER_ZUC_EEA3;\n+\t\tis_zuc = 1;\n+\t\tbreak;\n+#endif\n \tdefault:\n \t\tAESNI_MB_LOG(ERR, \"Unsupported cipher mode parameter\");\n \t\treturn -ENOTSUP;\n@@ -527,6 +556,16 @@ aesni_mb_set_session_cipher_parameters(const MB_MGR *mb_mgr,\n \t\t}\n \n \t\tsess->cipher.key_length_in_bytes = 24;\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\t} else if (is_zuc) {\n+\t\tif (xform->cipher.key.length != 16) {\n+\t\t\tAESNI_MB_LOG(ERR, \"Invalid cipher key length\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\tsess->cipher.key_length_in_bytes = 16;\n+\t\tmemcpy(sess->cipher.zuc_cipher_key, xform->cipher.key.data,\n+\t\t\t16);\n+#endif\n \t} else {\n \t\tif (xform->cipher.key.length != 8) {\n \t\t\tAESNI_MB_LOG(ERR, \"Invalid cipher key length\");\n@@ -693,6 +732,7 @@ aesni_mb_set_session_parameters(const MB_MGR *mb_mgr,\n \n \t/* Default IV length = 0 */\n \tsess->iv.length = 0;\n+\tsess->auth_iv.length = 0;\n \n \tret = aesni_mb_set_session_auth_parameters(mb_mgr, sess, auth_xform);\n \tif (ret != 0) {\n@@ -1168,7 +1208,13 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,\n \t\tjob->aes_enc_key_expanded = &session->cipher.gcm_key;\n \t\tjob->aes_dec_key_expanded = &session->cipher.gcm_key;\n \t\tbreak;\n-\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\tcase IMB_AUTH_ZUC_EIA3_BITLEN:\n+\t\tjob->u.ZUC_EIA3._key = session->auth.zuc_auth_key;\n+\t\tjob->u.ZUC_EIA3._iv = rte_crypto_op_ctod_offset(op, uint8_t *,\n+\t\t\t\t\t\tsession->auth_iv.offset);\n+\t\tbreak;\n+#endif\n \tdefault:\n \t\tjob->u.HMAC._hashed_auth_key_xor_ipad = session->auth.pads.inner;\n \t\tjob->u.HMAC._hashed_auth_key_xor_opad = session->auth.pads.outer;\n@@ -1186,6 +1232,13 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,\n \t\t}\n \t}\n \n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\tif (job->cipher_mode == IMB_CIPHER_ZUC_EEA3) {\n+\t\tjob->aes_enc_key_expanded = session->cipher.zuc_cipher_key;\n+\t\tjob->aes_dec_key_expanded = session->cipher.zuc_cipher_key;\n+\t}\n+#endif\n+\n \tif (!op->sym->m_dst) {\n \t\t/* in-place operation */\n \t\tm_dst = m_src;\n@@ -1286,6 +1339,11 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,\n \t\t\tsession->iv.offset);\n \t}\n \n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\tif (job->cipher_mode == IMB_CIPHER_ZUC_EEA3)\n+\t\tjob->msg_len_to_cipher_in_bytes >>= 3;\n+#endif\n+\n \t/* Set user data to be crypto operation data struct */\n \tjob->user_data = op;\n \ndiff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c\nindex 2362f0c3c..487db6330 100644\n--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c\n+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd_ops.c\n@@ -497,6 +497,53 @@ static const struct rte_cryptodev_capabilities aesni_mb_pmd_capabilities[] = {\n \t\t\t}, }\n \t\t}, }\n \t},\n+#if IMB_VERSION_NUM >= IMB_VERSION(0, 53, 3)\n+\t{\t/* ZUC (EIA3) */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,\n+\t\t{.sym = {\n+\t\t\t.xform_type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t\t{.auth = {\n+\t\t\t\t.algo = RTE_CRYPTO_AUTH_ZUC_EIA3,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 16,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.digest_size = {\n+\t\t\t\t\t.min = 4,\n+\t\t\t\t\t.max = 4,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 16,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t}\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\t/* ZUC (EEA3) */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,\n+\t\t{.sym = {\n+\t\t\t.xform_type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n+\t\t\t{.cipher = {\n+\t\t\t\t.algo = RTE_CRYPTO_CIPHER_ZUC_EEA3,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 16,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 16,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+#endif\n \tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n };\n \n",
    "prefixes": [
        "1/3"
    ]
}