get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134917,
    "url": "https://patches.dpdk.org/api/patches/134917/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20231207130216.140-6-anoobj@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20231207130216.140-6-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231207130216.140-6-anoobj@marvell.com",
    "date": "2023-12-07T13:02:07",
    "name": "[05/14] test/crypto: move algorithm framework to common",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "8ec430a0925221bfe000180d43726309ee26a127",
    "submitter": {
        "id": 1205,
        "url": "https://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20231207130216.140-6-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 30476,
            "url": "https://patches.dpdk.org/api/series/30476/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=30476",
            "date": "2023-12-07T13:02:02",
            "name": "Add TLS record test suite",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/30476/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/134917/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/134917/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 2B3BC43699;\n\tThu,  7 Dec 2023 14:03:13 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6BAB542EF8;\n\tThu,  7 Dec 2023 14:02:40 +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 2C0F542F09\n for <dev@dpdk.org>; Thu,  7 Dec 2023 14:02:39 +0100 (CET)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 3B79PGbO032087; Thu, 7 Dec 2023 05:02:38 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3uubdd8n58-2\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 07 Dec 2023 05:02:38 -0800",
            "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48;\n Thu, 7 Dec 2023 05:02:35 -0800",
            "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend\n Transport; Thu, 7 Dec 2023 05:02:35 -0800",
            "from BG-LT92004.corp.innovium.com (unknown [10.28.163.189])\n by maili.marvell.com (Postfix) with ESMTP id 9F9D03F7051;\n Thu,  7 Dec 2023 05:02:32 -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=a4Sw30HAtRs47lV4EF17Fe5LxLAGe9TN6jVfdrlK9+A=;\n b=lOMaNndrZ84JWmOlgFlWfNIOKgtrT9DAqcC08IRXLkwC58s388VF5xdffNObJS+uVVa7\n nTYlYRF4XO/GNHrpSWnmOnFbSLz/jDcTj2344Iexwrwz2GovLkFMUhFaK7JZiQEoanDs\n nE+3xzWBzoPT9E1v1OpKLJUV6KAt5QUBdoh0FVOiobFqk3KKA/M+c+bhAlnFnVbKd5gd\n oOU9iIeqrpNGQEiHRwAZd8Fm34TkPYZlxgp9/hkCiJQrgyRn5nLOIMF+a0o3xXma6goZ\n oa9ERAnDmWNFBOvpNTBFqAzDB4PDX9uq5hQpIMpEMuu92TLxKtpA65HA4QE2PFVO+wmz kg==",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>, Jerin Jacob <jerinj@marvell.com>",
        "CC": "Vidya Sagar Velumuri <vvelumuri@marvell.com>, Harry van Haaren\n <harry.van.haaren@intel.com>, Hemant Agrawal <hemant.agrawal@nxp.com>,\n Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>, <dev@dpdk.org>",
        "Subject": "[PATCH 05/14] test/crypto: move algorithm framework to common",
        "Date": "Thu, 7 Dec 2023 18:32:07 +0530",
        "Message-ID": "<20231207130216.140-6-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20231207130216.140-1-anoobj@marvell.com>",
        "References": "<20231207130216.140-1-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "ff_pBlxt4N5QAorA9BDyYnFJwdyhkEOv",
        "X-Proofpoint-GUID": "ff_pBlxt4N5QAorA9BDyYnFJwdyhkEOv",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26\n definitions=2023-12-07_10,2023-12-07_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\nMove algorithm list and the associated framework to common files\n(test_security_proto.c & .h) to be able to use same framework for other\nsecurity offload tests such as TLS record.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n app/test-security-perf/test_security_perf.c | 17 +++---\n app/test/test_cryptodev.c                   | 35 ++++++------\n app/test/test_cryptodev_security_ipsec.c    | 60 +++------------------\n app/test/test_cryptodev_security_ipsec.h    | 16 ------\n app/test/test_security_inline_proto.c       | 27 +++++-----\n app/test/test_security_proto.c              | 46 ++++++++++++++++\n app/test/test_security_proto.h              | 16 ++++++\n 7 files changed, 109 insertions(+), 108 deletions(-)",
    "diff": "diff --git a/app/test-security-perf/test_security_perf.c b/app/test-security-perf/test_security_perf.c\nindex 84726de7b0..b0d55cbab0 100644\n--- a/app/test-security-perf/test_security_perf.c\n+++ b/app/test-security-perf/test_security_perf.c\n@@ -474,8 +474,8 @@ args_parse(int argc, char **argv)\n int\n main(int argc, char **argv)\n {\n-\tstruct ipsec_test_data td_outb[RTE_DIM(alg_list)];\n-\tstruct ipsec_test_data td_inb[RTE_DIM(alg_list)];\n+\tstruct ipsec_test_data td_outb[RTE_DIM(sec_alg_list)];\n+\tstruct ipsec_test_data td_inb[RTE_DIM(sec_alg_list)];\n \tstruct ipsec_test_flags flags;\n \tuint32_t lcore_id;\n \tuint8_t nb_lcores;\n@@ -513,11 +513,11 @@ main(int argc, char **argv)\n \tif (ret)\n \t\tgoto cryptodev_fini;\n \n-\ttest_ipsec_alg_list_populate();\n+\ttest_sec_alg_list_populate();\n \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+\tfor (i = 0; i < RTE_DIM(sec_alg_list); i++) {\n+\t\ttest_ipsec_td_prepare(sec_alg_list[i].param1,\n+\t\t\t\t      sec_alg_list[i].param2,\n \t\t\t\t      &flags,\n \t\t\t\t      &td_outb[i],\n \t\t\t\t      1);\n@@ -529,10 +529,11 @@ main(int argc, char **argv)\n \tif (ctx.is_inbound)\n \t\tctx.td = td_inb;\n \n-\tfor (ctx.td_idx = 0; ctx.td_idx < RTE_DIM(alg_list); ctx.td_idx++) {\n+\tfor (ctx.td_idx = 0; ctx.td_idx < RTE_DIM(sec_alg_list); ctx.td_idx++) {\n \n \t\tprintf(\"\\n\\n    Algorithm combination:\");\n-\t\ttest_sec_alg_display(alg_list[ctx.td_idx].param1, alg_list[ctx.td_idx].param2);\n+\t\ttest_sec_alg_display(sec_alg_list[ctx.td_idx].param1,\n+\t\t\t\t     sec_alg_list[ctx.td_idx].param2);\n \t\tprintf(\"    ----------------------\");\n \n \t\tprintf(\"\\n%20s%20s%20s%20s%20s%20s\\n\\n\",\ndiff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 218761f0a9..fbb97d5456 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -838,8 +838,8 @@ ipsec_proto_testsuite_setup(void)\n \t\tret = TEST_SKIPPED;\n \t}\n \n-\ttest_ipsec_alg_list_populate();\n-\ttest_ipsec_ah_alg_list_populate();\n+\ttest_sec_alg_list_populate();\n+\ttest_sec_auth_only_alg_list_populate();\n \n \t/*\n \t * Stop the device. Device would be started again by individual test\n@@ -10483,19 +10483,19 @@ test_ipsec_proto_known_vec_inb_rx_inject(const void *test_data)\n static int\n test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n {\n-\tstruct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];\n-\tstruct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX];\n+\tstruct ipsec_test_data td_outb[TEST_SEC_PKTS_MAX];\n+\tstruct ipsec_test_data td_inb[TEST_SEC_PKTS_MAX];\n \tunsigned int i, nb_pkts = 1, pass_cnt = 0;\n \tint ret;\n \n \tif (flags->iv_gen ||\n \t    flags->sa_expiry_pkts_soft ||\n \t    flags->sa_expiry_pkts_hard)\n-\t\tnb_pkts = IPSEC_TEST_PACKETS_MAX;\n+\t\tnb_pkts = TEST_SEC_PKTS_MAX;\n \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+\tfor (i = 0; i < RTE_DIM(sec_alg_list); i++) {\n+\t\ttest_ipsec_td_prepare(sec_alg_list[i].param1,\n+\t\t\t\t      sec_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@@ -10540,7 +10540,7 @@ 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_sec_alg_display(alg_list[i].param1, alg_list[i].param2);\n+\t\t\ttest_sec_alg_display(sec_alg_list[i].param1, sec_alg_list[i].param2);\n \n \t\tpass_cnt++;\n \t}\n@@ -10554,14 +10554,14 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n static int\n test_ipsec_ah_proto_all(const struct ipsec_test_flags *flags)\n {\n-\tstruct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];\n-\tstruct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX];\n+\tstruct ipsec_test_data td_outb[TEST_SEC_PKTS_MAX];\n+\tstruct ipsec_test_data td_inb[TEST_SEC_PKTS_MAX];\n \tunsigned int i, nb_pkts = 1, pass_cnt = 0;\n \tint ret;\n \n-\tfor (i = 0; i < RTE_DIM(ah_alg_list); i++) {\n-\t\ttest_ipsec_td_prepare(ah_alg_list[i].param1,\n-\t\t\t\t      ah_alg_list[i].param2,\n+\tfor (i = 0; i < RTE_DIM(sec_auth_only_alg_list); i++) {\n+\t\ttest_ipsec_td_prepare(sec_auth_only_alg_list[i].param1,\n+\t\t\t\t      sec_auth_only_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@@ -10585,7 +10585,8 @@ test_ipsec_ah_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_sec_alg_display(ah_alg_list[i].param1, ah_alg_list[i].param2);\n+\t\t\ttest_sec_alg_display(sec_auth_only_alg_list[i].param1,\n+\t\t\t\t\t     sec_auth_only_alg_list[i].param2);\n \n \t\tpass_cnt++;\n \t}\n@@ -11087,8 +11088,8 @@ test_ipsec_pkt_replay(const void *test_data, const uint64_t esn[],\n \t\t      bool replayed_pkt[], uint32_t nb_pkts, bool esn_en,\n \t\t      uint64_t winsz)\n {\n-\tstruct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];\n-\tstruct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX];\n+\tstruct ipsec_test_data td_outb[TEST_SEC_PKTS_MAX];\n+\tstruct ipsec_test_data td_inb[TEST_SEC_PKTS_MAX];\n \tstruct ipsec_test_flags flags;\n \tuint32_t i = 0, ret = 0;\n \ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex dafe3244e8..1aba1ad993 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -21,12 +21,6 @@\n #define IPVERSION 4\n #endif\n \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-struct crypto_param_comb ah_alg_list[2 * (RTE_DIM(auth_list) - 1)];\n-\n static bool\n is_valid_ipv4_pkt(const struct rte_ipv4_hdr *pkt)\n {\n@@ -61,46 +55,6 @@ is_valid_ipv6_pkt(const struct rte_ipv6_hdr *pkt)\n \treturn true;\n }\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-void\n-test_ipsec_ah_alg_list_populate(void)\n-{\n-\tunsigned long i, index = 0;\n-\n-\tfor (i = 1; i < RTE_DIM(auth_list); i++) {\n-\t\tah_alg_list[index].param1 = &auth_list[i];\n-\t\tah_alg_list[index].param2 = NULL;\n-\t\tindex++;\n-\t}\n-\n-\tfor (i = 1; i < RTE_DIM(auth_list); i++) {\n-\t\t/* NULL cipher */\n-\t\tah_alg_list[index].param1 = &cipher_list[0];\n-\n-\t\tah_alg_list[index].param2 = &auth_list[i];\n-\t\tindex++;\n-\t}\n-}\n-\n int\n test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform,\n \t\t\t   const struct rte_security_capability *sec_cap,\n@@ -447,8 +401,7 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \t\t\ttd->ipsec_xform.options.iv_gen_disable = 0;\n \n \t\tif (flags->sa_expiry_pkts_soft)\n-\t\t\ttd->ipsec_xform.life.packets_soft_limit =\n-\t\t\t\t\tIPSEC_TEST_PACKETS_MAX - 1;\n+\t\t\ttd->ipsec_xform.life.packets_soft_limit = TEST_SEC_PKTS_MAX - 1;\n \n \t\tif (flags->ip_csum) {\n \t\t\ttd->ipsec_xform.options.ip_csum_enable = 1;\n@@ -526,8 +479,7 @@ test_ipsec_td_update(struct ipsec_test_data td_inb[],\n \t\t}\n \n \t\tif (flags->sa_expiry_pkts_hard)\n-\t\t\ttd_inb[i].ipsec_xform.life.packets_hard_limit =\n-\t\t\t\t\tIPSEC_TEST_PACKETS_MAX - 1;\n+\t\t\ttd_inb[i].ipsec_xform.life.packets_hard_limit = TEST_SEC_PKTS_MAX - 1;\n \n \t\tif (flags->udp_encap)\n \t\t\ttd_inb[i].ipsec_xform.options.udp_encap = 1;\n@@ -570,7 +522,7 @@ test_ipsec_tunnel_hdr_len_get(const struct ipsec_test_data *td)\n static int\n test_ipsec_iv_verify_push(const uint8_t *output_text, const struct ipsec_test_data *td)\n {\n-\tstatic uint8_t iv_queue[IV_LEN_MAX * IPSEC_TEST_PACKETS_MAX];\n+\tstatic uint8_t iv_queue[IV_LEN_MAX * TEST_SEC_PKTS_MAX];\n \tint i, iv_pos, iv_len;\n \tstatic int index;\n \tuint8_t *iv_tmp;\n@@ -601,7 +553,7 @@ test_ipsec_iv_verify_push(const uint8_t *output_text, const struct ipsec_test_da\n \tmemcpy(iv_tmp, output_text, iv_len);\n \tindex++;\n \n-\tif (index == IPSEC_TEST_PACKETS_MAX)\n+\tif (index == TEST_SEC_PKTS_MAX)\n \t\tindex = 0;\n \n \treturn TEST_SUCCESS;\n@@ -1101,7 +1053,7 @@ test_ipsec_status_check(const struct ipsec_test_data *td,\n \n \tif (dir == RTE_SECURITY_IPSEC_SA_DIR_INGRESS &&\n \t    flags->sa_expiry_pkts_hard &&\n-\t    pkt_num == IPSEC_TEST_PACKETS_MAX) {\n+\t    pkt_num == TEST_SEC_PKTS_MAX) {\n \t\tif (op->status != RTE_CRYPTO_OP_STATUS_ERROR) {\n \t\t\tprintf(\"SA hard expiry (pkts) test failed\\n\");\n \t\t\treturn TEST_FAILED;\n@@ -1133,7 +1085,7 @@ test_ipsec_status_check(const struct ipsec_test_data *td,\n \t\t}\n \t}\n \n-\tif (flags->sa_expiry_pkts_soft && pkt_num == IPSEC_TEST_PACKETS_MAX) {\n+\tif (flags->sa_expiry_pkts_soft && pkt_num == TEST_SEC_PKTS_MAX) {\n \t\tif (!(op->aux_flags &\n \t\t      RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRY)) {\n \t\t\tprintf(\"SA soft expiry (pkts) test failed\\n\");\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 41aa865a0f..3c69471099 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -10,7 +10,6 @@\n \n #include \"test_security_proto.h\"\n \n-#define IPSEC_TEST_PACKETS_MAX 32\n #define IPSEC_TEXT_MAX_LEN 16384u\n \n struct ipsec_test_data {\n@@ -117,26 +116,11 @@ struct ipsec_test_flags {\n \tbool rx_inject;\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_256_gcm_v6;\n extern struct ipsec_test_data pkt_aes_128_cbc_hmac_sha256;\n extern struct ipsec_test_data pkt_aes_128_cbc_hmac_sha256_v6;\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-extern struct crypto_param_comb ah_alg_list[2 * (RTE_DIM(auth_list) - 1)];\n-\n-void test_ipsec_alg_list_populate(void);\n-\n-void test_ipsec_ah_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/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c\nindex 6cda9fe7aa..481382b64e 100644\n--- a/app/test/test_security_inline_proto.c\n+++ b/app/test/test_security_inline_proto.c\n@@ -1295,11 +1295,11 @@ test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)\n \t\t\tflags->sa_expiry_bytes_soft ||\n \t\t\tflags->sa_expiry_bytes_hard ||\n \t\t\tflags->sa_expiry_pkts_hard)\n-\t\tnb_pkts = IPSEC_TEST_PACKETS_MAX;\n+\t\tnb_pkts = TEST_SEC_PKTS_MAX;\n \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+\tfor (i = 0; i < RTE_DIM(sec_alg_list); i++) {\n+\t\ttest_ipsec_td_prepare(sec_alg_list[i].param1,\n+\t\t\t\t      sec_alg_list[i].param2,\n \t\t\t\t      flags, &td_outb, 1);\n \n \t\tif (!td_outb.aead) {\n@@ -1331,8 +1331,7 @@ test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)\n \t\t\t\t(((td_outb.output_text.len + RTE_ETHER_HDR_LEN)\n \t\t\t\t  * nb_pkts) >> 3) - 1;\n \t\tif (flags->sa_expiry_pkts_hard)\n-\t\t\ttd_outb.ipsec_xform.life.packets_hard_limit =\n-\t\t\t\t\tIPSEC_TEST_PACKETS_MAX - 1;\n+\t\t\ttd_outb.ipsec_xform.life.packets_hard_limit = TEST_SEC_PKTS_MAX - 1;\n \t\tif (flags->sa_expiry_bytes_hard)\n \t\t\ttd_outb.ipsec_xform.life.bytes_hard_limit =\n \t\t\t\t(((td_outb.output_text.len + RTE_ETHER_HDR_LEN)\n@@ -1345,7 +1344,7 @@ test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)\n \n \t\tif (ret == TEST_FAILED) {\n \t\t\tprintf(\"\\n TEST FAILED\");\n-\t\t\ttest_sec_alg_display(alg_list[i].param1, alg_list[i].param2);\n+\t\t\ttest_sec_alg_display(sec_alg_list[i].param1, sec_alg_list[i].param2);\n \t\t\tfail_cnt++;\n \t\t\tcontinue;\n \t\t}\n@@ -1359,13 +1358,13 @@ test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)\n \n \t\tif (ret == TEST_FAILED) {\n \t\t\tprintf(\"\\n TEST FAILED\");\n-\t\t\ttest_sec_alg_display(alg_list[i].param1, alg_list[i].param2);\n+\t\t\ttest_sec_alg_display(sec_alg_list[i].param1, sec_alg_list[i].param2);\n \t\t\tfail_cnt++;\n \t\t\tcontinue;\n \t\t}\n \n \t\tif (flags->display_alg)\n-\t\t\ttest_sec_alg_display(alg_list[i].param1, alg_list[i].param2);\n+\t\t\ttest_sec_alg_display(sec_alg_list[i].param1, sec_alg_list[i].param2);\n \n \t\tpass_cnt++;\n \t}\n@@ -1742,7 +1741,8 @@ inline_ipsec_testsuite_setup(void)\n \t\t\t\tret, port_id);\n \t\treturn ret;\n \t}\n-\ttest_ipsec_alg_list_populate();\n+\n+\ttest_sec_alg_list_populate();\n \n \t/* Change the plaintext size for tests without Known vectors */\n \tif (sg_mode) {\n@@ -2003,7 +2003,8 @@ event_inline_ipsec_testsuite_setup(void)\n \t}\n \n \tevent_mode_enabled = true;\n-\ttest_ipsec_alg_list_populate();\n+\n+\ttest_sec_alg_list_populate();\n \n \treturn 0;\n }\n@@ -2685,8 +2686,8 @@ test_ipsec_inline_pkt_replay(const void *test_data, const uint64_t esn[],\n \t\t      bool replayed_pkt[], uint32_t nb_pkts, bool esn_en,\n \t\t      uint64_t winsz)\n {\n-\tstruct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];\n-\tstruct ipsec_test_data td_inb[IPSEC_TEST_PACKETS_MAX];\n+\tstruct ipsec_test_data td_outb[TEST_SEC_PKTS_MAX];\n+\tstruct ipsec_test_data td_inb[TEST_SEC_PKTS_MAX];\n \tstruct ipsec_test_flags flags;\n \tuint32_t i, ret = 0;\n \ndiff --git a/app/test/test_security_proto.c b/app/test/test_security_proto.c\nindex d62302a8dd..d242c852af 100644\n--- a/app/test/test_security_proto.c\n+++ b/app/test/test_security_proto.c\n@@ -7,6 +7,52 @@\n \n #include \"test_security_proto.h\"\n \n+struct crypto_param_comb sec_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+struct crypto_param_comb sec_auth_only_alg_list[2 * (RTE_DIM(auth_list) - 1)];\n+\n+void\n+test_sec_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\tsec_alg_list[index].param1 = &aead_list[i];\n+\t\tsec_alg_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\tsec_alg_list[index].param1 = &cipher_list[i];\n+\t\t\tsec_alg_list[index].param2 = &auth_list[j];\n+\t\t\tindex++;\n+\t\t}\n+\t}\n+}\n+\n+void\n+test_sec_auth_only_alg_list_populate(void)\n+{\n+\tunsigned long i, index = 0;\n+\n+\tfor (i = 1; i < RTE_DIM(auth_list); i++) {\n+\t\tsec_auth_only_alg_list[index].param1 = &auth_list[i];\n+\t\tsec_auth_only_alg_list[index].param2 = NULL;\n+\t\tindex++;\n+\t}\n+\n+\tfor (i = 1; i < RTE_DIM(auth_list); i++) {\n+\t\t/* NULL cipher */\n+\t\tsec_auth_only_alg_list[index].param1 = &cipher_list[0];\n+\n+\t\tsec_auth_only_alg_list[index].param2 = &auth_list[i];\n+\t\tindex++;\n+\t}\n+}\n+\n int\n test_sec_crypto_caps_aead_verify(const struct rte_security_capability *sec_cap,\n \t\tstruct rte_crypto_sym_xform *aead)\ndiff --git a/app/test/test_security_proto.h b/app/test/test_security_proto.h\nindex d6a00018e3..6797e8b8c2 100644\n--- a/app/test/test_security_proto.h\n+++ b/app/test/test_security_proto.h\n@@ -8,6 +8,8 @@\n #include <rte_cryptodev.h>\n #include <rte_security.h>\n \n+#define TEST_SEC_PKTS_MAX 32\n+\n struct crypto_param {\n \tenum rte_crypto_sym_xform_type type;\n \tunion {\n@@ -138,6 +140,20 @@ static const struct crypto_param auth_list[] = {\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 crypto_param_comb sec_alg_list[RTE_DIM(aead_list) +\n+\t\t\t\t\t     (RTE_DIM(cipher_list) * RTE_DIM(auth_list))];\n+\n+extern struct crypto_param_comb sec_auth_only_alg_list[2 * (RTE_DIM(auth_list) - 1)];\n+\n+void test_sec_alg_list_populate(void);\n+\n+void test_sec_auth_only_alg_list_populate(void);\n+\n int test_sec_crypto_caps_aead_verify(const struct rte_security_capability *sec_cap,\n \t\tstruct rte_crypto_sym_xform *aead);\n \n",
    "prefixes": [
        "05/14"
    ]
}