get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 25757,
    "url": "http://patches.dpdk.org/api/patches/25757/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20170626102300.56637-24-pablo.de.lara.guarch@intel.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": "<20170626102300.56637-24-pablo.de.lara.guarch@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170626102300.56637-24-pablo.de.lara.guarch@intel.com",
    "date": "2017-06-26T10:22:56",
    "name": "[dpdk-dev,v2,23/27] app/test-crypto-perf: add AEAD parameters",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "c9e6f464434326db2c850368b26327cbd1d2cbbf",
    "submitter": {
        "id": 9,
        "url": "http://patches.dpdk.org/api/people/9/?format=api",
        "name": "De Lara Guarch, Pablo",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/?format=api",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20170626102300.56637-24-pablo.de.lara.guarch@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/25757/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/25757/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C80307D23;\n\tMon, 26 Jun 2017 20:24:02 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id EE93F7CF5\n\tfor <dev@dpdk.org>; Mon, 26 Jun 2017 20:23:34 +0200 (CEST)",
            "from orsmga004.jf.intel.com ([10.7.209.38])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Jun 2017 11:23:34 -0700",
            "from silpixa00399464.ir.intel.com (HELO\n\tsilpixa00399464.ger.corp.intel.com) ([10.237.222.157])\n\tby orsmga004.jf.intel.com with ESMTP; 26 Jun 2017 11:23:32 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.39,396,1493708400\"; d=\"scan'208\";a=\"101655628\"",
        "From": "Pablo de Lara <pablo.de.lara.guarch@intel.com>",
        "To": "declan.doherty@intel.com, zbigniew.bodek@caviumnetworks.com,\n\tjerin.jacob@caviumnetworks.com, akhil.goyal@nxp.com,\n\themant.agrawal@nxp.com",
        "Cc": "dev@dpdk.org,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "Date": "Mon, 26 Jun 2017 11:22:56 +0100",
        "Message-Id": "<20170626102300.56637-24-pablo.de.lara.guarch@intel.com>",
        "X-Mailer": "git-send-email 2.9.4",
        "In-Reply-To": "<20170626102300.56637-1-pablo.de.lara.guarch@intel.com>",
        "References": "<1496005522-134934-1-git-send-email-pablo.de.lara.guarch@intel.com>\n\t<20170626102300.56637-1-pablo.de.lara.guarch@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 23/27] app/test-crypto-perf: add AEAD\n\tparameters",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<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 app/test-crypto-perf/cperf_ops.c                 | 134 ++++++++++------------\n app/test-crypto-perf/cperf_options.h             |  22 +++-\n app/test-crypto-perf/cperf_options_parsing.c     | 138 ++++++++++++++++-------\n app/test-crypto-perf/cperf_test_latency.c        |   8 +-\n app/test-crypto-perf/cperf_test_throughput.c     |   8 +-\n app/test-crypto-perf/cperf_test_vector_parsing.c |  12 +-\n app/test-crypto-perf/cperf_test_vectors.c        | 106 ++++++++++-------\n app/test-crypto-perf/cperf_test_vectors.h        |  12 ++\n app/test-crypto-perf/cperf_test_verify.c         |  10 +-\n app/test-crypto-perf/main.c                      |  42 +++++--\n doc/guides/tools/cryptoperf.rst                  |  32 +++++-\n 11 files changed, 328 insertions(+), 196 deletions(-)",
    "diff": "diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c\nindex b8bd397..ac4a12b 100644\n--- a/app/test-crypto-perf/cperf_ops.c\n+++ b/app/test-crypto-perf/cperf_ops.c\n@@ -176,8 +176,6 @@ cperf_set_ops_auth(struct rte_crypto_op **ops,\n \t\t\t\t\tuint8_t *, offset);\n \t\t\tsym_op->auth.digest.phys_addr =\n \t\t\t\t\trte_pktmbuf_mtophys_offset(buf,\toffset);\n-\t\t\tsym_op->auth.aad.phys_addr = test_vector->aad.phys_addr;\n-\t\t\tsym_op->auth.aad.data = test_vector->aad.data;\n \n \t\t}\n \n@@ -262,8 +260,6 @@ cperf_set_ops_cipher_auth(struct rte_crypto_op **ops,\n \t\t\t\t\tuint8_t *, offset);\n \t\t\tsym_op->auth.digest.phys_addr =\n \t\t\t\t\trte_pktmbuf_mtophys_offset(buf,\toffset);\n-\t\t\tsym_op->auth.aad.phys_addr = test_vector->aad.phys_addr;\n-\t\t\tsym_op->auth.aad.data = test_vector->aad.data;\n \t\t}\n \n \t\tif (options->auth_algo == RTE_CRYPTO_AUTH_SNOW3G_UIA2 ||\n@@ -301,23 +297,22 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,\n \t\t\t\ttest_vector->cipher_iv.data,\n \t\t\t\ttest_vector->cipher_iv.length);\n \n-\t\t/* cipher parameters */\n-\t\tsym_op->cipher.data.length = options->test_buffer_size;\n-\t\tsym_op->cipher.data.offset =\n-\t\t\t\tRTE_ALIGN_CEIL(options->auth_aad_sz, 16);\n+\t\t/* AEAD parameters */\n+\t\tsym_op->aead.data.length = options->test_buffer_size;\n+\t\tsym_op->aead.data.offset =\n+\t\t\t\tRTE_ALIGN_CEIL(options->aead_aad_sz, 16);\n \n-\t\tsym_op->auth.aad.data = rte_pktmbuf_mtod(bufs_in[i], uint8_t *);\n-\t\tsym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(bufs_in[i]);\n+\t\tsym_op->aead.aad.data = rte_pktmbuf_mtod(bufs_in[i], uint8_t *);\n+\t\tsym_op->aead.aad.phys_addr = rte_pktmbuf_mtophys(bufs_in[i]);\n \n-\t\t/* authentication parameters */\n-\t\tif (options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) {\n-\t\t\tsym_op->auth.digest.data = test_vector->digest.data;\n-\t\t\tsym_op->auth.digest.phys_addr =\n+\t\tif (options->aead_op == RTE_CRYPTO_AEAD_OP_DECRYPT) {\n+\t\t\tsym_op->aead.digest.data = test_vector->digest.data;\n+\t\t\tsym_op->aead.digest.phys_addr =\n \t\t\t\t\ttest_vector->digest.phys_addr;\n \t\t} else {\n \n-\t\t\tuint32_t offset = sym_op->cipher.data.length +\n-\t\t\t\t\t\tsym_op->cipher.data.offset;\n+\t\t\tuint32_t offset = sym_op->aead.data.length +\n+\t\t\t\t\t\tsym_op->aead.data.offset;\n \t\t\tstruct rte_mbuf *buf, *tbuf;\n \n \t\t\tif (options->out_of_place) {\n@@ -333,14 +328,11 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,\n \t\t\t\t}\n \t\t\t}\n \n-\t\t\tsym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf,\n+\t\t\tsym_op->aead.digest.data = rte_pktmbuf_mtod_offset(buf,\n \t\t\t\t\tuint8_t *, offset);\n-\t\t\tsym_op->auth.digest.phys_addr =\n+\t\t\tsym_op->aead.digest.phys_addr =\n \t\t\t\t\trte_pktmbuf_mtophys_offset(buf,\toffset);\n \t\t}\n-\n-\t\tsym_op->auth.data.length = options->test_buffer_size;\n-\t\tsym_op->auth.data.offset = options->auth_aad_sz;\n \t}\n \n \treturn 0;\n@@ -354,6 +346,7 @@ cperf_create_session(uint8_t dev_id,\n {\n \tstruct rte_crypto_sym_xform cipher_xform;\n \tstruct rte_crypto_sym_xform auth_xform;\n+\tstruct rte_crypto_sym_xform aead_xform;\n \tstruct rte_cryptodev_sym_session *sess = NULL;\n \n \t/*\n@@ -393,9 +386,7 @@ cperf_create_session(uint8_t dev_id,\n \t\t/* auth different than null */\n \t\tif (options->auth_algo != RTE_CRYPTO_AUTH_NULL) {\n \t\t\tauth_xform.auth.digest_length =\n-\t\t\t\t\toptions->auth_digest_sz;\n-\t\t\tauth_xform.auth.add_auth_data_length =\n-\t\t\t\t\toptions->auth_aad_sz;\n+\t\t\t\t\toptions->digest_sz;\n \t\t\tauth_xform.auth.key.length =\n \t\t\t\t\ttest_vector->auth_key.length;\n \t\t\tauth_xform.auth.key.data = test_vector->auth_key.data;\n@@ -414,9 +405,7 @@ cperf_create_session(uint8_t dev_id,\n \t * cipher and auth\n \t */\n \t} else if (options->op_type == CPERF_CIPHER_THEN_AUTH\n-\t\t\t|| options->op_type == CPERF_AUTH_THEN_CIPHER\n-\t\t\t|| options->op_type == CPERF_AEAD) {\n-\n+\t\t\t|| options->op_type == CPERF_AUTH_THEN_CIPHER) {\n \t\t/*\n \t\t * cipher\n \t\t */\n@@ -450,23 +439,12 @@ cperf_create_session(uint8_t dev_id,\n \n \t\t/* auth different than null */\n \t\tif (options->auth_algo != RTE_CRYPTO_AUTH_NULL) {\n-\t\t\tauth_xform.auth.digest_length = options->auth_digest_sz;\n-\t\t\tauth_xform.auth.add_auth_data_length =\n-\t\t\t\t\toptions->auth_aad_sz;\n-\t\t\t/* auth options for aes gcm */\n-\t\t\tif (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM &&\n-\t\t\t\toptions->auth_algo == RTE_CRYPTO_AUTH_AES_GCM) {\n-\t\t\t\tauth_xform.auth.key.length = 0;\n-\t\t\t\tauth_xform.auth.key.data = NULL;\n-\t\t\t\tauth_xform.auth.iv.length = 0;\n-\t\t\t} else { /* auth options for others */\n-\t\t\t\tauth_xform.auth.key.length =\n+\t\t\tauth_xform.auth.digest_length = options->digest_sz;\n+\t\t\tauth_xform.auth.iv.length = test_vector->auth_iv.length;\n+\t\t\tauth_xform.auth.key.length =\n \t\t\t\t\ttest_vector->auth_key.length;\n-\t\t\t\tauth_xform.auth.key.data =\n-\t\t\t\t\t\ttest_vector->auth_key.data;\n-\t\t\t\tauth_xform.auth.iv.length =\n-\t\t\t\t\t\ttest_vector->auth_iv.length;\n-\t\t\t}\n+\t\t\tauth_xform.auth.key.data =\n+\t\t\t\t\ttest_vector->auth_key.data;\n \t\t} else {\n \t\t\tauth_xform.auth.digest_length = 0;\n \t\t\tauth_xform.auth.add_auth_data_length = 0;\n@@ -475,35 +453,39 @@ cperf_create_session(uint8_t dev_id,\n \t\t\tauth_xform.auth.iv.length = 0;\n \t\t}\n \n-\t\t/* create crypto session for aes gcm */\n-\t\tif (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM) {\n-\t\t\tif (options->cipher_op ==\n-\t\t\t\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT) {\n-\t\t\t\tcipher_xform.next = &auth_xform;\n-\t\t\t\t/* create crypto session */\n-\t\t\t\tsess = rte_cryptodev_sym_session_create(dev_id,\n-\t\t\t\t\t&cipher_xform);\n-\t\t\t} else { /* decrypt */\n-\t\t\t\tauth_xform.next = &cipher_xform;\n-\t\t\t\t/* create crypto session */\n-\t\t\t\tsess = rte_cryptodev_sym_session_create(dev_id,\n-\t\t\t\t\t&auth_xform);\n-\t\t\t}\n-\t\t} else { /* create crypto session for other */\n-\t\t\t/* cipher then auth */\n-\t\t\tif (options->op_type == CPERF_CIPHER_THEN_AUTH) {\n-\t\t\t\tcipher_xform.next = &auth_xform;\n-\t\t\t\t/* create crypto session */\n-\t\t\t\tsess = rte_cryptodev_sym_session_create(dev_id,\n+\t\t/* cipher then auth */\n+\t\tif (options->op_type == CPERF_CIPHER_THEN_AUTH) {\n+\t\t\tcipher_xform.next = &auth_xform;\n+\t\t\t/* create crypto session */\n+\t\t\tsess = rte_cryptodev_sym_session_create(dev_id,\n \t\t\t\t\t\t&cipher_xform);\n-\t\t\t} else { /* auth then cipher */\n-\t\t\t\tauth_xform.next = &cipher_xform;\n-\t\t\t\t/* create crypto session */\n-\t\t\t\tsess = rte_cryptodev_sym_session_create(dev_id,\n-\t\t\t\t\t\t&auth_xform);\n-\t\t\t}\n+\t\t} else { /* auth then cipher */\n+\t\t\tauth_xform.next = &cipher_xform;\n+\t\t\t/* create crypto session */\n+\t\t\tsess = rte_cryptodev_sym_session_create(dev_id,\n+\t\t\t\t\t&auth_xform);\n \t\t}\n+\t} else { /* options->op_type == CPERF_AEAD */\n+\t\taead_xform.type = RTE_CRYPTO_SYM_XFORM_AEAD;\n+\t\taead_xform.next = NULL;\n+\t\taead_xform.aead.algo = options->aead_algo;\n+\t\taead_xform.aead.op = options->aead_op;\n+\t\taead_xform.aead.iv.offset = iv_offset;\n+\n+\t\taead_xform.aead.key.data =\n+\t\t\t\t\ttest_vector->aead_key.data;\n+\t\taead_xform.aead.key.length =\n+\t\t\t\t\ttest_vector->aead_key.length;\n+\t\taead_xform.aead.iv.length = test_vector->aead_iv.length;\n+\n+\t\taead_xform.aead.digest_length = options->digest_sz;\n+\t\taead_xform.aead.add_auth_data_length =\n+\t\t\t\t\toptions->aead_aad_sz;\n+\n+\t\t/* Create crypto session */\n+\t\tsess = rte_cryptodev_sym_session_create(dev_id, &aead_xform);\n \t}\n+\n \treturn sess;\n }\n \n@@ -515,14 +497,14 @@ cperf_get_op_functions(const struct cperf_options *options,\n \n \top_fns->sess_create = cperf_create_session;\n \n-\tif (options->op_type == CPERF_AEAD\n-\t\t\t|| options->op_type == CPERF_AUTH_THEN_CIPHER\n+\tif (options->op_type == CPERF_AEAD) {\n+\t\top_fns->populate_ops = cperf_set_ops_aead;\n+\t\treturn 0;\n+\t}\n+\n+\tif (options->op_type == CPERF_AUTH_THEN_CIPHER\n \t\t\t|| options->op_type == CPERF_CIPHER_THEN_AUTH) {\n-\t\tif (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM &&\n-\t\t\t\toptions->auth_algo == RTE_CRYPTO_AUTH_AES_GCM)\n-\t\t\top_fns->populate_ops = cperf_set_ops_aead;\n-\t\telse\n-\t\t\top_fns->populate_ops = cperf_set_ops_cipher_auth;\n+\t\top_fns->populate_ops = cperf_set_ops_cipher_auth;\n \t\treturn 0;\n \t}\n \tif (options->op_type == CPERF_AUTH_ONLY) {\ndiff --git a/app/test-crypto-perf/cperf_options.h b/app/test-crypto-perf/cperf_options.h\nindex 0e53c03..10cd2d8 100644\n--- a/app/test-crypto-perf/cperf_options.h\n+++ b/app/test-crypto-perf/cperf_options.h\n@@ -29,8 +29,15 @@\n #define CPERF_AUTH_OP\t\t(\"auth-op\")\n #define CPERF_AUTH_KEY_SZ\t(\"auth-key-sz\")\n #define CPERF_AUTH_IV_SZ\t(\"auth-iv-sz\")\n-#define CPERF_AUTH_DIGEST_SZ\t(\"auth-digest-sz\")\n-#define CPERF_AUTH_AAD_SZ\t(\"auth-aad-sz\")\n+\n+#define CPERF_AEAD_ALGO\t\t(\"aead-algo\")\n+#define CPERF_AEAD_OP\t\t(\"aead-op\")\n+#define CPERF_AEAD_KEY_SZ\t(\"aead-key-sz\")\n+#define CPERF_AEAD_IV_SZ\t(\"aead-iv-sz\")\n+#define CPERF_AEAD_AAD_SZ\t(\"aead-aad-sz\")\n+\n+#define CPERF_DIGEST_SZ\t\t(\"digest-sz\")\n+\n #define CPERF_CSV\t\t(\"csv-friendly\")\n \n #define MAX_LIST 32\n@@ -78,8 +85,15 @@ struct cperf_options {\n \n \tuint16_t auth_key_sz;\n \tuint16_t auth_iv_sz;\n-\tuint16_t auth_digest_sz;\n-\tuint16_t auth_aad_sz;\n+\n+\tenum rte_crypto_aead_algorithm aead_algo;\n+\tenum rte_crypto_aead_operation aead_op;\n+\n+\tuint16_t aead_key_sz;\n+\tuint16_t aead_iv_sz;\n+\tuint16_t aead_aad_sz;\n+\n+\tuint16_t digest_sz;\n \n \tchar device_type[RTE_CRYPTODEV_NAME_LEN];\n \tenum cperf_op_type op_type;\ndiff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c\nindex 5c2dcff..d5bddb2 100644\n--- a/app/test-crypto-perf/cperf_options_parsing.c\n+++ b/app/test-crypto-perf/cperf_options_parsing.c\n@@ -543,9 +543,9 @@ parse_auth_key_sz(struct cperf_options *opts, const char *arg)\n }\n \n static int\n-parse_auth_digest_sz(struct cperf_options *opts, const char *arg)\n+parse_digest_sz(struct cperf_options *opts, const char *arg)\n {\n-\treturn parse_uint16_t(&opts->auth_digest_sz, arg);\n+\treturn parse_uint16_t(&opts->digest_sz, arg);\n }\n \n static int\n@@ -555,9 +555,64 @@ parse_auth_iv_sz(struct cperf_options *opts, const char *arg)\n }\n \n static int\n-parse_auth_aad_sz(struct cperf_options *opts, const char *arg)\n+parse_aead_algo(struct cperf_options *opts, const char *arg)\n {\n-\treturn parse_uint16_t(&opts->auth_aad_sz, arg);\n+\tenum rte_crypto_aead_algorithm aead_algo;\n+\n+\tif (rte_cryptodev_get_aead_algo_enum(&aead_algo, arg) < 0) {\n+\t\tRTE_LOG(ERR, USER1, \"Invalid AEAD algorithm specified\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\topts->aead_algo = aead_algo;\n+\n+\treturn 0;\n+}\n+\n+static int\n+parse_aead_op(struct cperf_options *opts, const char *arg)\n+{\n+\tstruct name_id_map aead_op_namemap[] = {\n+\t\t{\n+\t\t\trte_crypto_aead_operation_strings\n+\t\t\t[RTE_CRYPTO_AEAD_OP_ENCRYPT],\n+\t\t\tRTE_CRYPTO_AEAD_OP_ENCRYPT },\n+\t\t{\n+\t\t\trte_crypto_aead_operation_strings\n+\t\t\t[RTE_CRYPTO_AEAD_OP_DECRYPT],\n+\t\t\tRTE_CRYPTO_AEAD_OP_DECRYPT\n+\t\t}\n+\t};\n+\n+\tint id = get_str_key_id_mapping(aead_op_namemap,\n+\t\t\tRTE_DIM(aead_op_namemap), arg);\n+\tif (id < 0) {\n+\t\tRTE_LOG(ERR, USER1, \"invalid AEAD operation specified\"\n+\t\t\t\t\"\\n\");\n+\t\treturn -1;\n+\t}\n+\n+\topts->aead_op = (enum rte_crypto_aead_operation)id;\n+\n+\treturn 0;\n+}\n+\n+static int\n+parse_aead_key_sz(struct cperf_options *opts, const char *arg)\n+{\n+\treturn parse_uint16_t(&opts->aead_key_sz, arg);\n+}\n+\n+static int\n+parse_aead_iv_sz(struct cperf_options *opts, const char *arg)\n+{\n+\treturn parse_uint16_t(&opts->aead_iv_sz, arg);\n+}\n+\n+static int\n+parse_aead_aad_sz(struct cperf_options *opts, const char *arg)\n+{\n+\treturn parse_uint16_t(&opts->aead_aad_sz, arg);\n }\n \n static int\n@@ -606,8 +661,17 @@ static struct option lgopts[] = {\n \t{ CPERF_AUTH_OP, required_argument, 0, 0 },\n \n \t{ CPERF_AUTH_KEY_SZ, required_argument, 0, 0 },\n-\t{ CPERF_AUTH_DIGEST_SZ, required_argument, 0, 0 },\n-\t{ CPERF_AUTH_AAD_SZ, required_argument, 0, 0 },\n+\t{ CPERF_AUTH_IV_SZ, required_argument, 0, 0 },\n+\n+\t{ CPERF_AEAD_ALGO, required_argument, 0, 0 },\n+\t{ CPERF_AEAD_OP, required_argument, 0, 0 },\n+\n+\t{ CPERF_AEAD_KEY_SZ, required_argument, 0, 0 },\n+\t{ CPERF_AEAD_AAD_SZ, required_argument, 0, 0 },\n+\t{ CPERF_AEAD_IV_SZ, required_argument, 0, 0 },\n+\n+\t{ CPERF_DIGEST_SZ, required_argument, 0, 0 },\n+\n \t{ CPERF_CSV, no_argument, 0, 0},\n \n \t{ NULL, 0, 0, 0 }\n@@ -656,9 +720,13 @@ cperf_options_default(struct cperf_options *opts)\n \topts->auth_op = RTE_CRYPTO_AUTH_OP_GENERATE;\n \n \topts->auth_key_sz = 64;\n-\topts->auth_digest_sz = 12;\n \topts->auth_iv_sz = 0;\n-\topts->auth_aad_sz = 0;\n+\n+\topts->aead_key_sz = 0;\n+\topts->aead_iv_sz = 0;\n+\topts->aead_aad_sz = 0;\n+\n+\topts->digest_sz = 12;\n }\n \n static int\n@@ -686,9 +754,13 @@ cperf_opts_parse_long(int opt_idx, struct cperf_options *opts)\n \t\t{ CPERF_AUTH_OP,\tparse_auth_op },\n \t\t{ CPERF_AUTH_KEY_SZ,\tparse_auth_key_sz },\n \t\t{ CPERF_AUTH_IV_SZ,\tparse_auth_iv_sz },\n-\t\t{ CPERF_AUTH_DIGEST_SZ,\tparse_auth_digest_sz },\n-\t\t{ CPERF_AUTH_AAD_SZ,\tparse_auth_aad_sz },\n-\t\t{ CPERF_CSV,\tparse_csv_friendly},\n+\t\t{ CPERF_AEAD_ALGO,\tparse_aead_algo },\n+\t\t{ CPERF_AEAD_OP,\tparse_aead_op },\n+\t\t{ CPERF_AEAD_KEY_SZ,\tparse_aead_key_sz },\n+\t\t{ CPERF_AEAD_IV_SZ,\tparse_aead_iv_sz },\n+\t\t{ CPERF_AEAD_AAD_SZ,\tparse_aead_aad_sz },\n+\t\t{ CPERF_DIGEST_SZ,\tparse_digest_sz },\n+\t\t{ CPERF_CSV,\t\tparse_csv_friendly},\n \t};\n \tunsigned int i;\n \n@@ -803,30 +875,7 @@ cperf_options_check(struct cperf_options *options)\n \t\t\t\t\t\" options: decrypt and verify.\\n\");\n \t\t\treturn -EINVAL;\n \t\t}\n-\t} else if (options->op_type == CPERF_AEAD) {\n-\t\tif (!(options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT &&\n-\t\t\t\toptions->auth_op ==\n-\t\t\t\tRTE_CRYPTO_AUTH_OP_GENERATE) &&\n-\t\t\t\t!(options->cipher_op ==\n-\t\t\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT &&\n-\t\t\t\toptions->auth_op ==\n-\t\t\t\tRTE_CRYPTO_AUTH_OP_VERIFY)) {\n-\t\t\tRTE_LOG(ERR, USER1, \"Use together options: encrypt and\"\n-\t\t\t\t\t\" generate or decrypt and verify.\\n\");\n-\t\t\treturn -EINVAL;\n-\t\t}\n-\t}\n-\n-\tif (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM ||\n-\t\t\toptions->cipher_algo == RTE_CRYPTO_CIPHER_AES_CCM ||\n-\t\t\toptions->auth_algo == RTE_CRYPTO_AUTH_AES_GCM ||\n-\t\t\toptions->auth_algo == RTE_CRYPTO_AUTH_AES_CCM) {\n-\t\tif (options->op_type != CPERF_AEAD) {\n-\t\t\tRTE_LOG(ERR, USER1, \"Use --optype aead\\n\");\n-\t\t\treturn -EINVAL;\n-\t\t}\n \t}\n-\n \tif (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_CBC ||\n \t\t\toptions->cipher_algo == RTE_CRYPTO_CIPHER_AES_ECB) {\n \t\tif (options->inc_buffer_size != 0)\n@@ -914,23 +963,20 @@ cperf_options_dump(struct cperf_options *opts)\n \n \tif (opts->op_type == CPERF_AUTH_ONLY ||\n \t\t\topts->op_type == CPERF_CIPHER_THEN_AUTH ||\n-\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER ||\n-\t\t\topts->op_type == CPERF_AEAD) {\n+\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER) {\n \t\tprintf(\"# auth algorithm: %s\\n\",\n \t\t\trte_crypto_auth_algorithm_strings[opts->auth_algo]);\n \t\tprintf(\"# auth operation: %s\\n\",\n \t\t\trte_crypto_auth_operation_strings[opts->auth_op]);\n \t\tprintf(\"# auth key size: %u\\n\", opts->auth_key_sz);\n \t\tprintf(\"# auth iv size: %u\\n\", opts->auth_iv_sz);\n-\t\tprintf(\"# auth digest size: %u\\n\", opts->auth_digest_sz);\n-\t\tprintf(\"# auth aad size: %u\\n\", opts->auth_aad_sz);\n+\t\tprintf(\"# auth digest size: %u\\n\", opts->digest_sz);\n \t\tprintf(\"#\\n\");\n \t}\n \n \tif (opts->op_type == CPERF_CIPHER_ONLY ||\n \t\t\topts->op_type == CPERF_CIPHER_THEN_AUTH ||\n-\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER ||\n-\t\t\topts->op_type == CPERF_AEAD) {\n+\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER) {\n \t\tprintf(\"# cipher algorithm: %s\\n\",\n \t\t\trte_crypto_cipher_algorithm_strings[opts->cipher_algo]);\n \t\tprintf(\"# cipher operation: %s\\n\",\n@@ -939,4 +985,16 @@ cperf_options_dump(struct cperf_options *opts)\n \t\tprintf(\"# cipher iv size: %u\\n\", opts->cipher_iv_sz);\n \t\tprintf(\"#\\n\");\n \t}\n+\n+\tif (opts->op_type == CPERF_AEAD) {\n+\t\tprintf(\"# aead algorithm: %s\\n\",\n+\t\t\trte_crypto_aead_algorithm_strings[opts->aead_algo]);\n+\t\tprintf(\"# aead operation: %s\\n\",\n+\t\t\trte_crypto_aead_operation_strings[opts->aead_op]);\n+\t\tprintf(\"# aead key size: %u\\n\", opts->aead_key_sz);\n+\t\tprintf(\"# aead iv size: %u\\n\", opts->aead_iv_sz);\n+\t\tprintf(\"# aead digest size: %u\\n\", opts->digest_sz);\n+\t\tprintf(\"# aead aad size: %u\\n\", opts->aead_aad_sz);\n+\t\tprintf(\"#\\n\");\n+\t}\n }\ndiff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c\nindex f828366..16c114b 100644\n--- a/app/test-crypto-perf/cperf_test_latency.c\n+++ b/app/test-crypto-perf/cperf_test_latency.c\n@@ -167,14 +167,14 @@ cperf_mbuf_create(struct rte_mempool *mempool,\n \n \tif (options->op_type != CPERF_CIPHER_ONLY) {\n \t\tmbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf,\n-\t\t\toptions->auth_digest_sz);\n+\t\t\toptions->digest_sz);\n \t\tif (mbuf_data == NULL)\n \t\t\tgoto error;\n \t}\n \n \tif (options->op_type == CPERF_AEAD) {\n \t\tuint8_t *aead = (uint8_t *)rte_pktmbuf_prepend(mbuf,\n-\t\t\tRTE_ALIGN_CEIL(options->auth_aad_sz, 16));\n+\t\t\tRTE_ALIGN_CEIL(options->aead_aad_sz, 16));\n \n \t\tif (aead == NULL)\n \t\t\tgoto error;\n@@ -229,7 +229,7 @@ cperf_latency_test_constructor(uint8_t dev_id, uint16_t qp_id,\n \t\t\tRTE_CACHE_LINE_ROUNDUP(\n \t\t\t\t(options->max_buffer_size / options->segments_nb) +\n \t\t\t\t(options->max_buffer_size % options->segments_nb) +\n-\t\t\t\t\toptions->auth_digest_sz),\n+\t\t\t\t\toptions->digest_sz),\n \t\t\trte_socket_id());\n \n \tif (ctx->pkt_mbuf_pool_in == NULL)\n@@ -259,7 +259,7 @@ cperf_latency_test_constructor(uint8_t dev_id, uint16_t qp_id,\n \t\t\t\tRTE_PKTMBUF_HEADROOM +\n \t\t\t\tRTE_CACHE_LINE_ROUNDUP(\n \t\t\t\t\toptions->max_buffer_size +\n-\t\t\t\t\toptions->auth_digest_sz),\n+\t\t\t\t\toptions->digest_sz),\n \t\t\t\trte_socket_id());\n \n \t\tif (ctx->pkt_mbuf_pool_out == NULL)\ndiff --git a/app/test-crypto-perf/cperf_test_throughput.c b/app/test-crypto-perf/cperf_test_throughput.c\nindex 1e3f3b3..1ff1560 100644\n--- a/app/test-crypto-perf/cperf_test_throughput.c\n+++ b/app/test-crypto-perf/cperf_test_throughput.c\n@@ -151,14 +151,14 @@ cperf_mbuf_create(struct rte_mempool *mempool,\n \n \tif (options->op_type != CPERF_CIPHER_ONLY) {\n \t\tmbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf,\n-\t\t\t\toptions->auth_digest_sz);\n+\t\t\t\toptions->digest_sz);\n \t\tif (mbuf_data == NULL)\n \t\t\tgoto error;\n \t}\n \n \tif (options->op_type == CPERF_AEAD) {\n \t\tuint8_t *aead = (uint8_t *)rte_pktmbuf_prepend(mbuf,\n-\t\t\tRTE_ALIGN_CEIL(options->auth_aad_sz, 16));\n+\t\t\tRTE_ALIGN_CEIL(options->aead_aad_sz, 16));\n \n \t\tif (aead == NULL)\n \t\t\tgoto error;\n@@ -212,7 +212,7 @@ cperf_throughput_test_constructor(uint8_t dev_id, uint16_t qp_id,\n \t\t\tRTE_CACHE_LINE_ROUNDUP(\n \t\t\t\t(options->max_buffer_size / options->segments_nb) +\n \t\t\t\t(options->max_buffer_size % options->segments_nb) +\n-\t\t\t\t\toptions->auth_digest_sz),\n+\t\t\t\t\toptions->digest_sz),\n \t\t\trte_socket_id());\n \n \tif (ctx->pkt_mbuf_pool_in == NULL)\n@@ -240,7 +240,7 @@ cperf_throughput_test_constructor(uint8_t dev_id, uint16_t qp_id,\n \t\t\t\tRTE_PKTMBUF_HEADROOM +\n \t\t\t\tRTE_CACHE_LINE_ROUNDUP(\n \t\t\t\t\toptions->max_buffer_size +\n-\t\t\t\t\toptions->auth_digest_sz),\n+\t\t\t\t\toptions->digest_sz),\n \t\t\t\trte_socket_id());\n \n \t\tif (ctx->pkt_mbuf_pool_out == NULL)\ndiff --git a/app/test-crypto-perf/cperf_test_vector_parsing.c b/app/test-crypto-perf/cperf_test_vector_parsing.c\nindex 277ff1e..e462d2c 100644\n--- a/app/test-crypto-perf/cperf_test_vector_parsing.c\n+++ b/app/test-crypto-perf/cperf_test_vector_parsing.c\n@@ -363,12 +363,12 @@ parse_entry(char *entry, struct cperf_test_vector *vector,\n \t\tif (tc_found)\n \t\t\tvector->aad.length = data_length;\n \t\telse {\n-\t\t\tif (opts->auth_aad_sz > data_length) {\n+\t\t\tif (opts->aead_aad_sz > data_length) {\n \t\t\t\tprintf(\"Global aad shorter than \"\n-\t\t\t\t\t\"auth_aad_sz\\n\");\n+\t\t\t\t\t\"aead_aad_sz\\n\");\n \t\t\t\treturn -1;\n \t\t\t}\n-\t\t\tvector->aad.length = opts->auth_aad_sz;\n+\t\t\tvector->aad.length = opts->aead_aad_sz;\n \t\t}\n \n \t} else if (strstr(key_token, \"digest\")) {\n@@ -379,12 +379,12 @@ parse_entry(char *entry, struct cperf_test_vector *vector,\n \t\tif (tc_found)\n \t\t\tvector->digest.length = data_length;\n \t\telse {\n-\t\t\tif (opts->auth_digest_sz > data_length) {\n+\t\t\tif (opts->digest_sz > data_length) {\n \t\t\t\tprintf(\"Global digest shorter than \"\n-\t\t\t\t\t\"auth_digest_sz\\n\");\n+\t\t\t\t\t\"digest_sz\\n\");\n \t\t\t\treturn -1;\n \t\t\t}\n-\t\t\tvector->digest.length = opts->auth_digest_sz;\n+\t\t\tvector->digest.length = opts->digest_sz;\n \t\t}\n \t} else {\n \t\tprintf(\"Not valid key: '%s'\\n\", trim_space(key_token));\ndiff --git a/app/test-crypto-perf/cperf_test_vectors.c b/app/test-crypto-perf/cperf_test_vectors.c\nindex 2e5339c..03bc995 100644\n--- a/app/test-crypto-perf/cperf_test_vectors.c\n+++ b/app/test-crypto-perf/cperf_test_vectors.c\n@@ -385,6 +385,13 @@ uint8_t auth_key[] = {\n \t0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F\n };\n \n+/* AEAD key */\n+uint8_t aead_key[] = {\n+\t0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,\n+\t0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,\n+\t0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F\n+};\n+\n /* Digests */\n uint8_t digest[2048] = { 0x00 };\n \n@@ -403,8 +410,7 @@ cperf_test_vector_get_dummy(struct cperf_options *options)\n \n \tif (options->op_type ==\tCPERF_CIPHER_ONLY ||\n \t\t\toptions->op_type == CPERF_CIPHER_THEN_AUTH ||\n-\t\t\toptions->op_type == CPERF_AUTH_THEN_CIPHER ||\n-\t\t\toptions->op_type == CPERF_AEAD) {\n+\t\t\toptions->op_type == CPERF_AUTH_THEN_CIPHER) {\n \t\tif (options->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {\n \t\t\tt_vec->cipher_key.length = 0;\n \t\t\tt_vec->ciphertext.data = plaintext;\n@@ -441,40 +447,32 @@ cperf_test_vector_get_dummy(struct cperf_options *options)\n \n \tif (options->op_type ==\tCPERF_AUTH_ONLY ||\n \t\t\toptions->op_type == CPERF_CIPHER_THEN_AUTH ||\n-\t\t\toptions->op_type == CPERF_AUTH_THEN_CIPHER ||\n-\t\t\toptions->op_type == CPERF_AEAD) {\n-\t\tuint8_t aad_alloc = 0;\n-\n-\t\tt_vec->auth_key.length = options->auth_key_sz;\n-\n-\t\tswitch (options->auth_algo) {\n-\t\tcase RTE_CRYPTO_AUTH_NULL:\n-\t\t\tt_vec->auth_key.data = NULL;\n-\t\t\taad_alloc = 0;\n-\t\t\tbreak;\n-\t\tcase RTE_CRYPTO_AUTH_AES_GCM:\n+\t\t\toptions->op_type == CPERF_AUTH_THEN_CIPHER) {\n+\t\tif (options->auth_algo == RTE_CRYPTO_AUTH_NULL) {\n+\t\t\tt_vec->auth_key.length = 0;\n \t\t\tt_vec->auth_key.data = NULL;\n-\t\t\taad_alloc = 1;\n-\t\t\tbreak;\n-\t\tdefault:\n+\t\t\tt_vec->digest.data = NULL;\n+\t\t\tt_vec->digest.length = 0;\n+\t\t} else {\n+\t\t\tt_vec->auth_key.length = options->auth_key_sz;\n \t\t\tt_vec->auth_key.data = auth_key;\n-\t\t\taad_alloc = 0;\n-\t\t\tbreak;\n-\t\t}\n \n-\t\tif (aad_alloc && options->auth_aad_sz) {\n-\t\t\tt_vec->aad.data = rte_malloc(NULL,\n-\t\t\t\t\toptions->auth_aad_sz, 16);\n-\t\t\tif (t_vec->aad.data == NULL) {\n-\t\t\t\tif (options->op_type !=\tCPERF_AUTH_ONLY)\n-\t\t\t\t\trte_free(t_vec->cipher_iv.data);\n+\t\t\tt_vec->digest.data = rte_malloc(NULL,\n+\t\t\t\t\toptions->digest_sz,\n+\t\t\t\t\t16);\n+\t\t\tif (t_vec->digest.data == NULL) {\n+\t\t\t\trte_free(t_vec->cipher_iv.data);\n \t\t\t\trte_free(t_vec);\n \t\t\t\treturn NULL;\n \t\t\t}\n-\t\t\tmemcpy(t_vec->aad.data, aad, options->auth_aad_sz);\n-\t\t} else {\n-\t\t\tt_vec->aad.data = NULL;\n+\t\t\tt_vec->digest.phys_addr =\n+\t\t\t\trte_malloc_virt2phy(t_vec->digest.data);\n+\t\t\tt_vec->digest.length = options->digest_sz;\n+\t\t\tmemcpy(t_vec->digest.data, digest,\n+\t\t\t\t\toptions->digest_sz);\n \t\t}\n+\t\tt_vec->data.auth_offset = 0;\n+\t\tt_vec->data.auth_length = options->max_buffer_size;\n \n \t\t/* Set IV parameters */\n \t\tt_vec->auth_iv.data = rte_malloc(NULL, options->auth_iv_sz,\n@@ -487,26 +485,52 @@ cperf_test_vector_get_dummy(struct cperf_options *options)\n \t\t}\n \t\tmemcpy(t_vec->auth_iv.data, iv, options->auth_iv_sz);\n \t\tt_vec->auth_iv.length = options->auth_iv_sz;\n+\t}\n \n-\t\tt_vec->aad.phys_addr = rte_malloc_virt2phy(t_vec->aad.data);\n-\t\tt_vec->aad.length = options->auth_aad_sz;\n-\t\tt_vec->digest.data = rte_malloc(NULL, options->auth_digest_sz,\n-\t\t\t\t16);\n+\tif (options->op_type == CPERF_AEAD) {\n+\t\tt_vec->aead_key.length = options->aead_key_sz;\n+\t\tt_vec->aead_key.data = aead_key;\n+\n+\t\tif (options->aead_aad_sz) {\n+\t\t\tt_vec->aad.data = rte_malloc(NULL,\n+\t\t\t\t\toptions->aead_aad_sz, 16);\n+\t\t\tif (t_vec->aad.data == NULL) {\n+\t\t\t\trte_free(t_vec);\n+\t\t\t\treturn NULL;\n+\t\t\t}\n+\t\t\tmemcpy(t_vec->aad.data, aad, options->aead_aad_sz);\n+\t\t\tt_vec->aad.phys_addr = rte_malloc_virt2phy(t_vec->aad.data);\n+\t\t\tt_vec->aad.length = options->aead_aad_sz;\n+\t\t} else {\n+\t\t\tt_vec->aad.data = NULL;\n+\t\t\tt_vec->aad.length = 0;\n+\t\t}\n+\n+\t\tt_vec->digest.data = rte_malloc(NULL, options->digest_sz,\n+\t\t\t\t\t\t16);\n \t\tif (t_vec->digest.data == NULL) {\n-\t\t\tif (options->op_type !=\tCPERF_AUTH_ONLY)\n-\t\t\t\trte_free(t_vec->cipher_iv.data);\n-\t\t\trte_free(t_vec->auth_iv.data);\n \t\t\trte_free(t_vec->aad.data);\n \t\t\trte_free(t_vec);\n \t\t\treturn NULL;\n \t\t}\n \t\tt_vec->digest.phys_addr =\n \t\t\t\trte_malloc_virt2phy(t_vec->digest.data);\n-\t\tt_vec->digest.length = options->auth_digest_sz;\n-\t\tmemcpy(t_vec->digest.data, digest, options->auth_digest_sz);\n-\t\tt_vec->data.auth_offset = 0;\n-\t\tt_vec->data.auth_length = options->max_buffer_size;\n-\t}\n+\t\tt_vec->digest.length = options->digest_sz;\n+\t\tmemcpy(t_vec->digest.data, digest, options->digest_sz);\n+\t\tt_vec->data.aead_offset = 0;\n+\t\tt_vec->data.aead_length = options->max_buffer_size;\n \n+\t\t/* Set IV parameters */\n+\t\tt_vec->aead_iv.data = rte_malloc(NULL, options->aead_iv_sz,\n+\t\t\t\t16);\n+\t\tif (options->aead_iv_sz && t_vec->aead_iv.data == NULL) {\n+\t\t\trte_free(t_vec->aad.data);\n+\t\t\trte_free(t_vec->digest.data);\n+\t\t\trte_free(t_vec);\n+\t\t\treturn NULL;\n+\t\t}\n+\t\tmemcpy(t_vec->aead_iv.data, iv, options->aead_iv_sz);\n+\t\tt_vec->aead_iv.length = options->aead_iv_sz;\n+\t}\n \treturn t_vec;\n }\ndiff --git a/app/test-crypto-perf/cperf_test_vectors.h b/app/test-crypto-perf/cperf_test_vectors.h\nindex 7f9c4fa..8595570 100644\n--- a/app/test-crypto-perf/cperf_test_vectors.h\n+++ b/app/test-crypto-perf/cperf_test_vectors.h\n@@ -54,6 +54,11 @@ struct cperf_test_vector {\n \tstruct {\n \t\tuint8_t *data;\n \t\tuint16_t length;\n+\t} aead_key;\n+\n+\tstruct {\n+\t\tuint8_t *data;\n+\t\tuint16_t length;\n \t} cipher_iv;\n \n \tstruct {\n@@ -63,6 +68,11 @@ struct cperf_test_vector {\n \n \tstruct {\n \t\tuint8_t *data;\n+\t\tuint16_t length;\n+\t} aead_iv;\n+\n+\tstruct {\n+\t\tuint8_t *data;\n \t\tuint32_t length;\n \t} ciphertext;\n \n@@ -83,6 +93,8 @@ struct cperf_test_vector {\n \t\tuint32_t auth_length;\n \t\tuint32_t cipher_offset;\n \t\tuint32_t cipher_length;\n+\t\tuint32_t aead_offset;\n+\t\tuint32_t aead_length;\n \t} data;\n };\n \ndiff --git a/app/test-crypto-perf/cperf_test_verify.c b/app/test-crypto-perf/cperf_test_verify.c\nindex 81057ff..bba8019 100644\n--- a/app/test-crypto-perf/cperf_test_verify.c\n+++ b/app/test-crypto-perf/cperf_test_verify.c\n@@ -155,14 +155,14 @@ cperf_mbuf_create(struct rte_mempool *mempool,\n \n \tif (options->op_type != CPERF_CIPHER_ONLY) {\n \t\tmbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf,\n-\t\t\t\toptions->auth_digest_sz);\n+\t\t\t\toptions->digest_sz);\n \t\tif (mbuf_data == NULL)\n \t\t\tgoto error;\n \t}\n \n \tif (options->op_type == CPERF_AEAD) {\n \t\tuint8_t *aead = (uint8_t *)rte_pktmbuf_prepend(mbuf,\n-\t\t\tRTE_ALIGN_CEIL(options->auth_aad_sz, 16));\n+\t\t\tRTE_ALIGN_CEIL(options->aead_aad_sz, 16));\n \n \t\tif (aead == NULL)\n \t\t\tgoto error;\n@@ -216,7 +216,7 @@ cperf_verify_test_constructor(uint8_t dev_id, uint16_t qp_id,\n \t\t\tRTE_CACHE_LINE_ROUNDUP(\n \t\t\t\t(options->max_buffer_size / options->segments_nb) +\n \t\t\t\t(options->max_buffer_size % options->segments_nb) +\n-\t\t\t\t\toptions->auth_digest_sz),\n+\t\t\t\t\toptions->digest_sz),\n \t\t\trte_socket_id());\n \n \tif (ctx->pkt_mbuf_pool_in == NULL)\n@@ -244,7 +244,7 @@ cperf_verify_test_constructor(uint8_t dev_id, uint16_t qp_id,\n \t\t\t\tRTE_PKTMBUF_HEADROOM +\n \t\t\t\tRTE_CACHE_LINE_ROUNDUP(\n \t\t\t\t\toptions->max_buffer_size +\n-\t\t\t\t\toptions->auth_digest_sz),\n+\t\t\t\t\toptions->digest_sz),\n \t\t\t\trte_socket_id());\n \n \t\tif (ctx->pkt_mbuf_pool_out == NULL)\n@@ -379,7 +379,7 @@ cperf_verify_op(struct rte_crypto_op *op,\n \t\tif (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)\n \t\t\tres += memcmp(data + auth_offset,\n \t\t\t\t\tvector->digest.data,\n-\t\t\t\t\toptions->auth_digest_sz);\n+\t\t\t\t\toptions->digest_sz);\n \t}\n \n \treturn !!res;\ndiff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c\nindex cf4fa4f..f78c653 100644\n--- a/app/test-crypto-perf/main.c\n+++ b/app/test-crypto-perf/main.c\n@@ -123,8 +123,7 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,\n \n \t\tif (opts->op_type == CPERF_AUTH_ONLY ||\n \t\t\t\topts->op_type == CPERF_CIPHER_THEN_AUTH ||\n-\t\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER ||\n-\t\t\t\topts->op_type == CPERF_AEAD)  {\n+\t\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER) {\n \n \t\t\tcap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n \t\t\tcap_idx.algo.auth = opts->auth_algo;\n@@ -137,8 +136,8 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,\n \t\t\tret = rte_cryptodev_sym_capability_check_auth(\n \t\t\t\t\tcapability,\n \t\t\t\t\topts->auth_key_sz,\n-\t\t\t\t\topts->auth_digest_sz,\n-\t\t\t\t\topts->auth_aad_sz,\n+\t\t\t\t\topts->digest_sz,\n+\t\t\t\t\t0,\n \t\t\t\t\topts->auth_iv_sz);\n \t\t\tif (ret != 0)\n \t\t\t\treturn ret;\n@@ -146,8 +145,7 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,\n \n \t\tif (opts->op_type == CPERF_CIPHER_ONLY ||\n \t\t\t\topts->op_type == CPERF_CIPHER_THEN_AUTH ||\n-\t\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER ||\n-\t\t\t\topts->op_type == CPERF_AEAD) {\n+\t\t\t\topts->op_type == CPERF_AUTH_THEN_CIPHER) {\n \n \t\t\tcap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n \t\t\tcap_idx.algo.cipher = opts->cipher_algo;\n@@ -164,6 +162,26 @@ cperf_verify_devices_capabilities(struct cperf_options *opts,\n \t\t\tif (ret != 0)\n \t\t\t\treturn ret;\n \t\t}\n+\n+\t\tif (opts->op_type == CPERF_AEAD) {\n+\n+\t\t\tcap_idx.type = RTE_CRYPTO_SYM_XFORM_AEAD;\n+\t\t\tcap_idx.algo.aead = opts->aead_algo;\n+\n+\t\t\tcapability = rte_cryptodev_sym_capability_get(cdev_id,\n+\t\t\t\t\t&cap_idx);\n+\t\t\tif (capability == NULL)\n+\t\t\t\treturn -1;\n+\n+\t\t\tret = rte_cryptodev_sym_capability_check_aead(\n+\t\t\t\t\tcapability,\n+\t\t\t\t\topts->aead_key_sz,\n+\t\t\t\t\topts->digest_sz,\n+\t\t\t\t\topts->aead_aad_sz,\n+\t\t\t\t\topts->aead_iv_sz);\n+\t\t\tif (ret != 0)\n+\t\t\t\treturn ret;\n+\t\t}\n \t}\n \n \treturn 0;\n@@ -212,7 +230,7 @@ cperf_check_test_vector(struct cperf_options *opts,\n \t\t\t\treturn -1;\n \t\t\tif (test_vec->digest.data == NULL)\n \t\t\t\treturn -1;\n-\t\t\tif (test_vec->digest.length < opts->auth_digest_sz)\n+\t\t\tif (test_vec->digest.length < opts->digest_sz)\n \t\t\t\treturn -1;\n \t\t}\n \n@@ -253,7 +271,7 @@ cperf_check_test_vector(struct cperf_options *opts,\n \t\t\t\treturn -1;\n \t\t\tif (test_vec->digest.data == NULL)\n \t\t\t\treturn -1;\n-\t\t\tif (test_vec->digest.length < opts->auth_digest_sz)\n+\t\t\tif (test_vec->digest.length < opts->digest_sz)\n \t\t\t\treturn -1;\n \t\t}\n \t} else if (opts->op_type == CPERF_AEAD) {\n@@ -265,17 +283,17 @@ cperf_check_test_vector(struct cperf_options *opts,\n \t\t\treturn -1;\n \t\tif (test_vec->ciphertext.length < opts->max_buffer_size)\n \t\t\treturn -1;\n-\t\tif (test_vec->cipher_iv.data == NULL)\n+\t\tif (test_vec->aead_iv.data == NULL)\n \t\t\treturn -1;\n-\t\tif (test_vec->cipher_iv.length != opts->cipher_iv_sz)\n+\t\tif (test_vec->aead_iv.length != opts->aead_iv_sz)\n \t\t\treturn -1;\n \t\tif (test_vec->aad.data == NULL)\n \t\t\treturn -1;\n-\t\tif (test_vec->aad.length != opts->auth_aad_sz)\n+\t\tif (test_vec->aad.length != opts->aead_aad_sz)\n \t\t\treturn -1;\n \t\tif (test_vec->digest.data == NULL)\n \t\t\treturn -1;\n-\t\tif (test_vec->digest.length < opts->auth_digest_sz)\n+\t\tif (test_vec->digest.length < opts->digest_sz)\n \t\t\treturn -1;\n \t}\n \treturn 0;\ndiff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst\nindex c0accfc..6b797a7 100644\n--- a/doc/guides/tools/cryptoperf.rst\n+++ b/doc/guides/tools/cryptoperf.rst\n@@ -294,13 +294,37 @@ The following are the appication command-line options:\n \n         Set the size of auth iv.\n \n-* ``--auth-digest-sz <n>``\n+* ``--aead-algo <name>``\n \n-        Set the size of authentication digest.\n+        Set AEAD algorithm name, where ``name`` is one\n+        of the following::\n+\n+           aes-ccm\n+           aes-gcm\n+\n+* ``--aead-op <mode>``\n+\n+        Set AEAD operation mode, where ``mode`` is one of\n+        the following::\n+\n+           encrypt\n+           decrypt\n+\n+* ``--aead-key-sz <n>``\n+\n+        Set the size of AEAD key.\n+\n+* ``--aead-iv-sz <n>``\n+\n+        Set the size of AEAD iv.\n+\n+* ``--aead-aad-sz <n>``\n+\n+        Set the size of AEAD aad.\n \n-* ``--auth-aad-sz <n>``\n+* ``--digest-sz <n>``\n \n-        Set the size of authentication aad.\n+        Set the size of digest.\n \n * ``--csv-friendly``\n \n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "23/27"
    ]
}