get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118895,
    "url": "http://patchwork.dpdk.org/api/patches/118895/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221021072651.1985340-7-ktejasree@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": "<20221021072651.1985340-7-ktejasree@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221021072651.1985340-7-ktejasree@marvell.com",
    "date": "2022-10-21T07:26:51",
    "name": "[v2,6/6] test/crypto: add unit test for custom UDP ports",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "df3f0ee901cf0c4e15f3afeee9ef61ac63fed187",
    "submitter": {
        "id": 1789,
        "url": "http://patchwork.dpdk.org/api/people/1789/?format=api",
        "name": "Tejasree Kondoj",
        "email": "ktejasree@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/20221021072651.1985340-7-ktejasree@marvell.com/mbox/",
    "series": [
        {
            "id": 25362,
            "url": "http://patchwork.dpdk.org/api/series/25362/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25362",
            "date": "2022-10-21T07:26:45",
            "name": "update autotest with new algorithms",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/25362/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/118895/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/118895/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 24424A0032;\n\tFri, 21 Oct 2022 09:27:57 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6572B42BC3;\n\tFri, 21 Oct 2022 09:27:32 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 056D942B95\n for <dev@dpdk.org>; Fri, 21 Oct 2022 09:27:27 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id\n 29L2BDS5009575;\n Fri, 21 Oct 2022 00:27:27 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3kb125d6gw-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Fri, 21 Oct 2022 00:27:27 -0700",
            "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 Fri, 21 Oct 2022 00:27: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.2 via Frontend\n Transport; Fri, 21 Oct 2022 00:27:25 -0700",
            "from hyd1554.marvell.com (unknown [10.29.57.11])\n by maili.marvell.com (Postfix) with ESMTP id 57B495B69BB;\n Fri, 21 Oct 2022 00:27:10 -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=Bi4smQ8zaxo+pacCeFbvmmFvDJb0pniNjrD0o9F757o=;\n b=fz+2lSpjDRvSwI0iSpapJlpDJMlEVtnXqbs4e7rfHfY2F9bIlfmKn+Hd9vAQ3CLRlen8\n aug1ZV9Khz3wwCaOJulFIVznpZP6utWOrPYa/4wcpJi/MUbeiUDMTK183bSfh+1eWDr5\n Md+j3fafbei7BpjFR5s+Z0fENuXcRz8nfRlNERBVcYnztHrqOl1sMBJ+FXZSv1Yy38sZ\n DQ9LNtnQLs5b4gm5DCo8VVfV0yKI6RKk4RKurSFXqu1EBvX70ZGJiJKmYzXeBqpXOy4x\n 3Fe4GgWcnNWB8H/0xh8yMApMkH+Rju+lSC4GRbldFNG4XJMPXK8D+ntUDg3AkJYWvnEq TQ==",
        "From": "Tejasree Kondoj <ktejasree@marvell.com>",
        "To": "Akhil Goyal <gakhil@marvell.com>, Fan Zhang <royzhang1980@gmail.com>,\n Ciara Power <ciara.power@intel.com>",
        "CC": "Vidya Sagar Velumuri <vvelumuri@marvell.com>, Anoob Joseph\n <anoobj@marvell.com>, <dev@dpdk.org>",
        "Subject": "[PATCH v2 6/6] test/crypto: add unit test for custom UDP ports",
        "Date": "Fri, 21 Oct 2022 12:56:51 +0530",
        "Message-ID": "<20221021072651.1985340-7-ktejasree@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221021072651.1985340-1-ktejasree@marvell.com>",
        "References": "<20221021072651.1985340-1-ktejasree@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "UJiH_8qfAA5WfcDkE8v9phVMp-gkHRA7",
        "X-Proofpoint-ORIG-GUID": "UJiH_8qfAA5WfcDkE8v9phVMp-gkHRA7",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1\n definitions=2022-10-21_03,2022-10-20_01,2022-06-22_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: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n\nAdd unit test for custom UDP ports with UDP encapsulation.\nVerify UDP header in egress path for all unit tests.\n\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\nSigned-off-by: Vidya Sagar Velumuri <vvelumuri@marvell.com>\n---\n app/test/test_cryptodev.c                | 21 +++++++\n app/test/test_cryptodev_security_ipsec.c | 71 ++++++++++++++++++------\n app/test/test_cryptodev_security_ipsec.h |  1 +\n 3 files changed, 76 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 96941dd55c..43fcef7e73 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9892,6 +9892,23 @@ test_ipsec_proto_err_icv_corrupt(const void *data __rte_unused)\n \treturn test_ipsec_proto_all(&flags);\n }\n \n+static int\n+test_ipsec_proto_udp_encap_custom_ports(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags;\n+\n+\tif (gbl_driver_id == rte_cryptodev_driver_id_get(\n+\t\t\tRTE_STR(CRYPTODEV_NAME_CN10K_PMD)))\n+\t\treturn TEST_SKIPPED;\n+\n+\tmemset(&flags, 0, sizeof(flags));\n+\n+\tflags.udp_encap = true;\n+\tflags.udp_encap_custom_ports = true;\n+\n+\treturn test_ipsec_proto_all(&flags);\n+}\n+\n static int\n test_ipsec_proto_udp_encap(const void *data __rte_unused)\n {\n@@ -15358,6 +15375,10 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\n \t\t\t\"UDP encapsulation\",\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_udp_encap),\n+\t\tTEST_CASE_NAMED_ST(\n+\t\t\t\"UDP encapsulation with custom ports\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_udp_encap_custom_ports),\n \t\tTEST_CASE_NAMED_ST(\n \t\t\t\"UDP encapsulation ports verification test\",\n \t\t\tut_setup_security, ut_teardown,\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex 3219b41e39..d64e07f226 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -14,6 +14,8 @@\n #include \"test_cryptodev_security_ipsec.h\"\n \n #define IV_LEN_MAX 16\n+#define UDP_CUSTOM_SPORT 4650\n+#define UDP_CUSTOM_DPORT 4660\n \n #ifndef IPVERSION\n #define IPVERSION 4\n@@ -508,6 +510,11 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \n \t\tif (flags->dec_ttl_or_hop_limit)\n \t\t\ttd->ipsec_xform.options.dec_ttl = 1;\n+\n+\t\tif (flags->udp_encap && flags->udp_encap_custom_ports) {\n+\t\t\ttd->ipsec_xform.udp.sport = UDP_CUSTOM_SPORT;\n+\t\t\ttd->ipsec_xform.udp.dport = UDP_CUSTOM_DPORT;\n+\t\t}\n \t}\n }\n \n@@ -765,23 +772,6 @@ test_ipsec_td_verify(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \n \tif (td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS &&\n \t   flags->udp_encap) {\n-\t\tconst struct rte_ipv4_hdr *iph4;\n-\t\tconst struct rte_ipv6_hdr *iph6;\n-\n-\t\tif (td->ipsec_xform.tunnel.type ==\n-\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n-\t\t\tiph4 = (const struct rte_ipv4_hdr *)output_text;\n-\t\t\tif (iph4->next_proto_id != IPPROTO_UDP) {\n-\t\t\t\tprintf(\"UDP header is not found\\n\");\n-\t\t\t\treturn TEST_FAILED;\n-\t\t\t}\n-\t\t} else {\n-\t\t\tiph6 = (const struct rte_ipv6_hdr *)output_text;\n-\t\t\tif (iph6->proto != IPPROTO_UDP) {\n-\t\t\t\tprintf(\"UDP header is not found\\n\");\n-\t\t\t\treturn TEST_FAILED;\n-\t\t\t}\n-\t\t}\n \n \t\tlen -= sizeof(struct rte_udp_hdr);\n \t\toutput_text += sizeof(struct rte_udp_hdr);\n@@ -1043,6 +1033,53 @@ test_ipsec_post_process(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \t\t}\n \t}\n \n+\tif (td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS &&\n+\t   flags->udp_encap) {\n+\t\tconst struct rte_ipv4_hdr *iph4;\n+\t\tconst struct rte_ipv6_hdr *iph6;\n+\n+\t\tif (td->ipsec_xform.tunnel.type ==\n+\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n+\t\t\tiph4 = (const struct rte_ipv4_hdr *)output_text;\n+\n+\t\t\tif (iph4->next_proto_id != IPPROTO_UDP) {\n+\t\t\t\tprintf(\"UDP header is not found\\n\");\n+\t\t\t\treturn TEST_FAILED;\n+\t\t\t}\n+\n+\t\t\tif (flags->udp_encap_custom_ports) {\n+\t\t\t\tconst struct rte_udp_hdr *udph;\n+\n+\t\t\t\tudph = (const struct rte_udp_hdr *)(output_text +\n+\t\t\t\t\tsizeof(struct rte_ipv4_hdr));\n+\t\t\t\tif ((rte_be_to_cpu_16(udph->src_port) != UDP_CUSTOM_SPORT) ||\n+\t\t\t\t    (rte_be_to_cpu_16(udph->dst_port) != UDP_CUSTOM_DPORT)) {\n+\t\t\t\t\tprintf(\"UDP custom ports not matching.\\n\");\n+\t\t\t\t\treturn TEST_FAILED;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t} else {\n+\t\t\tiph6 = (const struct rte_ipv6_hdr *)output_text;\n+\n+\t\t\tif (iph6->proto != IPPROTO_UDP) {\n+\t\t\t\tprintf(\"UDP header is not found\\n\");\n+\t\t\t\treturn TEST_FAILED;\n+\t\t\t}\n+\n+\t\t\tif (flags->udp_encap_custom_ports) {\n+\t\t\t\tconst struct rte_udp_hdr *udph;\n+\n+\t\t\t\tudph = (const struct rte_udp_hdr *)(output_text +\n+\t\t\t\t\tsizeof(struct rte_ipv6_hdr));\n+\t\t\t\tif ((rte_be_to_cpu_16(udph->src_port) != UDP_CUSTOM_SPORT) ||\n+\t\t\t\t    (rte_be_to_cpu_16(udph->dst_port) != UDP_CUSTOM_DPORT)) {\n+\t\t\t\t\tprintf(\"UDP custom ports not matching.\\n\");\n+\t\t\t\t\treturn TEST_FAILED;\n+\t\t\t\t}\n+\t\t\t}\n+\t\t}\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 b98f4741b2..008b17c290 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -93,6 +93,7 @@ struct ipsec_test_flags {\n \tuint32_t tunnel_hdr_verify;\n \tbool udp_encap;\n \tbool udp_ports_verify;\n+\tbool udp_encap_custom_ports;\n \tbool ip_csum;\n \tbool l4_csum;\n \tbool ipv6;\n",
    "prefixes": [
        "v2",
        "6/6"
    ]
}