get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 75451,
    "url": "http://patches.dpdk.org/api/patches/75451/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200812063127.8687-7-vikas.gupta@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200812063127.8687-7-vikas.gupta@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200812063127.8687-7-vikas.gupta@broadcom.com",
    "date": "2020-08-12T06:31:25",
    "name": "[v1,6/8] crypto/bcmfs: add session handling and capabilities",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "118ea1db2418a638f761a39fe5bdf93a1694839a",
    "submitter": {
        "id": 1907,
        "url": "http://patches.dpdk.org/api/people/1907/?format=api",
        "name": "Vikas Gupta",
        "email": "vikas.gupta@broadcom.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200812063127.8687-7-vikas.gupta@broadcom.com/mbox/",
    "series": [
        {
            "id": 11611,
            "url": "http://patches.dpdk.org/api/series/11611/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=11611",
            "date": "2020-08-12T06:31:19",
            "name": "Add Crypto PMD for Broadcom`s FlexSparc devices",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/11611/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/75451/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/75451/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 22D8FA04C2;\n\tWed, 12 Aug 2020 08:33:06 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EC0EE1C0DB;\n\tWed, 12 Aug 2020 08:32:03 +0200 (CEST)",
            "from mail-qt1-f196.google.com (mail-qt1-f196.google.com\n [209.85.160.196]) by dpdk.org (Postfix) with ESMTP id 4029B1C0DB\n for <dev@dpdk.org>; Wed, 12 Aug 2020 08:32:02 +0200 (CEST)",
            "by mail-qt1-f196.google.com with SMTP id k18so734350qtm.10\n for <dev@dpdk.org>; Tue, 11 Aug 2020 23:32:02 -0700 (PDT)",
            "from rahul_yocto_ubuntu18.ibn.broadcom.net ([192.19.234.250])\n by smtp.gmail.com with ESMTPSA id x3sm1301552qkx.3.2020.08.11.23.31.57\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 11 Aug 2020 23:31:59 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=K8gOyGRBus1AJAaJ9MyRiUxt5tEiVhITnRjA0eyRWlo=;\n b=a3Wm6zQEpHONpIfgkkg2UggIuLM3wLyZZrfUf7QdJbPMlOPFAjOyFjtK3lmbSt+hsQ\n oJuQF1VgosB9+zMZ/8J2LfGHbQF3Wzgw8xvk0lE5cfCbKeJIanX4CFn/XcrYrwMlBJ18\n 4qlsYqimdrVlpqYGgdDur7J5Qjn692JU8e8mM=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=K8gOyGRBus1AJAaJ9MyRiUxt5tEiVhITnRjA0eyRWlo=;\n b=WowbmfSeL6uRqKY3lg2JJ366Z6w7YeDo66jJhw01gRKgR61BswVOlEIMVUOgcWved6\n iAxKJ50Ija0LraMgQGCLCPUPt2qVSHFIRrk6EZJ0LUWgf6TRMBgRZKjNVNQj2AqKHIhi\n 0VDXQ7ovlMeOCjJiUSyrPXUogfKQERIVJEVpXMQCe9+kV+wIwAEXMfy7+QUDMRelUdU8\n iTeTasyQWTeQutP7ZZtc8/lFeyRgy6WdO86ZWUzBfnXbCrPqknHgAJfzobKMarwx1o/R\n h2D+7rDmZxqqDlaEov8SAwzqJ21tgr91svq7mtNkFC2cR0EKSUWrvxbx+iWrd/x7MSUQ\n EoXg==",
        "X-Gm-Message-State": "AOAM530e/s8svRURiYcSoWPqwSq66X15SoxpiuyvXPkoStdOjdIV9mhd\n +miMHvB2INWaTWGTGHTO9W5yK0g8Yd1Z+MZ2znl+LPZ+fAlZETuP9ZngQdrQ+1SFBx3ybXcEZT/\n SyzrSDeTfVTbd51w5jETfBUldkGbD3IGLKuLarIBKhCp91TofQIXEmsgMlShu",
        "X-Google-Smtp-Source": "\n ABdhPJxwcFafhbadnkga58XZ8x0GYjhUWqQOAq0Zu7XefCH8y5yAB7lwSTCAR4VVnJGgfavBVMbUiQ==",
        "X-Received": "by 2002:aed:3361:: with SMTP id u88mr4949567qtd.79.1597213920239;\n Tue, 11 Aug 2020 23:32:00 -0700 (PDT)",
        "From": "Vikas Gupta <vikas.gupta@broadcom.com>",
        "To": "dev@dpdk.org,\n\takhil.goyal@nxp.com",
        "Cc": "ajit.khaparde@broadcom.com, vikram.prakash@broadcom.com,\n Vikas Gupta <vikas.gupta@broadcom.com>,\n Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>",
        "Date": "Wed, 12 Aug 2020 12:01:25 +0530",
        "Message-Id": "<20200812063127.8687-7-vikas.gupta@broadcom.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200812063127.8687-1-vikas.gupta@broadcom.com>",
        "References": "<20200811145813.44754-1-vikas.gupta@broadcom.com>\n <20200812063127.8687-1-vikas.gupta@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH v1 6/8] crypto/bcmfs: add session handling and\n\tcapabilities",
        "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": "Add session handling and capabilities supported by crypto h/w\naccelerator.\n\nSigned-off-by: Vikas Gupta <vikas.gupta@broadcom.com>\nSigned-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n doc/guides/cryptodevs/bcmfs.rst               |  46 ++\n doc/guides/cryptodevs/features/bcmfs.ini      |  56 ++\n drivers/crypto/bcmfs/bcmfs_sym_capabilities.c | 764 ++++++++++++++++++\n drivers/crypto/bcmfs/bcmfs_sym_capabilities.h |  16 +\n drivers/crypto/bcmfs/bcmfs_sym_defs.h         | 170 ++++\n drivers/crypto/bcmfs/bcmfs_sym_pmd.c          |  13 +\n drivers/crypto/bcmfs/bcmfs_sym_session.c      | 426 ++++++++++\n drivers/crypto/bcmfs/bcmfs_sym_session.h      |  99 +++\n drivers/crypto/bcmfs/meson.build              |   4 +-\n 9 files changed, 1593 insertions(+), 1 deletion(-)\n create mode 100644 doc/guides/cryptodevs/features/bcmfs.ini\n create mode 100644 drivers/crypto/bcmfs/bcmfs_sym_capabilities.c\n create mode 100644 drivers/crypto/bcmfs/bcmfs_sym_capabilities.h\n create mode 100644 drivers/crypto/bcmfs/bcmfs_sym_defs.h\n create mode 100644 drivers/crypto/bcmfs/bcmfs_sym_session.c\n create mode 100644 drivers/crypto/bcmfs/bcmfs_sym_session.h",
    "diff": "diff --git a/doc/guides/cryptodevs/bcmfs.rst b/doc/guides/cryptodevs/bcmfs.rst\nindex 752ce028a..2488b19f7 100644\n--- a/doc/guides/cryptodevs/bcmfs.rst\n+++ b/doc/guides/cryptodevs/bcmfs.rst\n@@ -18,9 +18,55 @@ CONFIG_RTE_LIBRTE_PMD_BCMFS setting is set to `y` in config/common_base file.\n \n * ``CONFIG_RTE_LIBRTE_PMD_BCMFS=y``\n \n+Features\n+~~~~~~~~\n+\n+The BCMFS SYM PMD has support for:\n+\n+Cipher algorithms:\n+\n+* ``RTE_CRYPTO_CIPHER_3DES_CBC``\n+* ``RTE_CRYPTO_CIPHER_3DES_CTR``\n+* ``RTE_CRYPTO_CIPHER_AES128_CBC``\n+* ``RTE_CRYPTO_CIPHER_AES192_CBC``\n+* ``RTE_CRYPTO_CIPHER_AES256_CBC``\n+* ``RTE_CRYPTO_CIPHER_AES128_CTR``\n+* ``RTE_CRYPTO_CIPHER_AES192_CTR``\n+* ``RTE_CRYPTO_CIPHER_AES256_CTR``\n+* ``RTE_CRYPTO_CIPHER_AES_XTS``\n+* ``RTE_CRYPTO_CIPHER_DES_CBC``\n+\n+Hash algorithms:\n+\n+* ``RTE_CRYPTO_AUTH_SHA1``\n+* ``RTE_CRYPTO_AUTH_SHA1_HMAC``\n+* ``RTE_CRYPTO_AUTH_SHA224``\n+* ``RTE_CRYPTO_AUTH_SHA224_HMAC``\n+* ``RTE_CRYPTO_AUTH_SHA256``\n+* ``RTE_CRYPTO_AUTH_SHA256_HMAC``\n+* ``RTE_CRYPTO_AUTH_SHA384``\n+* ``RTE_CRYPTO_AUTH_SHA384_HMAC``\n+* ``RTE_CRYPTO_AUTH_SHA512``\n+* ``RTE_CRYPTO_AUTH_SHA512_HMAC``\n+* ``RTE_CRYPTO_AUTH_AES_XCBC_MAC``\n+* ``RTE_CRYPTO_AUTH_MD5_HMAC``\n+* ``RTE_CRYPTO_AUTH_AES_GMAC``\n+* ``RTE_CRYPTO_AUTH_AES_CMAC``\n+\n+Supported AEAD algorithms:\n+\n+* ``RTE_CRYPTO_AEAD_AES_GCM``\n+* ``RTE_CRYPTO_AEAD_AES_CCM``\n+\n Initialization\n --------------\n BCMFS crypto PMD depend upon the devices present in the path\n /sys/bus/platform/devices/fs<version>/<dev_name> on the platform.\n Each cryptodev PMD instance can be attached to the nodes present\n in the mentioned path.\n+\n+Limitations\n+~~~~~~~~~~~\n+\n+* Only supports the session-oriented API implementation (session-less APIs are not supported).\n+* CCM is not supported on Broadcom`s SoCs having FlexSparc4 unit.\ndiff --git a/doc/guides/cryptodevs/features/bcmfs.ini b/doc/guides/cryptodevs/features/bcmfs.ini\nnew file mode 100644\nindex 000000000..82d2c639d\n--- /dev/null\n+++ b/doc/guides/cryptodevs/features/bcmfs.ini\n@@ -0,0 +1,56 @@\n+;\n+; Supported features of the 'bcmfs' crypto driver.\n+;\n+; Refer to default.ini for the full list of available PMD features.\n+;\n+[Features]\n+Symmetric crypto       = Y\n+Sym operation chaining = Y\n+HW Accelerated         = Y\n+Protocol offload       = Y\n+In Place SGL           = Y\n+\n+;\n+; Supported crypto algorithms of the 'bcmfs' crypto driver.\n+;\n+[Cipher]\n+AES CBC (128)  = Y\n+AES CBC (192)  = Y\n+AES CBC (256)  = Y\n+AES CTR (128)  = Y\n+AES CTR (192)  = Y\n+AES CTR (256)  = Y\n+AES XTS (128)  = Y\n+AES XTS (256)  = Y\n+3DES CBC       = Y\n+DES CBC        = Y\n+;\n+; Supported authentication algorithms of the 'bcmfs' crypto driver.\n+;\n+[Auth]\n+MD5 HMAC     = Y\n+SHA1         = Y\n+SHA1 HMAC    = Y\n+SHA224       = Y\n+SHA224 HMAC  = Y\n+SHA256       = Y\n+SHA256 HMAC  = Y\n+SHA384       = Y\n+SHA384 HMAC  = Y\n+SHA512       = Y\n+SHA512 HMAC  = Y\n+AES GMAC     = Y\n+AES CMAC (128) = Y\n+AES CBC = Y\n+AES XCBC = Y\n+\n+;\n+; Supported AEAD algorithms of the 'bcmfs' crypto driver.\n+;\n+[AEAD]\n+AES GCM (128)     = Y\n+AES GCM (192)     = Y\n+AES GCM (256)     = Y\n+AES CCM (128)     = Y\n+AES CCM (192)     = Y\n+AES CCM (256)     = Y\ndiff --git a/drivers/crypto/bcmfs/bcmfs_sym_capabilities.c b/drivers/crypto/bcmfs/bcmfs_sym_capabilities.c\nnew file mode 100644\nindex 000000000..bb8fa9f81\n--- /dev/null\n+++ b/drivers/crypto/bcmfs/bcmfs_sym_capabilities.c\n@@ -0,0 +1,764 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#include <rte_cryptodev.h>\n+\n+#include \"bcmfs_sym_capabilities.h\"\n+\n+static const struct rte_cryptodev_capabilities bcmfs_sym_capabilities[] = {\n+\t{\n+\t\t/* SHA1 */\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_SHA1,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 20,\n+\t\t\t\t\t.max = 20,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* MD5 */\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_MD5,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 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{\n+\t\t/* SHA224 */\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_SHA224,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 28,\n+\t\t\t\t\t.max = 28,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA256 */\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_SHA256,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 32,\n+\t\t\t\t\t.max = 32,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA384 */\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_SHA384,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 48,\n+\t\t\t\t\t.max = 48,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA512 */\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_SHA512,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 64,\n+\t\t\t\t\t.max = 64,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_224 */\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_SHA3_224,\n+\t\t\t\t.block_size = 144,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 28,\n+\t\t\t\t\t.max = 28,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_256 */\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_SHA3_256,\n+\t\t\t\t.block_size = 136,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 32,\n+\t\t\t\t\t.max = 32,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_384 */\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_SHA3_384,\n+\t\t\t\t.block_size = 104,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 48,\n+\t\t\t\t\t.max = 48,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_512 */\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_SHA3_512,\n+\t\t\t\t.block_size = 72,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\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 = 64,\n+\t\t\t\t\t.max = 64,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA1 HMAC */\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_SHA1_HMAC,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 64,\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 = 20,\n+\t\t\t\t\t.max = 20,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* MD5 HMAC */\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_MD5_HMAC,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 64,\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 = 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.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA224 HMAC */\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_SHA224_HMAC,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 64,\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 = 28,\n+\t\t\t\t\t.max = 28,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA256 HMAC */\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_SHA256_HMAC,\n+\t\t\t\t.block_size = 64,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 64,\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 = 32,\n+\t\t\t\t\t.max = 32,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA384 HMAC */\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_SHA384_HMAC,\n+\t\t\t\t.block_size = 128,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 128,\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 = 48,\n+\t\t\t\t\t.max = 48,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA512 HMAC*/\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_SHA512_HMAC,\n+\t\t\t\t.block_size = 128,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 128,\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 = 64,\n+\t\t\t\t\t.max = 64,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_224 HMAC */\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_SHA3_224_HMAC,\n+\t\t\t\t.block_size = 144,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 144,\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 = 28,\n+\t\t\t\t\t.max = 28,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_256 HMAC */\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_SHA3_256_HMAC,\n+\t\t\t\t.block_size = 136,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 136,\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 = 32,\n+\t\t\t\t\t.max = 32,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_384 HMAC */\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_SHA3_384_HMAC,\n+\t\t\t\t.block_size = 104,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 104,\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 = 48,\n+\t\t\t\t\t.max = 48,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* SHA3_512 HMAC */\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_SHA3_512_HMAC,\n+\t\t\t\t.block_size = 72,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\n+\t\t\t\t\t.max = 72,\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 = 64,\n+\t\t\t\t\t.max = 64,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t},\n+\t\t\t\t.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES XCBC MAC */\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_AES_XCBC_MAC,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\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 = 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.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES GMAC */\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{.aead = {\n+\t\t\t\t.algo = RTE_CRYPTO_AUTH_AES_GMAC,\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 = 32,\n+\t\t\t\t\t.increment = 8\n+\t\t\t\t},\n+\t\t\t\t.digest_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.aad_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 65535,\n+\t\t\t\t\t.increment = 1\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 12,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 4\n+\t\t\t\t},\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES CMAC */\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_AES_CMAC,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\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 = 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.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES CBC MAC */\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_AES_CBC_MAC,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 1,\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 = 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.aad_size = { 0 }\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES ECB */\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_AES_ECB,\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 = 32,\n+\t\t\t\t\t.increment = 8\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 0,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t}\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES CBC */\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_AES_CBC,\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 = 32,\n+\t\t\t\t\t.increment = 8\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{\n+\t\t/* AES CTR */\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_AES_CTR,\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 = 32,\n+\t\t\t\t\t.increment = 8\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{\n+\t\t/* AES XTS */\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_AES_XTS,\n+\t\t\t\t.block_size = 16,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 32,\n+\t\t\t\t\t.max = 64,\n+\t\t\t\t\t.increment = 32\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{\n+\t\t/* DES CBC */\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_DES_CBC,\n+\t\t\t\t.block_size = 8,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 8,\n+\t\t\t\t\t.max = 8,\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{\n+\t\t/* 3DES CBC */\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_3DES_CBC,\n+\t\t\t\t.block_size = 8,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 24,\n+\t\t\t\t\t.max = 24,\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{\n+\t\t/* 3DES ECB */\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_3DES_ECB,\n+\t\t\t\t.block_size = 8,\n+\t\t\t\t.key_size = {\n+\t\t\t\t\t.min = 24,\n+\t\t\t\t\t.max = 24,\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 = 0,\n+\t\t\t\t\t.max = 0,\n+\t\t\t\t\t.increment = 0\n+\t\t\t\t}\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES GCM */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,\n+\t\t{.sym = {\n+\t\t\t.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,\n+\t\t\t{.aead = {\n+\t\t\t\t.algo = RTE_CRYPTO_AEAD_AES_GCM,\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 = 32,\n+\t\t\t\t\t.increment = 8\n+\t\t\t\t},\n+\t\t\t\t.digest_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.aad_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 65535,\n+\t\t\t\t\t.increment = 1\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 12,\n+\t\t\t\t\t.max = 16,\n+\t\t\t\t\t.increment = 4\n+\t\t\t\t},\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\t{\n+\t\t/* AES CCM */\n+\t\t.op = RTE_CRYPTO_OP_TYPE_SYMMETRIC,\n+\t\t{.sym = {\n+\t\t\t.xform_type = RTE_CRYPTO_SYM_XFORM_AEAD,\n+\t\t\t{.aead = {\n+\t\t\t\t.algo = RTE_CRYPTO_AEAD_AES_CCM,\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 = 32,\n+\t\t\t\t\t.increment = 8\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 = 16,\n+\t\t\t\t\t.increment = 2\n+\t\t\t\t},\n+\t\t\t\t.aad_size = {\n+\t\t\t\t\t.min = 0,\n+\t\t\t\t\t.max = 65535,\n+\t\t\t\t\t.increment = 1\n+\t\t\t\t},\n+\t\t\t\t.iv_size = {\n+\t\t\t\t\t.min = 7,\n+\t\t\t\t\t.max = 13,\n+\t\t\t\t\t.increment = 1\n+\t\t\t\t},\n+\t\t\t}, }\n+\t\t}, }\n+\t},\n+\n+\tRTE_CRYPTODEV_END_OF_CAPABILITIES_LIST()\n+};\n+\n+const struct rte_cryptodev_capabilities *\n+bcmfs_sym_get_capabilities(void)\n+{\n+\treturn bcmfs_sym_capabilities;\n+}\ndiff --git a/drivers/crypto/bcmfs/bcmfs_sym_capabilities.h b/drivers/crypto/bcmfs/bcmfs_sym_capabilities.h\nnew file mode 100644\nindex 000000000..3ff61b7d2\n--- /dev/null\n+++ b/drivers/crypto/bcmfs/bcmfs_sym_capabilities.h\n@@ -0,0 +1,16 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#ifndef _BCMFS_SYM_CAPABILITIES_H_\n+#define _BCMFS_SYM_CAPABILITIES_H_\n+\n+/*\n+ * Get capabilities list for the device\n+ *\n+ */\n+const struct rte_cryptodev_capabilities *bcmfs_sym_get_capabilities(void);\n+\n+#endif /* _BCMFS_SYM_CAPABILITIES_H__ */\n+\ndiff --git a/drivers/crypto/bcmfs/bcmfs_sym_defs.h b/drivers/crypto/bcmfs/bcmfs_sym_defs.h\nnew file mode 100644\nindex 000000000..b5657a9bc\n--- /dev/null\n+++ b/drivers/crypto/bcmfs/bcmfs_sym_defs.h\n@@ -0,0 +1,170 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#ifndef _BCMFS_SYM_DEFS_H_\n+#define _BCMFS_SYM_DEFS_H_\n+\n+/*\n+ * Max block size of hash algorithm\n+ * currently SHA3 supports max block size\n+ * of 144 bytes\n+ */\n+#define BCMFS_MAX_KEY_SIZE\t144\n+#define BCMFS_MAX_IV_SIZE\t16\n+#define BCMFS_MAX_DIGEST_SIZE\t64\n+\n+/** Symmetric Cipher Direction */\n+enum bcmfs_crypto_cipher_op {\n+\t/** Encrypt cipher operation */\n+\tBCMFS_CRYPTO_CIPHER_OP_ENCRYPT,\n+\n+\t/** Decrypt cipher operation */\n+\tBCMFS_CRYPTO_CIPHER_OP_DECRYPT,\n+};\n+\n+/** Symmetric Cipher Algorithms */\n+enum bcmfs_crypto_cipher_algorithm {\n+\t/** NULL cipher algorithm. No mode applies to the NULL algorithm. */\n+\tBCMFS_CRYPTO_CIPHER_NONE = 0,\n+\n+\t/** Triple DES algorithm in CBC mode */\n+\tBCMFS_CRYPTO_CIPHER_DES_CBC,\n+\n+\t/** Triple DES algorithm in ECB mode */\n+\tBCMFS_CRYPTO_CIPHER_DES_ECB,\n+\n+\t/** Triple DES algorithm in CBC mode */\n+\tBCMFS_CRYPTO_CIPHER_3DES_CBC,\n+\n+\t/** Triple DES algorithm in ECB mode */\n+\tBCMFS_CRYPTO_CIPHER_3DES_ECB,\n+\n+\t/** AES algorithm in CBC mode */\n+\tBCMFS_CRYPTO_CIPHER_AES_CBC,\n+\n+\t/** AES algorithm in CCM mode. */\n+\tBCMFS_CRYPTO_CIPHER_AES_CCM,\n+\n+\t/** AES algorithm in Counter mode */\n+\tBCMFS_CRYPTO_CIPHER_AES_CTR,\n+\n+\t/** AES algorithm in ECB mode */\n+\tBCMFS_CRYPTO_CIPHER_AES_ECB,\n+\n+\t/** AES algorithm in GCM mode. */\n+\tBCMFS_CRYPTO_CIPHER_AES_GCM,\n+\n+\t/** AES algorithm in XTS mode */\n+\tBCMFS_CRYPTO_CIPHER_AES_XTS,\n+\n+\t/** AES algorithm in OFB mode */\n+\tBCMFS_CRYPTO_CIPHER_AES_OFB,\n+};\n+\n+/** Symmetric Authentication Algorithms */\n+enum bcmfs_crypto_auth_algorithm {\n+\t/** NULL hash algorithm. */\n+\tBCMFS_CRYPTO_AUTH_NONE = 0,\n+\n+\t/** MD5 algorithm */\n+\tBCMFS_CRYPTO_AUTH_MD5,\n+\n+\t/** MD5-HMAC algorithm */\n+\tBCMFS_CRYPTO_AUTH_MD5_HMAC,\n+\n+\t/** SHA1 algorithm */\n+\tBCMFS_CRYPTO_AUTH_SHA1,\n+\n+\t/** SHA1-HMAC algorithm */\n+\tBCMFS_CRYPTO_AUTH_SHA1_HMAC,\n+\n+\t/** 224 bit SHA algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA224,\n+\n+\t/** 224 bit SHA-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA224_HMAC,\n+\n+\t/** 256 bit SHA algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA256,\n+\n+\t/** 256 bit SHA-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA256_HMAC,\n+\n+\t/** 384 bit SHA algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA384,\n+\n+\t/** 384 bit SHA-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA384_HMAC,\n+\n+\t/** 512 bit SHA algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA512,\n+\n+\t/** 512 bit SHA-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA512_HMAC,\n+\n+\t/** 224 bit SHA3 algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_224,\n+\n+\t/** 224 bit SHA-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_224_HMAC,\n+\n+\t/** 256 bit SHA3 algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_256,\n+\n+\t/** 256 bit SHA3-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_256_HMAC,\n+\n+\t/** 384 bit SHA3 algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_384,\n+\n+\t/** 384 bit SHA3-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_384_HMAC,\n+\n+\t/** 512 bit SHA3 algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_512,\n+\n+\t/** 512 bit SHA3-HMAC algorithm. */\n+\tBCMFS_CRYPTO_AUTH_SHA3_512_HMAC,\n+\n+\t/** AES XCBC MAC algorithm */\n+\tBCMFS_CRYPTO_AUTH_AES_XCBC_MAC,\n+\n+\t/** AES CMAC algorithm */\n+\tBCMFS_CRYPTO_AUTH_AES_CMAC,\n+\n+\t/** AES CBC-MAC algorithm */\n+\tBCMFS_CRYPTO_AUTH_AES_CBC_MAC,\n+\n+\t/** AES CBC-MAC algorithm */\n+\tBCMFS_CRYPTO_AUTH_AES_GMAC,\n+\n+\t/** AES algorithm in GCM mode. */\n+\tBCMFS_CRYPTO_AUTH_AES_GCM,\n+\n+\t/** AES algorithm in CCM mode. */\n+\tBCMFS_CRYPTO_AUTH_AES_CCM,\n+};\n+\n+/** Symmetric Authentication Operations */\n+enum bcmfs_crypto_auth_op {\n+\t/** Verify authentication digest */\n+\tBCMFS_CRYPTO_AUTH_OP_VERIFY,\n+\n+\t/** Generate authentication digest */\n+\tBCMFS_CRYPTO_AUTH_OP_GENERATE,\n+};\n+\n+enum bcmfs_sym_crypto_class {\n+\t/** Cipher algorithm */\n+\tBCMFS_CRYPTO_CIPHER,\n+\n+\t/** Hash algorithm */\n+\tBCMFS_CRYPTO_HASH,\n+\n+\t/** Authenticated Encryption with Assosciated Data algorithm */\n+\tBCMFS_CRYPTO_AEAD,\n+};\n+\n+#endif /* _BCMFS_SYM_DEFS_H_ */\ndiff --git a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c\nindex 0f96915f7..381ca8ea4 100644\n--- a/drivers/crypto/bcmfs/bcmfs_sym_pmd.c\n+++ b/drivers/crypto/bcmfs/bcmfs_sym_pmd.c\n@@ -14,6 +14,8 @@\n #include \"bcmfs_qp.h\"\n #include \"bcmfs_sym_pmd.h\"\n #include \"bcmfs_sym_req.h\"\n+#include \"bcmfs_sym_session.h\"\n+#include \"bcmfs_sym_capabilities.h\"\n \n uint8_t cryptodev_bcmfs_driver_id;\n \n@@ -65,6 +67,7 @@ bcmfs_sym_dev_info_get(struct rte_cryptodev *dev,\n \t\tdev_info->max_nb_queue_pairs = fsdev->max_hw_qps;\n \t\t/* No limit of number of sessions */\n \t\tdev_info->sym.max_nb_sessions = 0;\n+\t\tdev_info->capabilities = bcmfs_sym_get_capabilities();\n \t}\n }\n \n@@ -228,6 +231,10 @@ static struct rte_cryptodev_ops crypto_bcmfs_ops = {\n \t/* Queue-Pair management */\n \t.queue_pair_setup       = bcmfs_sym_qp_setup,\n \t.queue_pair_release     = bcmfs_sym_qp_release,\n+\t/* Crypto session related operations */\n+\t.sym_session_get_size   = bcmfs_sym_session_get_private_size,\n+\t.sym_session_configure  = bcmfs_sym_session_configure,\n+\t.sym_session_clear      = bcmfs_sym_session_clear\n };\n \n /** Enqueue burst */\n@@ -239,6 +246,7 @@ bcmfs_sym_pmd_enqueue_op_burst(void *queue_pair,\n \tint i, j;\n \tuint16_t enq = 0;\n \tstruct bcmfs_sym_request *sreq;\n+\tstruct bcmfs_sym_session *sess;\n \tstruct bcmfs_qp *qp = (struct bcmfs_qp *)queue_pair;\n \n \tif (nb_ops == 0)\n@@ -252,6 +260,10 @@ bcmfs_sym_pmd_enqueue_op_burst(void *queue_pair,\n \t\tnb_ops = qp->nb_descriptors - qp->nb_pending_requests;\n \n \tfor (i = 0; i < nb_ops; i++) {\n+\t\tsess = bcmfs_sym_get_session(ops[i]);\n+\t\tif (unlikely(sess == NULL))\n+\t\t\tgoto enqueue_err;\n+\n \t\tif (rte_mempool_get(qp->sr_mp, (void **)&sreq))\n \t\t\tgoto enqueue_err;\n \n@@ -356,6 +368,7 @@ bcmfs_sym_dev_create(struct bcmfs_device *fsdev)\n \tfsdev->sym_dev = internals;\n \n \tinternals->sym_dev_id = cryptodev->data->dev_id;\n+\tinternals->fsdev_capabilities = bcmfs_sym_get_capabilities();\n \n \tBCMFS_LOG(DEBUG, \"Created bcmfs-sym device %s as cryptodev instance %d\",\n \t\t  cryptodev->data->name, internals->sym_dev_id);\ndiff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.c b/drivers/crypto/bcmfs/bcmfs_sym_session.c\nnew file mode 100644\nindex 000000000..3d1fce629\n--- /dev/null\n+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.c\n@@ -0,0 +1,426 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#include <rte_crypto.h>\n+#include <rte_crypto_sym.h>\n+#include <rte_log.h>\n+\n+#include \"bcmfs_logs.h\"\n+#include \"bcmfs_sym_defs.h\"\n+#include \"bcmfs_sym_pmd.h\"\n+#include \"bcmfs_sym_session.h\"\n+\n+/** Configure the session from a crypto xform chain */\n+static enum bcmfs_sym_chain_order\n+crypto_get_chain_order(const struct rte_crypto_sym_xform *xform)\n+{\n+\tenum bcmfs_sym_chain_order res = BCMFS_SYM_CHAIN_NOT_SUPPORTED;\n+\n+\n+\tif (xform != NULL) {\n+\t\tif (xform->type == RTE_CRYPTO_SYM_XFORM_AEAD)\n+\t\t\tres = BCMFS_SYM_CHAIN_AEAD;\n+\n+\t\tif (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH) {\n+\t\t\tif (xform->next == NULL)\n+\t\t\t\tres =  BCMFS_SYM_CHAIN_ONLY_AUTH;\n+\t\t\telse if (xform->next->type ==\n+\t\t\t\t\tRTE_CRYPTO_SYM_XFORM_CIPHER)\n+\t\t\t\tres = BCMFS_SYM_CHAIN_AUTH_CIPHER;\n+\t\t}\n+\t\tif (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {\n+\t\t\tif (xform->next == NULL)\n+\t\t\t\tres =  BCMFS_SYM_CHAIN_ONLY_CIPHER;\n+\t\t\telse if (xform->next->type == RTE_CRYPTO_SYM_XFORM_AUTH)\n+\t\t\t\tres =  BCMFS_SYM_CHAIN_CIPHER_AUTH;\n+\t\t}\n+\t}\n+\n+\treturn res;\n+}\n+\n+/* Get session cipher key from input cipher key */\n+static void\n+get_key(const uint8_t *input_key, int keylen, uint8_t *session_key)\n+{\n+\tmemcpy(session_key, input_key, keylen);\n+}\n+\n+/* Set session cipher parameters */\n+static int\n+crypto_set_session_cipher_parameters\n+\t\t\t(struct bcmfs_sym_session *sess,\n+\t\t\t const struct rte_crypto_cipher_xform *cipher_xform)\n+{\n+\tint rc = 0;\n+\n+\t/* Select cipher direction */\n+\tsess->cipher.direction = cipher_xform->op;\n+\tsess->cipher.key.length = cipher_xform->key.length;\n+\tsess->cipher.iv.offset = cipher_xform->iv.offset;\n+\tsess->cipher.iv.length = cipher_xform->iv.length;\n+\n+\t/* Select cipher algo */\n+\tswitch (cipher_xform->algo) {\n+\tcase RTE_CRYPTO_CIPHER_3DES_CBC:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_3DES_CBC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_CIPHER_3DES_ECB:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_3DES_ECB;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_CIPHER_DES_CBC:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_DES_CBC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_CIPHER_AES_CBC:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_AES_CBC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_CIPHER_AES_ECB:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_AES_ECB;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_CIPHER_AES_CTR:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_AES_CTR;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_CIPHER_AES_XTS:\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_AES_XTS;\n+\t\tbreak;\n+\tdefault:\n+\t\tBCMFS_DP_LOG(ERR, \"set session failed. unknown algo\");\n+\t\tsess->cipher.algo = RTE_CRYPTO_CIPHER_NULL;\n+\t\trc = -EINVAL;\n+\t\tbreak;\n+\t}\n+\n+\tif (!rc)\n+\t\tget_key(cipher_xform->key.data,\n+\t\t\tsess->cipher.key.length,\n+\t\t\tsess->cipher.key.data);\n+\n+\treturn rc;\n+}\n+\n+/* Set session auth parameters */\n+static int\n+crypto_set_session_auth_parameters(struct bcmfs_sym_session *sess,\n+\t\t\t\t   const struct rte_crypto_auth_xform\n+\t\t\t\t   *auth_xform)\n+{\n+\tint rc = 0;\n+\n+\t/* Select auth generate/verify */\n+\tsess->auth.operation = auth_xform->op ?\n+\t\t\t       BCMFS_CRYPTO_AUTH_OP_GENERATE :\n+\t\t\t       BCMFS_CRYPTO_AUTH_OP_VERIFY;\n+\tsess->auth.key.length = auth_xform->key.length;\n+\tsess->auth.digest_length = auth_xform->digest_length;\n+\tsess->auth.iv.length = auth_xform->iv.length;\n+\tsess->auth.iv.offset = auth_xform->iv.offset;\n+\n+\t/* Select auth algo */\n+\tswitch (auth_xform->algo) {\n+\tcase RTE_CRYPTO_AUTH_MD5:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_MD5;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA1:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA1;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA224:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA224;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA256:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA256;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA384:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA384;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA512:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA512;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_224:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_224;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_256:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_256;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_384:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_384;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_512:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_512;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_MD5_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_MD5_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA1_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA1_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA224_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA224_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA256_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA256_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA384_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA384_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA512_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA512_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_224_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_224_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_256_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_256_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_384_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_384_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_SHA3_512_HMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_SHA3_512_HMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_AES_XCBC_MAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_AES_XCBC_MAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_AES_GMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_AES_GMAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_AES_CBC_MAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_AES_CBC_MAC;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AUTH_AES_CMAC:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_AES_CMAC;\n+\t\tbreak;\n+\tdefault:\n+\t\tBCMFS_DP_LOG(ERR, \"Invalid Auth algorithm\\n\");\n+\t\trc = -EINVAL;\n+\t\tbreak;\n+\t}\n+\n+\tif (!rc)\n+\t\tget_key(auth_xform->key.data,\n+\t\t\tauth_xform->key.length,\n+\t\t\tsess->auth.key.data);\n+\n+\treturn rc;\n+}\n+\n+/* Set session aead parameters */\n+static int\n+crypto_set_session_aead_parameters(struct bcmfs_sym_session *sess,\n+\t\t\t\t   const struct rte_crypto_sym_xform *xform)\n+{\n+\tint rc = 0;\n+\n+\tsess->cipher.direction = xform->aead.op;\n+\tsess->cipher.iv.offset = xform->aead.iv.offset;\n+\tsess->cipher.iv.length = xform->aead.iv.length;\n+\tsess->aead.aad_length = xform->aead.aad_length;\n+\tsess->cipher.key.length = xform->aead.key.length;\n+\tsess->auth.digest_length = xform->aead.digest_length;\n+\n+\t/* Select aead algo */\n+\tswitch (xform->aead.algo) {\n+\tcase RTE_CRYPTO_AEAD_AES_CCM:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_AES_CCM;\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_AES_CCM;\n+\t\tbreak;\n+\tcase RTE_CRYPTO_AEAD_AES_GCM:\n+\t\tsess->auth.algo = BCMFS_CRYPTO_AUTH_AES_GCM;\n+\t\tsess->cipher.algo = BCMFS_CRYPTO_CIPHER_AES_GCM;\n+\t\tbreak;\n+\tdefault:\n+\t\tBCMFS_DP_LOG(ERR, \"Invalid aead algorithm\\n\");\n+\t\trc = -EINVAL;\n+\t\tbreak;\n+\t}\n+\n+\tif (!rc)\n+\t\tget_key(xform->aead.key.data,\n+\t\t\txform->aead.key.length,\n+\t\t\tsess->cipher.key.data);\n+\n+\treturn rc;\n+}\n+\n+static struct rte_crypto_auth_xform *\n+crypto_get_auth_xform(struct rte_crypto_sym_xform *xform)\n+{\n+\tdo {\n+\t\tif (xform->type == RTE_CRYPTO_SYM_XFORM_AUTH)\n+\t\t\treturn &xform->auth;\n+\n+\t\txform = xform->next;\n+\t} while (xform);\n+\n+\treturn NULL;\n+}\n+\n+static struct rte_crypto_cipher_xform *\n+crypto_get_cipher_xform(struct rte_crypto_sym_xform *xform)\n+{\n+\tdo {\n+\t\tif (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER)\n+\t\t\treturn &xform->cipher;\n+\n+\t\txform = xform->next;\n+\t} while (xform);\n+\n+\treturn NULL;\n+}\n+\n+\n+/** Parse crypto xform chain and set private session parameters */\n+static int\n+crypto_set_session_parameters(struct bcmfs_sym_session *sess,\n+\t\t\t      struct rte_crypto_sym_xform *xform)\n+{\n+\tint rc = 0;\n+\tstruct rte_crypto_cipher_xform *cipher_xform =\n+\t\t\tcrypto_get_cipher_xform(xform);\n+\tstruct rte_crypto_auth_xform *auth_xform =\n+\t\t\tcrypto_get_auth_xform(xform);\n+\n+\tsess->chain_order = crypto_get_chain_order(xform);\n+\n+\tswitch (sess->chain_order) {\n+\tcase BCMFS_SYM_CHAIN_ONLY_CIPHER:\n+\t\tif (crypto_set_session_cipher_parameters(sess,\n+\t\t\t\t\t\t\tcipher_xform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid cipher\");\n+\t\t\trc = -EINVAL;\n+\t\t}\n+\t\tbreak;\n+\tcase BCMFS_SYM_CHAIN_ONLY_AUTH:\n+\t\tif (crypto_set_session_auth_parameters(sess,\n+\t\t\t\t\t\t\tauth_xform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid auth\");\n+\t\t\trc = -EINVAL;\n+\t\t}\n+\t\tbreak;\n+\tcase BCMFS_SYM_CHAIN_AUTH_CIPHER:\n+\t\tsess->cipher_first = false;\n+\t\tif (crypto_set_session_auth_parameters(sess,\n+\t\t\t\t\t\t\tauth_xform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid auth\");\n+\t\t\trc = -EINVAL;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\tif (crypto_set_session_cipher_parameters(sess,\n+\t\t\t\t\t\t\tcipher_xform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid cipher\");\n+\t\t\trc = -EINVAL;\n+\t\t}\n+\t\tbreak;\n+\tcase BCMFS_SYM_CHAIN_CIPHER_AUTH:\n+\t\tsess->cipher_first = true;\n+\t\tif (crypto_set_session_auth_parameters(sess,\n+\t\t\t\t\t\t\tauth_xform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid auth\");\n+\t\t\trc = -EINVAL;\n+\t\t\tgoto error;\n+\t\t}\n+\n+\t\tif (crypto_set_session_cipher_parameters(sess,\n+\t\t\t\t\t\t\tcipher_xform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid cipher\");\n+\t\t\trc = -EINVAL;\n+\t\t}\n+\t\tbreak;\n+\tcase BCMFS_SYM_CHAIN_AEAD:\n+\t\tif (crypto_set_session_aead_parameters(sess,\n+\t\t\t\t\t\t\txform)) {\n+\t\t\tBCMFS_DP_LOG(ERR, \"Invalid aead\");\n+\t\t\trc = -EINVAL;\n+\t\t}\n+\t\tbreak;\n+\tdefault:\n+\t\tBCMFS_DP_LOG(ERR, \"Invalid chain order\\n\");\n+\t\trc = -EINVAL;\n+\t\tbreak;\n+\t}\n+\n+error:\n+\treturn rc;\n+}\n+\n+struct bcmfs_sym_session *\n+bcmfs_sym_get_session(struct rte_crypto_op *op)\n+{\n+\tstruct bcmfs_sym_session *sess = NULL;\n+\n+\tif (unlikely(op->sess_type == RTE_CRYPTO_OP_SESSIONLESS)) {\n+\t\tBCMFS_DP_LOG(ERR, \"operations op(%p) is sessionless\", op);\n+\t} else if (likely(op->sym->session != NULL)) {\n+\t\t/* get existing session */\n+\t\tsess = (struct bcmfs_sym_session *)\n+\t\t\t  get_sym_session_private_data(op->sym->session,\n+\t\t\t\t\t\t       cryptodev_bcmfs_driver_id);\n+\t}\n+\n+\tif (sess == NULL)\n+\t\top->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;\n+\n+\treturn sess;\n+}\n+\n+int\n+bcmfs_sym_session_configure(struct rte_cryptodev *dev,\n+\t\t\t    struct rte_crypto_sym_xform *xform,\n+\t\t\t    struct rte_cryptodev_sym_session *sess,\n+\t\t\t    struct rte_mempool *mempool)\n+{\n+\tvoid *sess_private_data;\n+\tint ret;\n+\n+\tif (unlikely(sess == NULL)) {\n+\t\tBCMFS_DP_LOG(ERR, \"Invalid session struct\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (rte_mempool_get(mempool, &sess_private_data)) {\n+\t\tBCMFS_DP_LOG(ERR,\n+\t\t\t\"Couldn't get object from session mempool\");\n+\t\treturn -ENOMEM;\n+\t}\n+\n+\tret = crypto_set_session_parameters(sess_private_data, xform);\n+\n+\tif (ret != 0) {\n+\t\tBCMFS_DP_LOG(ERR, \"Failed configure session parameters\");\n+\t\t/* Return session to mempool */\n+\t\trte_mempool_put(mempool, sess_private_data);\n+\t\treturn ret;\n+\t}\n+\n+\tset_sym_session_private_data(sess, dev->driver_id,\n+\t\t\t\t     sess_private_data);\n+\n+\treturn 0;\n+}\n+\n+/* Clear the memory of session so it doesn't leave key material behind */\n+void\n+bcmfs_sym_session_clear(struct rte_cryptodev *dev,\n+\t\t\tstruct rte_cryptodev_sym_session  *sess)\n+{\n+\tuint8_t index = dev->driver_id;\n+\tvoid *sess_priv = get_sym_session_private_data(sess, index);\n+\n+\tif (sess_priv) {\n+\t\tstruct rte_mempool *sess_mp;\n+\n+\t\tmemset(sess_priv, 0, sizeof(struct bcmfs_sym_session));\n+\t\tsess_mp = rte_mempool_from_obj(sess_priv);\n+\n+\t\tset_sym_session_private_data(sess, index, NULL);\n+\t\trte_mempool_put(sess_mp, sess_priv);\n+\t}\n+}\n+\n+unsigned int\n+bcmfs_sym_session_get_private_size(struct rte_cryptodev *dev __rte_unused)\n+{\n+\treturn sizeof(struct bcmfs_sym_session);\n+}\ndiff --git a/drivers/crypto/bcmfs/bcmfs_sym_session.h b/drivers/crypto/bcmfs/bcmfs_sym_session.h\nnew file mode 100644\nindex 000000000..43deedcf8\n--- /dev/null\n+++ b/drivers/crypto/bcmfs/bcmfs_sym_session.h\n@@ -0,0 +1,99 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2020 Broadcom\n+ * All rights reserved.\n+ */\n+\n+#ifndef _BCMFS_SYM_SESSION_H_\n+#define _BCMFS_SYM_SESSION_H_\n+\n+#include <stdbool.h>\n+#include <rte_crypto.h>\n+#include <rte_cryptodev_pmd.h>\n+\n+#include \"bcmfs_sym_defs.h\"\n+#include \"bcmfs_sym_req.h\"\n+\n+/* BCMFS_SYM operation order mode enumerator */\n+enum bcmfs_sym_chain_order {\n+\tBCMFS_SYM_CHAIN_ONLY_CIPHER,\n+\tBCMFS_SYM_CHAIN_ONLY_AUTH,\n+\tBCMFS_SYM_CHAIN_CIPHER_AUTH,\n+\tBCMFS_SYM_CHAIN_AUTH_CIPHER,\n+\tBCMFS_SYM_CHAIN_AEAD,\n+\tBCMFS_SYM_CHAIN_NOT_SUPPORTED\n+};\n+\n+/* BCMFS_SYM crypto private session structure */\n+struct bcmfs_sym_session {\n+\tenum bcmfs_sym_chain_order chain_order;\n+\n+\t/* Cipher Parameters */\n+\tstruct {\n+\t\tenum bcmfs_crypto_cipher_op direction;\n+\t\t/* cipher operation direction */\n+\t\tenum bcmfs_crypto_cipher_algorithm algo;\n+\t\t/* cipher algorithm */\n+\n+\t\tstruct {\n+\t\t\tuint8_t data[BCMFS_MAX_KEY_SIZE];\n+\t\t\t/* key data */\n+\t\t\tsize_t length;\n+\t\t\t/* key length in bytes */\n+\t\t} key;\n+\n+\t\tstruct {\n+\t\t\tuint16_t offset;\n+\t\t\tuint16_t length;\n+\t\t} iv;\n+\t} cipher;\n+\n+\t/* Authentication Parameters */\n+\tstruct {\n+\t\tenum bcmfs_crypto_auth_op operation;\n+\t\t/* auth operation generate or verify */\n+\t\tenum bcmfs_crypto_auth_algorithm algo;\n+\t\t/* cipher algorithm */\n+\n+\t\tstruct {\n+\t\t\tuint8_t data[BCMFS_MAX_KEY_SIZE];\n+\t\t\t/* key data */\n+\t\t\tsize_t length;\n+\t\t\t/* key length in bytes */\n+\t\t} key;\n+\tstruct {\n+\t\t\tuint16_t offset;\n+\t\t\tuint16_t length;\n+\t\t} iv;\n+\n+\t\tuint16_t digest_length;\n+\t} auth;\n+\n+\t/* aead Parameters */\n+\tstruct {\n+\t\tuint16_t aad_length;\n+\t} aead;\n+\tbool cipher_first;\n+} __rte_cache_aligned;\n+\n+int\n+bcmfs_process_crypto_op(struct rte_crypto_op *op,\n+\t\t\tstruct bcmfs_sym_session *sess,\n+\t\t\tstruct bcmfs_sym_request *req);\n+\n+int\n+bcmfs_sym_session_configure(struct rte_cryptodev *dev,\n+\t\t\t    struct rte_crypto_sym_xform *xform,\n+\t\t\t    struct rte_cryptodev_sym_session *sess,\n+\t\t\t    struct rte_mempool *mempool);\n+\n+void\n+bcmfs_sym_session_clear(struct rte_cryptodev *dev,\n+\t\t\tstruct rte_cryptodev_sym_session  *sess);\n+\n+unsigned int\n+bcmfs_sym_session_get_private_size(struct rte_cryptodev *dev __rte_unused);\n+\n+struct bcmfs_sym_session *\n+bcmfs_sym_get_session(struct rte_crypto_op *op);\n+\n+#endif /* _BCMFS_SYM_SESSION_H_ */\ndiff --git a/drivers/crypto/bcmfs/meson.build b/drivers/crypto/bcmfs/meson.build\nindex d9a3d73e9..2e86c733e 100644\n--- a/drivers/crypto/bcmfs/meson.build\n+++ b/drivers/crypto/bcmfs/meson.build\n@@ -12,5 +12,7 @@ sources = files(\n \t\t'hw/bcmfs4_rm.c',\n \t\t'hw/bcmfs5_rm.c',\n \t\t'hw/bcmfs_rm_common.c',\n-\t\t'bcmfs_sym_pmd.c'\n+\t\t'bcmfs_sym_pmd.c',\n+\t\t'bcmfs_sym_capabilities.c',\n+\t\t'bcmfs_sym_session.c'\n \t\t)\n",
    "prefixes": [
        "v1",
        "6/8"
    ]
}