Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/104884/?format=api
http://patchwork.dpdk.org/api/patches/104884/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1638777528-553-9-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": "<1638777528-553-9-git-send-email-anoobj@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1638777528-553-9-git-send-email-anoobj@marvell.com", "date": "2021-12-06T07:58:43", "name": "[08/13] test/crypto: add security stats cases", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "5e2f8dea7c11684f02cf88899c6f7bb9326b314f", "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/1638777528-553-9-git-send-email-anoobj@marvell.com/mbox/", "series": [ { "id": 20861, "url": "http://patchwork.dpdk.org/api/series/20861/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20861", "date": "2021-12-06T07:58:35", "name": "Add new cases to lookaside IPsec tests", "version": 1, "mbox": "http://patchwork.dpdk.org/series/20861/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/104884/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/104884/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 2CC41A034F;\n\tMon, 6 Dec 2021 09:00:14 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 35ABF40A4B;\n\tMon, 6 Dec 2021 09:00:02 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id D685A41171\n for <dev@dpdk.org>; Mon, 6 Dec 2021 08:59:59 +0100 (CET)", "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 1B5MiLcn005836;\n Sun, 5 Dec 2021 23:59:59 -0800", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cs0qn2746-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 05 Dec 2021 23:59:58 -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 Sun, 5 Dec 2021 23:59:57 -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; Sun, 5 Dec 2021 23:59:57 -0800", "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id C4FFE3F704A;\n Sun, 5 Dec 2021 23:59:53 -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=SkeL8WYiGzIIGoIEIp47bWOg0Uk4DgLl+yGkkGTK/8k=;\n b=jchamOhSImNQFLWRvKm+172fsmRnpZKd3wPf16XEliyRPrMuZpN60TVswvez/nUO4GGt\n L4Fuqfts5DnEjyxCkHBBZqQF7vccmzdwpGquK2cyUOyxB7Rg3KdQtYgSxX74mtxDkvdp\n +Hi8Gr0wJlR1RPxlV5ZUulLx4PRWFc+j9XT/a3q8VREgnUU8zQlgSEV2otT6520pT6E7\n +pLjhRp6Y2XM4WByjnh71qtcTuRCjx/ui5jRam9koTNhzKwe2y7KeuVj7MKOxPc+g13H\n uRNJmPcRCN3N4wrN1v5BKOQeCNGOwJrveHksF+hxoj3uxSQsgEmIWsaOaWsK43n8242r vw==", "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": "Ankur Dwivedi <adwivedi@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 08/13] test/crypto: add security stats cases", "Date": "Mon, 6 Dec 2021 13:28:43 +0530", "Message-ID": "<1638777528-553-9-git-send-email-anoobj@marvell.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1638777528-553-1-git-send-email-anoobj@marvell.com>", "References": "<1638777528-553-1-git-send-email-anoobj@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-GUID": "WxIM6PhgTwImpfDaQ_M_sb7bMq_IJjuh", "X-Proofpoint-ORIG-GUID": "WxIM6PhgTwImpfDaQ_M_sb7bMq_IJjuh", "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_03,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": "From: Ankur Dwivedi <adwivedi@marvell.com>\n\nAdds security stats test cases in IPSEC protocol testsuite.\n\nSigned-off-by: Ankur Dwivedi <adwivedi@marvell.com>\n---\n app/test/test_cryptodev.c | 21 +++++++++++++++++++++\n app/test/test_cryptodev_security_ipsec.c | 29 +++++++++++++++++++++++++++++\n app/test/test_cryptodev_security_ipsec.h | 6 ++++++\n 3 files changed, 56 insertions(+)", "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex f8f2660..34bc3e0 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9332,6 +9332,11 @@ test_ipsec_proto_process(const struct ipsec_test_data td[],\n \t\tif (ret != TEST_SUCCESS)\n \t\t\tgoto crypto_op_free;\n \n+\t\tret = test_ipsec_stats_verify(ctx, ut_params->sec_session,\n+\t\t\t\t\t flags, dir);\n+\t\tif (ret != TEST_SUCCESS)\n+\t\t\tgoto crypto_op_free;\n+\n \t\trte_crypto_op_free(ut_params->op);\n \t\tut_params->op = NULL;\n \n@@ -9653,6 +9658,18 @@ test_ipsec_proto_transport_v4(const void *data __rte_unused)\n }\n \n static int\n+test_ipsec_proto_stats(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags;\n+\n+\tmemset(&flags, 0, sizeof(flags));\n+\n+\tflags.stats_success = true;\n+\n+\treturn test_ipsec_proto_all(&flags);\n+}\n+\n+static int\n test_PDCP_PROTO_all(void)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n@@ -14656,6 +14673,10 @@ static struct unit_test_suite ipsec_proto_testsuite = {\n \t\t\t\"Transport IPv4\",\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_transport_v4),\n+\t\tTEST_CASE_NAMED_ST(\n+\t\t\t\"Statistics: success\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_stats),\n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n };\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex 029fdd3..6fa1d3d 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -415,6 +415,8 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \t\t\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4;\n \t\t}\n \n+\t\tif (flags->stats_success)\n+\t\t\ttd->ipsec_xform.options.stats = 1;\n \n \t}\n }\n@@ -871,3 +873,30 @@ test_ipsec_status_check(struct rte_crypto_op *op,\n \n \treturn ret;\n }\n+\n+int\n+test_ipsec_stats_verify(struct rte_security_ctx *ctx,\n+\t\t\tstruct rte_security_session *sess,\n+\t\t\tconst struct ipsec_test_flags *flags,\n+\t\t\tenum rte_security_ipsec_sa_direction dir)\n+{\n+\tstruct rte_security_stats stats = {0};\n+\tint ret = TEST_SUCCESS;\n+\n+\tif (flags->stats_success) {\n+\t\tif (rte_security_session_stats_get(ctx, sess, &stats) < 0)\n+\t\t\treturn TEST_FAILED;\n+\n+\t\tif (dir == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {\n+\t\t\tif (stats.ipsec.opackets != 1 ||\n+\t\t\t stats.ipsec.oerrors != 0)\n+\t\t\t\tret = TEST_FAILED;\n+\t\t} else {\n+\t\t\tif (stats.ipsec.ipackets != 1 ||\n+\t\t\t stats.ipsec.ierrors != 0)\n+\t\t\t\tret = TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\treturn ret;\n+}\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 07d2453..3565a8c 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -65,6 +65,7 @@ struct ipsec_test_flags {\n \tbool tunnel_ipv6;\n \tbool transport;\n \tbool fragment;\n+\tbool stats_success;\n };\n \n struct crypto_param {\n@@ -188,4 +189,9 @@ int test_ipsec_status_check(struct rte_crypto_op *op,\n \t\t\t enum rte_security_ipsec_sa_direction dir,\n \t\t\t int pkt_num);\n \n+int test_ipsec_stats_verify(struct rte_security_ctx *ctx,\n+\t\t\t struct rte_security_session *sess,\n+\t\t\t const struct ipsec_test_flags *flags,\n+\t\t\t enum rte_security_ipsec_sa_direction dir);\n+\n #endif\n", "prefixes": [ "08/13" ] }{ "id": 104884, "url": "