Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104911/?format=api
http://patchwork.dpdk.org/api/patches/104911/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1638788880-650-4-git-send-email-anoobj@marvell.com/", "project": { "id": 1, "url": "http://patchwork.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1638788880-650-4-git-send-email-anoobj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1638788880-650-4-git-send-email-anoobj@marvell.com", "date": "2021-12-06T11:07:50", "name": "[v2,03/13] test/crypto: add chained operations in combined cases", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5ee982dd7502e2a999e8e0fdb54cfe1b981c34ee", "submitter": { "id": 1205, "url": "http://patchwork.dpdk.org/api/people/1205/?format=api", "name": "Anoob Joseph", "email": "anoobj@marvell.com" }, "delegate": { "id": 6690, "url": "http://patchwork.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1638788880-650-4-git-send-email-anoobj@marvell.com/mbox/", "series": [ { "id": 20868, "url": "http://patchwork.dpdk.org/api/series/20868/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20868", "date": "2021-12-06T11:07:47", "name": "Add new cases to lookaside IPsec tests", "version": 2, "mbox": "http://patchwork.dpdk.org/series/20868/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/104911/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/104911/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1742CA034F;\n\tMon, 6 Dec 2021 12:08:33 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7F05641181;\n\tMon, 6 Dec 2021 12:08:31 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id B6C7C41181\n for <dev@dpdk.org>; Mon, 6 Dec 2021 12:08:29 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 1B62KDbW002190;\n Mon, 6 Dec 2021 03:08:29 -0800", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3cs9muhfu6-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 06 Dec 2021 03:08:29 -0800", "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Mon, 6 Dec 2021 03:08:27 -0800", "from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend\n Transport; Mon, 6 Dec 2021 03:08:27 -0800", "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 33DA03F705E;\n Mon, 6 Dec 2021 03:08:22 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=Tan+7KwBPYYS1+exiMnXdNpAdN0mHGq0fIgQ7P+ssI4=;\n b=WP7LhgAVib6bwMj/05cQja+V62Z38YZTyYsPXEqYJ11tXZIWr2DfQ4pDNu1qQnAa5gbQ\n 0rTCSo+3sTyjhYXHpnRNHLK2VarQ7ut+rd3BePMtfnP/l/K97MnAmgAIWfGA0CqWeTnP\n /C4TWptwBjvkYa3m7YkVT7UBPI9hxtrkYIQZ8XopeVskii9LldUMrOYeKn/Jgmhbmx48\n OkYn8OsfzXPpyZvMAYHbplam7s0+o3SL/JKvKfWqReAHIc/+MdZW4pLymCr54KU5wrqu\n tWkyeYyZAcN9VL+hBYOUvMFR4oCLum9+3qzWqxOqBG7jc++E6VZ878CHESHJCHj/rY/P 1Q==", "From": "Anoob Joseph <anoobj@marvell.com>", "To": "Akhil Goyal <gakhil@marvell.com>, Declan Doherty\n <declan.doherty@intel.com>, Fan Zhang <roy.fan.zhang@intel.com>, \"Pablo de\n Lara\" <pablo.de.lara.guarch@intel.com>", "CC": "Anoob Joseph <anoobj@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Archana Muniganti <marchana@marvell.com>, Tejasree Kondoj\n <ktejasree@marvell.com>, Hemant Agrawal <hemant.agrawal@nxp.com>, \"Radu\n Nicolau\" <radu.nicolau@intel.com>,\n Ciara Power <ciara.power@intel.com>, Gagandeep Singh <g.singh@nxp.com>,\n <dev@dpdk.org>", "Subject": "[PATCH v2 03/13] test/crypto: add chained operations in combined\n cases", "Date": "Mon, 6 Dec 2021 16:37:50 +0530", "Message-ID": "<1638788880-650-4-git-send-email-anoobj@marvell.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1638788880-650-1-git-send-email-anoobj@marvell.com>", "References": "<1638777528-553-1-git-send-email-anoobj@marvell.com>\n <1638788880-650-1-git-send-email-anoobj@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "_1wo5lrXqsdo7lzPn7vsbO-_KbnCvyre", "X-Proofpoint-ORIG-GUID": "_1wo5lrXqsdo7lzPn7vsbO-_KbnCvyre", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513\n definitions=2021-12-06_04,2021-12-06_01,2021-12-02_01", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Extend lookaside IPsec combined mode cases to cover chained operations\nalso.\n\nCurrently covering combinations of,\n\nCiphers,\n1. AES-128-CBC\n\nAuth,\n1. NULL\n2. SHA2-256 [16B ICV]\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n app/test/test_cryptodev.c | 11 +++--\n app/test/test_cryptodev_security_ipsec.c | 77 +++++++++++++++++++++++++-------\n app/test/test_cryptodev_security_ipsec.h | 36 +++++++++++++++\n doc/guides/rel_notes/release_22_03.rst | 1 +\n 4 files changed, 104 insertions(+), 21 deletions(-)", "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex c91b745..a307aec 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -835,6 +835,8 @@ ipsec_proto_testsuite_setup(void)\n \t\tret = TEST_SKIPPED;\n \t}\n \n+\ttest_ipsec_alg_list_populate();\n+\n \t/*\n \t * Stop the device. Device would be started again by individual test\n \t * case setup routine.\n@@ -9381,9 +9383,9 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \t flags->sa_expiry_pkts_hard)\n \t\tnb_pkts = IPSEC_TEST_PACKETS_MAX;\n \n-\tfor (i = 0; i < RTE_DIM(aead_list); i++) {\n-\t\ttest_ipsec_td_prepare(&aead_list[i],\n-\t\t\t\t NULL,\n+\tfor (i = 0; i < RTE_DIM(alg_list); i++) {\n+\t\ttest_ipsec_td_prepare(alg_list[i].param1,\n+\t\t\t\t alg_list[i].param2,\n \t\t\t\t flags,\n \t\t\t\t td_outb,\n \t\t\t\t nb_pkts);\n@@ -9407,7 +9409,8 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \t\t\treturn TEST_FAILED;\n \n \t\tif (flags->display_alg)\n-\t\t\ttest_ipsec_display_alg(&aead_list[i], NULL);\n+\t\t\ttest_ipsec_display_alg(alg_list[i].param1,\n+\t\t\t\t\t alg_list[i].param2);\n \n \t\tpass_cnt++;\n \t}\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex 45960bf..5f67dc0 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -15,7 +15,29 @@\n \n #define IV_LEN_MAX 16\n \n-extern struct ipsec_test_data pkt_aes_256_gcm;\n+struct crypto_param_comb alg_list[RTE_DIM(aead_list) +\n+\t\t\t\t (RTE_DIM(cipher_list) *\n+\t\t\t\t RTE_DIM(auth_list))];\n+\n+void\n+test_ipsec_alg_list_populate(void)\n+{\n+\tunsigned long i, j, index = 0;\n+\n+\tfor (i = 0; i < RTE_DIM(aead_list); i++) {\n+\t\talg_list[index].param1 = &aead_list[i];\n+\t\talg_list[index].param2 = NULL;\n+\t\tindex++;\n+\t}\n+\n+\tfor (i = 0; i < RTE_DIM(cipher_list); i++) {\n+\t\tfor (j = 0; j < RTE_DIM(auth_list); j++) {\n+\t\t\talg_list[index].param1 = &cipher_list[i];\n+\t\t\talg_list[index].param2 = &auth_list[j];\n+\t\t\tindex++;\n+\t\t}\n+\t}\n+}\n \n int\n test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform,\n@@ -293,18 +315,31 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \n \tfor (i = 0; i < nb_td; i++) {\n \t\ttd = &td_array[i];\n-\t\t/* Copy template for packet & key fields */\n-\t\tmemcpy(td, &pkt_aes_256_gcm, sizeof(*td));\n \n-\t\t/* Override fields based on param */\n+\t\t/* Prepare fields based on param */\n+\n+\t\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n+\t\t\t/* Copy template for packet & key fields */\n+\t\t\tmemcpy(td, &pkt_aes_256_gcm, sizeof(*td));\n \n-\t\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD)\n \t\t\ttd->aead = true;\n-\t\telse\n+\t\t\ttd->xform.aead.aead.algo = param1->alg.aead;\n+\t\t\ttd->xform.aead.aead.key.length = param1->key_length;\n+\t\t} else {\n+\t\t\t/* Copy template for packet & key fields */\n+\t\t\tmemcpy(td, &pkt_aes_128_cbc_hmac_sha256, sizeof(*td));\n+\n \t\t\ttd->aead = false;\n+\t\t\ttd->xform.chain.cipher.cipher.algo = param1->alg.cipher;\n+\t\t\ttd->xform.chain.cipher.cipher.key.length =\n+\t\t\t\t\tparam1->key_length;\n+\t\t\ttd->xform.chain.auth.auth.algo = param2->alg.auth;\n+\t\t\ttd->xform.chain.auth.auth.key.length =\n+\t\t\t\t\tparam2->key_length;\n+\t\t\ttd->xform.chain.auth.auth.digest_length =\n+\t\t\t\t\tparam2->digest_length;\n \n-\t\ttd->xform.aead.aead.algo = param1->alg.aead;\n-\t\ttd->xform.aead.aead.key.length = param1->key_length;\n+\t\t}\n \n \t\tif (flags->iv_gen)\n \t\t\ttd->ipsec_xform.options.iv_gen_disable = 0;\n@@ -324,8 +359,6 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \t\t}\n \n \t}\n-\n-\tRTE_SET_USED(param2);\n }\n \n void\n@@ -374,12 +407,21 @@ void\n test_ipsec_display_alg(const struct crypto_param *param1,\n \t\t const struct crypto_param *param2)\n {\n-\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD)\n-\t\tprintf(\"\\t%s [%d]\\n\",\n+\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n+\t\tprintf(\"\\t%s [%d]\",\n \t\t rte_crypto_aead_algorithm_strings[param1->alg.aead],\n-\t\t param1->key_length);\n-\n-\tRTE_SET_USED(param2);\n+\t\t param1->key_length * 8);\n+\t} else {\n+\t\tprintf(\"\\t%s\",\n+\t\t rte_crypto_cipher_algorithm_strings[param1->alg.cipher]);\n+\t\tif (param1->alg.cipher != RTE_CRYPTO_CIPHER_NULL)\n+\t\t\tprintf(\" [%d]\", param1->key_length * 8);\n+\t\tprintf(\" %s\",\n+\t\t rte_crypto_auth_algorithm_strings[param2->alg.auth]);\n+\t\tif (param2->alg.auth != RTE_CRYPTO_AUTH_NULL)\n+\t\t\tprintf(\" [%dB ICV]\", param2->digest_length);\n+\t}\n+\tprintf(\"\\n\");\n }\n \n static int\n@@ -631,8 +673,9 @@ test_ipsec_res_d_prepare(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \tif (res_d->aead) {\n \t\tres_d->xform.aead.aead.op = RTE_CRYPTO_AEAD_OP_DECRYPT;\n \t} else {\n-\t\tprintf(\"Only AEAD supported\\n\");\n-\t\treturn TEST_SKIPPED;\n+\t\tres_d->xform.chain.cipher.cipher.op =\n+\t\t\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT;\n+\t\tres_d->xform.chain.auth.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n \t}\n \n \treturn TEST_SUCCESS;\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 70a264a..b1f0ff8 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -71,6 +71,7 @@ struct crypto_param {\n \t\tenum rte_crypto_aead_algorithm aead;\n \t} alg;\n \tuint16_t key_length;\n+\tuint16_t digest_length;\n };\n \n static const struct crypto_param aead_list[] = {\n@@ -91,6 +92,41 @@ static const struct crypto_param aead_list[] = {\n \t},\n };\n \n+static const struct crypto_param cipher_list[] = {\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n+\t\t.alg.cipher = RTE_CRYPTO_CIPHER_AES_CBC,\n+\t\t.key_length = 16,\n+\t},\n+};\n+\n+static const struct crypto_param auth_list[] = {\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t.alg.auth = RTE_CRYPTO_AUTH_NULL,\n+\t},\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t.alg.auth = RTE_CRYPTO_AUTH_SHA256_HMAC,\n+\t\t.key_length = 32,\n+\t\t.digest_length = 16,\n+\t},\n+};\n+\n+struct crypto_param_comb {\n+\tconst struct crypto_param *param1;\n+\tconst struct crypto_param *param2;\n+};\n+\n+extern struct ipsec_test_data pkt_aes_256_gcm;\n+extern struct ipsec_test_data pkt_aes_128_cbc_hmac_sha256;\n+\n+extern struct crypto_param_comb alg_list[RTE_DIM(aead_list) +\n+\t\t\t\t\t (RTE_DIM(cipher_list) *\n+\t\t\t\t\t RTE_DIM(auth_list))];\n+\n+void test_ipsec_alg_list_populate(void);\n+\n int test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform,\n \t\t\t const struct rte_security_capability *sec_cap,\n \t\t\t bool silent);\ndiff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst\nindex 83536ed..62682d0 100644\n--- a/doc/guides/rel_notes/release_22_03.rst\n+++ b/doc/guides/rel_notes/release_22_03.rst\n@@ -57,6 +57,7 @@ New Features\n \n * **Updated lookaside protocol (IPsec) tests in dpdk-test.**\n \n+ * Added support for chained operations.\n * Added AES-CBC 128 NULL auth known vector tests.\n * Added AES-CBC 128 HMAC-SHA256 known vector tests.\n \n", "prefixes": [ "v2", "03/13" ] }{ "id": 104911, "url": "