get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99658,
    "url": "https://patches.dpdk.org/api/patches/99658/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1632584132-289-5-git-send-email-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": "<1632584132-289-5-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1632584132-289-5-git-send-email-anoobj@marvell.com",
    "date": "2021-09-25T15:35:31",
    "name": "[v5,4/5] test/crypto: add IV gen cases for IPsec",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "af289b38a5421c520871c21116318cd59da7547a",
    "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/1632584132-289-5-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 19157,
            "url": "https://patches.dpdk.org/api/series/19157/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19157",
            "date": "2021-09-25T15:35:27",
            "name": "Add lookaside IPsec tests",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/19157/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/99658/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/99658/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 2ECA7A0C45;\n\tSat, 25 Sep 2021 17:36:36 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B4016410ED;\n\tSat, 25 Sep 2021 17:36:28 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n [67.231.148.174])\n by mails.dpdk.org (Postfix) with ESMTP id 8F5DF410ED\n for <dev@dpdk.org>; Sat, 25 Sep 2021 17:36:27 +0200 (CEST)",
            "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 SMTP id\n 18PDQ9FX003440;\n Sat, 25 Sep 2021 08:36:26 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 3ba14prp5r-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 25 Sep 2021 08:36:26 -0700",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Sat, 25 Sep 2021 08:36:25 -0700",
            "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.18 via Frontend\n Transport; Sat, 25 Sep 2021 08:36:25 -0700",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 58B503F7086;\n Sat, 25 Sep 2021 08:36:21 -0700 (PDT)"
        ],
        "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=yAF2YMCLrx2HcX+VfVf7sltZPUeTAX96xmvEs3Qz7/0=;\n b=BGVwTZejO8D1rfgtmWhnO5F+TZnafccUu7qBlSKwHsRVdCvnuULdRk14F+cGLmr1jyx1\n WaAghAmt2cJ3cnsjHJc4kCnSdoLUgl4XltIStgOObHBEhISuYSUl1iC02uQPzl7rGkT/\n 9z7Xqr0P5oDSIRLS5GJARQWRpDI1rotVgVtc7R15QSMGHkorhJJuBF0Xz1pc2X3QAsLg\n Hm4NzuTuK58UBa9LhN5Otbf679Px3CCvynTbuq7cIJJqvgIj/2ZVhLYhSPmmGy8nYoqs\n thLC0K0JVp60PVyHFdqNM3T+C7tn0h4sffb8G55e+jb0CjVn/ZTFux8ihCpjHx33LtK/ jQ==",
        "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>,\n \"Konstantin Ananyev\" <konstantin.ananyev@intel.com>",
        "CC": "Tejasree Kondoj <ktejasree@marvell.com>, Jerin Jacob <jerinj@marvell.com>,\n Archana Muniganti <marchana@marvell.com>, Hemant Agrawal\n <hemant.agrawal@nxp.com>, Radu Nicolau <radu.nicolau@intel.com>,\n Ciara Power <ciara.power@intel.com>,\n Gagandeep Singh <g.singh@nxp.com>, <dev@dpdk.org>,\n Anoob Joseph <anoobj@marvell.com>",
        "Date": "Sat, 25 Sep 2021 21:05:31 +0530",
        "Message-ID": "<1632584132-289-5-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1632584132-289-1-git-send-email-anoobj@marvell.com>",
        "References": "<1631884523-836-1-git-send-email-anoobj@marvell.com>\n <1632584132-289-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "mxRpvSveXx6MtzBohmnsC5V8L3hc6TrB",
        "X-Proofpoint-ORIG-GUID": "mxRpvSveXx6MtzBohmnsC5V8L3hc6TrB",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-09-25_05,2021-09-24_02,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v5 4/5] test/crypto: add IV gen cases for IPsec",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Tejasree Kondoj <ktejasree@marvell.com>\n\nAdded cases to verify IV generated by PMD for lookaside IPsec.\n\nThe tests compare IV generated for a batch of packets and ensures that\nIV is not getting repeated in the batch.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\nAcked-by: Akhil Goyal <gakhil@marvell.com>\nAcked-by: Ciara Power <ciara.power@intel.com>\n\n---\n app/test/test_cryptodev.c                | 19 ++++++++++++\n app/test/test_cryptodev_security_ipsec.c | 52 ++++++++++++++++++++++++++++++++\n app/test/test_cryptodev_security_ipsec.h |  1 +\n doc/guides/rel_notes/release_21_11.rst   |  1 +\n 4 files changed, 73 insertions(+)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex bfaca1d..956541e 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9080,6 +9080,9 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \tunsigned int i, nb_pkts = 1, pass_cnt = 0;\n \tint ret;\n \n+\tif (flags->iv_gen)\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@@ -9130,6 +9133,18 @@ test_ipsec_proto_display_list(const void *data __rte_unused)\n }\n \n static int\n+test_ipsec_proto_iv_gen(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags;\n+\n+\tmemset(&flags, 0, sizeof(flags));\n+\n+\tflags.iv_gen = true;\n+\n+\treturn test_ipsec_proto_all(&flags);\n+}\n+\n+static int\n test_ipsec_proto_err_icv_corrupt(const void *data __rte_unused)\n {\n \tstruct ipsec_test_flags flags;\n@@ -14054,6 +14069,10 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_display_list),\n \t\tTEST_CASE_NAMED_ST(\n+\t\t\t\"IV generation\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_iv_gen),\n+\t\tTEST_CASE_NAMED_ST(\n \t\t\t\"Negative test: ICV corruption\",\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_err_icv_corrupt),\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex aebbe66..78c7f3a 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -4,12 +4,15 @@\n \n #include <rte_common.h>\n #include <rte_cryptodev.h>\n+#include <rte_esp.h>\n #include <rte_ip.h>\n #include <rte_security.h>\n \n #include \"test.h\"\n #include \"test_cryptodev_security_ipsec.h\"\n \n+#define IV_LEN_MAX 16\n+\n extern struct ipsec_test_data pkt_aes_256_gcm;\n \n int\n@@ -214,6 +217,46 @@ test_ipsec_tunnel_hdr_len_get(const struct ipsec_test_data *td)\n }\n \n static int\n+test_ipsec_iv_verify_push(struct rte_mbuf *m, const struct ipsec_test_data *td)\n+{\n+\tstatic uint8_t iv_queue[IV_LEN_MAX * IPSEC_TEST_PACKETS_MAX];\n+\tuint8_t *iv_tmp, *output_text = rte_pktmbuf_mtod(m, uint8_t *);\n+\tint i, iv_pos, iv_len;\n+\tstatic int index;\n+\n+\tif (td->aead)\n+\t\tiv_len = td->xform.aead.aead.iv.length - td->salt.len;\n+\telse\n+\t\tiv_len = td->xform.chain.cipher.cipher.iv.length;\n+\n+\tiv_pos = test_ipsec_tunnel_hdr_len_get(td) + sizeof(struct rte_esp_hdr);\n+\toutput_text += iv_pos;\n+\n+\tTEST_ASSERT(iv_len <= IV_LEN_MAX, \"IV length greater than supported\");\n+\n+\t/* Compare against previous values */\n+\tfor (i = 0; i < index; i++) {\n+\t\tiv_tmp = &iv_queue[i * IV_LEN_MAX];\n+\n+\t\tif (memcmp(output_text, iv_tmp, iv_len) == 0) {\n+\t\t\tprintf(\"IV repeated\");\n+\t\t\treturn TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\t/* Save IV for future comparisons */\n+\n+\tiv_tmp = &iv_queue[index * IV_LEN_MAX];\n+\tmemcpy(iv_tmp, output_text, iv_len);\n+\tindex++;\n+\n+\tif (index == IPSEC_TEST_PACKETS_MAX)\n+\t\tindex = 0;\n+\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n test_ipsec_td_verify(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \t\t     bool silent, const struct ipsec_test_flags *flags)\n {\n@@ -279,6 +322,15 @@ test_ipsec_post_process(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \t\t\tstruct ipsec_test_data *res_d, bool silent,\n \t\t\tconst struct ipsec_test_flags *flags)\n {\n+\tint ret;\n+\n+\tif (flags->iv_gen &&\n+\t    td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {\n+\t\tret = test_ipsec_iv_verify_push(m, td);\n+\t\tif (ret != TEST_SUCCESS)\n+\t\t\treturn ret;\n+\t}\n+\n \t/*\n \t * In case of known vector tests & all inbound tests, res_d provided\n \t * would be NULL and output data need to be validated against expected.\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 134fc3a..d2ec63f 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -50,6 +50,7 @@ struct ipsec_test_data {\n struct ipsec_test_flags {\n \tbool display_alg;\n \tbool icv_corrupt;\n+\tbool iv_gen;\n };\n \n struct crypto_param {\ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex 8fc5844..cda0a92 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -91,6 +91,7 @@ New Features\n \n   * Added known vector tests (AES-GCM 128, 192, 256).\n   * Added tests to verify error reporting with ICV corruption.\n+  * Added tests to verify IV generation.\n \n \n Removed Items\n",
    "prefixes": [
        "v5",
        "4/5"
    ]
}