Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/138298/?format=api
http://patches.dpdk.org/api/patches/138298/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240313055030.1685039-16-asasidharan@marvell.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": "<20240313055030.1685039-16-asasidharan@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240313055030.1685039-16-asasidharan@marvell.com", "date": "2024-03-13T05:50:24", "name": "[v4,15/21] test/crypto: update framework to verify tls-1.3", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d5158f9abb277c55bd49da72f437a54bd822617f", "submitter": { "id": 2800, "url": "http://patches.dpdk.org/api/people/2800/?format=api", "name": "Aakash Sasidharan", "email": "asasidharan@marvell.com" }, "delegate": { "id": 6690, "url": "http://patches.dpdk.org/api/users/6690/?format=api", "username": "akhil", "first_name": "akhil", "last_name": "goyal", "email": "gakhil@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240313055030.1685039-16-asasidharan@marvell.com/mbox/", "series": [ { "id": 31490, "url": "http://patches.dpdk.org/api/series/31490/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31490", "date": "2024-03-13T05:50:09", "name": "Improvements and new test cases", "version": 4, "mbox": "http://patches.dpdk.org/series/31490/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/138298/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/138298/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 5ADF043C9A;\n\tWed, 13 Mar 2024 06:52:43 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6B1E442DF7;\n\tWed, 13 Mar 2024 06:51:55 +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 ECC4640633\n for <dev@dpdk.org>; Wed, 13 Mar 2024 06:51:19 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id\n 42CImJV8025932; Tue, 12 Mar 2024 22:51:19 -0700", "from dc5-exch05.marvell.com ([199.233.59.128])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3wswdd0jnv-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n Tue, 12 Mar 2024 22:51:19 -0700 (PDT)", "from DC5-EXCH05.marvell.com (10.69.176.209) by\n DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1258.12; Tue, 12 Mar 2024 22:51:17 -0700", "from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com\n (10.69.176.209) with Microsoft SMTP Server id 15.2.1258.12 via Frontend\n Transport; Tue, 12 Mar 2024 22:51:17 -0700", "from localhost.localdomain (unknown [10.28.36.177])\n by maili.marvell.com (Postfix) with ESMTP id 8E7EC3F708E;\n Tue, 12 Mar 2024 22:51:15 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding:content-type; s=\n pfpt0220; bh=ddegzEs66gOmvLOKeFIHelz97LFF8NnupcFMSi2iZkc=; b=Tmg\n SX51cD3WDbsBEv+4A393ke0kZC6UNgx4EqFvKfs8C20I+YVurFGS1DKD8Upc8zuh\n du2AjZeY9Uxzo+DG7G8hkYfnuggE3vEfixb/tEWZCyfoFak0dlWgNIrKt1pG97rP\n sbXzWhMmjj1WSOrs4KSYnVinQEpYRajyBfv7qC8ASNbBdls8Zc29C2D2Cx9dHArH\n UICyWuPPxqTzO18zcKnOR8m5eDqgQXdJec3NJCxINKF3eyMF68w+QSN5hkRU8RbJ\n /LCHX4KY/Fp8g4Pup5o6tKXJan7ZtxiqsjtRcQxLxz6VDcO+lfdJO3djMoDpu0rS\n tljnQ1V0/S8jnbPiCzA==", "From": "Aakash Sasidharan <asasidharan@marvell.com>", "To": "Akhil Goyal <gakhil@marvell.com>, Fan Zhang <fanzhang.oss@gmail.com>", "CC": "<jerinj@marvell.com>, <anoobj@marvell.com>, <vvelumuri@marvell.com>,\n <asasidharan@marvell.com>, <dev@dpdk.org>", "Subject": "[PATCH v4 15/21] test/crypto: update framework to verify tls-1.3", "Date": "Wed, 13 Mar 2024 11:20:24 +0530", "Message-ID": "<20240313055030.1685039-16-asasidharan@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20240313055030.1685039-1-asasidharan@marvell.com>", "References": "<20240312175143.1664699-1-asasidharan@marvell.com>\n <20240313055030.1685039-1-asasidharan@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "HcDfXRjt6mlv0VIDAiN9ZifmF3zPTM_F", "X-Proofpoint-GUID": "HcDfXRjt6mlv0VIDAiN9ZifmF3zPTM_F", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2024-03-13_05,2024-03-12_01,2023-05-22_02", "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": "From: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n\nUpdate the fields in preparation of test descriptor.\n\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n app/test/test_cryptodev.c | 17 +++++---\n app/test/test_cryptodev_security_tls_record.c | 43 ++++++++++++-------\n app/test/test_cryptodev_security_tls_record.h | 10 ++---\n 3 files changed, 43 insertions(+), 27 deletions(-)", "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex aa9fffe50e..25777c1b1f 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -11889,8 +11889,9 @@ test_tls_record_proto_process(const struct tls_record_test_data td[],\n \t\tut_params->op->param1.tls_record.content_type = td[i].app_type;\n \n \t\t/* Copy IV in crypto operation when IV generation is disabled */\n-\t\tif (sess_type == RTE_SECURITY_TLS_SESS_TYPE_WRITE &&\n-\t\t tls_record_xform.options.iv_gen_disable == 1) {\n+\t\tif ((sess_type == RTE_SECURITY_TLS_SESS_TYPE_WRITE) &&\n+\t\t (tls_record_xform.ver != RTE_SECURITY_VERSION_TLS_1_3) &&\n+\t\t (tls_record_xform.options.iv_gen_disable == 1)) {\n \t\t\tuint8_t *iv;\n \t\t\tint len;\n \n@@ -12005,8 +12006,10 @@ test_tls_record_proto_all(const struct tls_record_test_flags *flags)\n \t\tif (flags->zero_len)\n \t\t\tpayload_len = 0;\n again:\n-\t\ttest_tls_record_td_prepare(sec_alg_list[i].param1, sec_alg_list[i].param2, flags,\n-\t\t\t\t\t td_outb, nb_pkts, payload_len);\n+\t\tret = test_tls_record_td_prepare(sec_alg_list[i].param1, sec_alg_list[i].param2,\n+\t\t\t\t\t\t flags, td_outb, nb_pkts, payload_len);\n+\t\tif (ret == TEST_SKIPPED)\n+\t\t\tcontinue;\n \n \t\tret = test_tls_record_proto_process(td_outb, td_inb, nb_pkts, true, flags);\n \t\tif (ret == TEST_SKIPPED)\n@@ -12218,8 +12221,10 @@ test_dtls_pkt_replay(const uint64_t seq_no[],\n \tint ret;\n \n \tfor (i = 0; i < RTE_DIM(sec_alg_list); i++) {\n-\t\ttest_tls_record_td_prepare(sec_alg_list[i].param1, sec_alg_list[i].param2, flags,\n-\t\t\t\t\t td_outb, nb_pkts, 0);\n+\t\tret = test_tls_record_td_prepare(sec_alg_list[i].param1, sec_alg_list[i].param2,\n+\t\t\t\t\t\t flags, td_outb, nb_pkts, 0);\n+\t\tif (ret == TEST_SKIPPED)\n+\t\t\tcontinue;\n \n \t\tfor (idx = 0; idx < nb_pkts; idx++)\n \t\t\ttd_outb[idx].tls_record_xform.dtls_1_2.seq_no = seq_no[idx];\ndiff --git a/app/test/test_cryptodev_security_tls_record.c b/app/test/test_cryptodev_security_tls_record.c\nindex 498c4923e0..96d0a94731 100644\n--- a/app/test/test_cryptodev_security_tls_record.c\n+++ b/app/test/test_cryptodev_security_tls_record.c\n@@ -70,7 +70,7 @@ test_tls_record_td_read_from_write(const struct tls_record_test_data *td_out,\n \t}\n }\n \n-void\n+int\n test_tls_record_td_prepare(const struct crypto_param *param1, const struct crypto_param *param2,\n \t\t\t const struct tls_record_test_flags *flags,\n \t\t\t struct tls_record_test_data *td_array,\n@@ -79,6 +79,10 @@ test_tls_record_td_prepare(const struct crypto_param *param1, const struct crypt\n \tint i, min_padding, hdr_len, tls_pkt_size, mac_len = 0, exp_nonce_len = 0, roundup_len = 0;\n \tstruct tls_record_test_data *td = NULL;\n \n+\tif ((flags->tls_version == RTE_SECURITY_VERSION_TLS_1_3) &&\n+\t (param1->type != RTE_CRYPTO_SYM_XFORM_AEAD))\n+\t\treturn TEST_SKIPPED;\n+\n \tmemset(td_array, 0, nb_td * sizeof(*td));\n \n \tfor (i = 0; i < nb_td; i++) {\n@@ -88,10 +92,17 @@ test_tls_record_td_prepare(const struct crypto_param *param1, const struct crypt\n \n \t\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n \t\t\t/* Copy template for packet & key fields */\n-\t\t\tif (flags->tls_version == RTE_SECURITY_VERSION_DTLS_1_2)\n-\t\t\t\tmemcpy(td, &dtls_test_data_aes_128_gcm, sizeof(*td));\n-\t\t\telse\n+\t\t\tswitch (flags->tls_version) {\n+\t\t\tcase RTE_SECURITY_VERSION_TLS_1_2:\n \t\t\t\tmemcpy(td, &tls_test_data_aes_128_gcm_v1, sizeof(*td));\n+\t\t\t\tbreak;\n+\t\t\tcase RTE_SECURITY_VERSION_DTLS_1_2:\n+\t\t\t\tmemcpy(td, &dtls_test_data_aes_128_gcm, sizeof(*td));\n+\t\t\t\tbreak;\n+\t\t\tcase RTE_SECURITY_VERSION_TLS_1_3:\n+\t\t\t\tmemcpy(td, &tls13_test_data_aes_128_gcm, sizeof(*td));\n+\t\t\t\tbreak;\n+\t\t\t}\n \n \t\t\ttd->aead = true;\n \t\t\ttd->xform.aead.aead.algo = param1->alg.aead;\n@@ -127,6 +138,7 @@ test_tls_record_td_prepare(const struct crypto_param *param1, const struct crypt\n \n \t\tif (!td->aead) {\n \t\t\tmac_len = td->xform.chain.auth.auth.digest_length;\n+\t\t\tmin_padding = 1;\n \t\t\tswitch (td->xform.chain.cipher.cipher.algo) {\n \t\t\tcase RTE_CRYPTO_CIPHER_3DES_CBC:\n \t\t\t\troundup_len = 8;\n@@ -143,30 +155,28 @@ test_tls_record_td_prepare(const struct crypto_param *param1, const struct crypt\n \t\t\t}\n \t\t} else {\n \t\t\tmac_len = td->xform.aead.aead.digest_length;\n+\t\t\tmin_padding = 0;\n \t\t\troundup_len = 0;\n-\t\t\texp_nonce_len = 8;\n+\t\t\tif (td->tls_record_xform.ver == RTE_SECURITY_VERSION_TLS_1_3)\n+\t\t\t\texp_nonce_len = 0;\n+\t\t\telse\n+\t\t\t\texp_nonce_len = 8;\n \t\t}\n \n \t\tswitch (td->tls_record_xform.ver) {\n \t\tcase RTE_SECURITY_VERSION_TLS_1_2:\n+\t\t\thdr_len = sizeof(struct rte_tls_hdr);\n+\t\t\tbreak;\n \t\tcase RTE_SECURITY_VERSION_TLS_1_3:\n \t\t\thdr_len = sizeof(struct rte_tls_hdr);\n-\t\t\tif (td->aead)\n-\t\t\t\tmin_padding = 0;\n-\t\t\telse\n-\t\t\t\tmin_padding = 1;\n+\t\t\t/* Add 1 byte for content type in packet */\n+\t\t\ttls_pkt_size += 1;\n \t\t\tbreak;\n \t\tcase RTE_SECURITY_VERSION_DTLS_1_2:\n \t\t\thdr_len = sizeof(struct rte_dtls_hdr);\n-\t\t\tif (td->aead)\n-\t\t\t\tmin_padding = 0;\n-\t\t\telse\n-\t\t\t\tmin_padding = 1;\n \t\t\tbreak;\n \t\tdefault:\n-\t\t\thdr_len = 0;\n-\t\t\tmin_padding = 0;\n-\t\t\tbreak;\n+\t\t\treturn TEST_SKIPPED;\n \t\t}\n \n \t\ttls_pkt_size += mac_len;\n@@ -186,6 +196,7 @@ test_tls_record_td_prepare(const struct crypto_param *param1, const struct crypt\n \t\ttd->output_text.len = tls_pkt_size;\n \n \t}\n+\treturn TEST_SUCCESS;\n }\n \n void\ndiff --git a/app/test/test_cryptodev_security_tls_record.h b/app/test/test_cryptodev_security_tls_record.h\nindex 9fbc64605d..0138770fac 100644\n--- a/app/test/test_cryptodev_security_tls_record.h\n+++ b/app/test/test_cryptodev_security_tls_record.h\n@@ -137,11 +137,11 @@ int test_tls_record_sec_caps_verify(struct rte_security_tls_record_xform *tls_re\n void test_tls_record_td_read_from_write(const struct tls_record_test_data *td_out,\n \t\t\t\t\tstruct tls_record_test_data *td_in);\n \n-void test_tls_record_td_prepare(const struct crypto_param *param1,\n-\t\t\t\tconst struct crypto_param *param2,\n-\t\t\t\tconst struct tls_record_test_flags *flags,\n-\t\t\t\tstruct tls_record_test_data *td_array, int nb_td,\n-\t\t\t\tunsigned int data_len);\n+int test_tls_record_td_prepare(const struct crypto_param *param1,\n+\t\t\t const struct crypto_param *param2,\n+\t\t\t const struct tls_record_test_flags *flags,\n+\t\t\t struct tls_record_test_data *td_array, int nb_td,\n+\t\t\t unsigned int data_len);\n \n void test_tls_record_td_update(struct tls_record_test_data td_inb[],\n \t\t\t const struct tls_record_test_data td_outb[], int nb_td,\n", "prefixes": [ "v4", "15/21" ] }{ "id": 138298, "url": "