get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 104883,
    "url": "http://patchwork.dpdk.org/api/patches/104883/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1638777528-553-8-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-8-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1638777528-553-8-git-send-email-anoobj@marvell.com",
    "date": "2021-12-06T07:58:42",
    "name": "[07/13] test/crypto: add transport mode cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "e7fdcc848897a57e61549bbb0a3e937f2008328f",
    "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-8-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/104883/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/104883/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 20326A034F;\n\tMon,  6 Dec 2021 09:00:07 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3CFB541180;\n\tMon,  6 Dec 2021 08:59:56 +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 A0D5340A4B\n for <dev@dpdk.org>; Mon,  6 Dec 2021 08:59:54 +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 1B5MOkND031530;\n Sun, 5 Dec 2021 23:59:53 -0800",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cs0qn2740-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 05 Dec 2021 23:59:53 -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:51 -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:51 -0800",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 85C4A3F704A;\n Sun,  5 Dec 2021 23:59:48 -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=5a0Rd4HUgERto0/kxlb4Ib8JNIXRuMzax2+l43fNfyE=;\n b=SeYgiQwcs8PknNReZkzgAHY4gDZyoORs4A20QnnyVT/g72IgnZ2CMUIsdy3Eg4K8paWk\n jE+cWv7WKLgeT5XHL9RBAfALbF7bnhMGFXJrkHTGYgTtOIqMyXrH4sel/poAKOLqlW7Z\n veMuXU+nFDDvtKJWw78m0K151moHS6HZEyuq64pZJ8CoxGdFo0Q+0GBh05vWUhwkkwJa\n fkLgNVVlbRZs/mklGixUrxRs6YwfsTd2jIRWMMK+n9I8A3bej1xGRBZ9gR9T0iHPV0Ac\n AZg1p26ISBoUx1b7Fs7YItyLWSSMoqMUlgX8ODsbTV32MNvYadV9xMdE4dJc8iiDYXBl vA==",
        "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": "Anoob Joseph <anoobj@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 07/13] test/crypto: add transport mode cases",
        "Date": "Mon, 6 Dec 2021 13:28:42 +0530",
        "Message-ID": "<1638777528-553-8-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": "25etLUVrBqBBmCJozfzQNc2scfsFnwVJ",
        "X-Proofpoint-ORIG-GUID": "25etLUVrBqBBmCJozfzQNc2scfsFnwVJ",
        "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": "Add transport mode tests with test cases for IPv4 packets.\n\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n app/test/test_cryptodev.c                | 39 ++++++++++++++----\n app/test/test_cryptodev_security_ipsec.c | 71 +++++++++++++++++++++-----------\n app/test/test_cryptodev_security_ipsec.h |  1 +\n 3 files changed, 79 insertions(+), 32 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 1315687..f8f2660 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9162,15 +9162,19 @@ test_ipsec_proto_process(const struct ipsec_test_data td[],\n \t\t\tdst += 1;\n \t}\n \n-\tif (td->ipsec_xform.tunnel.type ==\n-\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n-\t\tmemcpy(&ipsec_xform.tunnel.ipv4.src_ip, &src, sizeof(src));\n-\t\tmemcpy(&ipsec_xform.tunnel.ipv4.dst_ip, &dst, sizeof(dst));\n-\t} else {\n-\t\tmemcpy(&ipsec_xform.tunnel.ipv6.src_addr, &v6_src,\n-\t\t\tsizeof(v6_src));\n-\t\tmemcpy(&ipsec_xform.tunnel.ipv6.dst_addr, &v6_dst,\n-\t\t\tsizeof(v6_dst));\n+\tif (td->ipsec_xform.mode == RTE_SECURITY_IPSEC_SA_MODE_TUNNEL) {\n+\t\tif (td->ipsec_xform.tunnel.type ==\n+\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n+\t\t\tmemcpy(&ipsec_xform.tunnel.ipv4.src_ip, &src,\n+\t\t\t       sizeof(src));\n+\t\t\tmemcpy(&ipsec_xform.tunnel.ipv4.dst_ip, &dst,\n+\t\t\t       sizeof(dst));\n+\t\t} else {\n+\t\t\tmemcpy(&ipsec_xform.tunnel.ipv6.src_addr, &v6_src,\n+\t\t\t       sizeof(v6_src));\n+\t\t\tmemcpy(&ipsec_xform.tunnel.ipv6.dst_addr, &v6_dst,\n+\t\t\t       sizeof(v6_dst));\n+\t\t}\n \t}\n \n \tctx = rte_cryptodev_get_sec_ctx(dev_id);\n@@ -9636,6 +9640,19 @@ test_ipsec_proto_tunnel_v6_in_v4(const void *data __rte_unused)\n }\n \n static int\n+test_ipsec_proto_transport_v4(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags;\n+\n+\tmemset(&flags, 0, sizeof(flags));\n+\n+\tflags.ipv6 = false;\n+\tflags.transport = 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@@ -14635,6 +14652,10 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\n \t\t\t\"Tunnel IPv6 in IPv4\",\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_tunnel_v6_in_v4),\n+\t\tTEST_CASE_NAMED_ST(\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_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 ccce63f..029fdd3 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -400,12 +400,21 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \t\t\ttest_ipsec_csum_init(&td->input_text.data, false, true);\n \t\t}\n \n-\t\tif (flags->tunnel_ipv6)\n-\t\t\ttd->ipsec_xform.tunnel.type =\n-\t\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV6;\n-\t\telse\n-\t\t\ttd->ipsec_xform.tunnel.type =\n-\t\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4;\n+\t\tif (flags->transport) {\n+\t\t\ttd->ipsec_xform.mode =\n+\t\t\t\t\tRTE_SECURITY_IPSEC_SA_MODE_TRANSPORT;\n+\t\t} else {\n+\t\t\ttd->ipsec_xform.mode =\n+\t\t\t\t\tRTE_SECURITY_IPSEC_SA_MODE_TUNNEL;\n+\n+\t\t\tif (flags->tunnel_ipv6)\n+\t\t\t\ttd->ipsec_xform.tunnel.type =\n+\t\t\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV6;\n+\t\t\telse\n+\t\t\t\ttd->ipsec_xform.tunnel.type =\n+\t\t\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4;\n+\t\t}\n+\n \n \t}\n }\n@@ -748,29 +757,45 @@ test_ipsec_post_process(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \tuint8_t *output_text = rte_pktmbuf_mtod(m, uint8_t *);\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 \tif (td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_EGRESS) {\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 (is_valid_ipv4_pkt(iph4) == false) {\n-\t\t\t\tprintf(\"Outer header is not IPv4\\n\");\n-\t\t\t\treturn TEST_FAILED;\n+\t\tif (flags->iv_gen) {\n+\t\t\tret = test_ipsec_iv_verify_push(m, td);\n+\t\t\tif (ret != TEST_SUCCESS)\n+\t\t\t\treturn ret;\n+\t\t}\n+\n+\t\tiph4 = (const struct rte_ipv4_hdr *)output_text;\n+\n+\t\tif (td->ipsec_xform.mode ==\n+\t\t\t\tRTE_SECURITY_IPSEC_SA_MODE_TRANSPORT) {\n+\t\t\tif (flags->ipv6) {\n+\t\t\t\tiph6 = (const struct rte_ipv6_hdr *)output_text;\n+\t\t\t\tif (is_valid_ipv6_pkt(iph6) == false) {\n+\t\t\t\t\tprintf(\"Transport packet is not IPv6\\n\");\n+\t\t\t\t\treturn TEST_FAILED;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tif (is_valid_ipv4_pkt(iph4) == false) {\n+\t\t\t\t\tprintf(\"Transport packet is not IPv4\\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-\t\t\tif (is_valid_ipv6_pkt(iph6) == false) {\n-\t\t\t\tprintf(\"Outer header is not IPv6\\n\");\n-\t\t\t\treturn TEST_FAILED;\n+\t\t\tif (td->ipsec_xform.tunnel.type ==\n+\t\t\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4) {\n+\t\t\t\tif (is_valid_ipv4_pkt(iph4) == false) {\n+\t\t\t\t\tprintf(\"Tunnel outer header is not IPv4\\n\");\n+\t\t\t\t\treturn TEST_FAILED;\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tiph6 = (const struct rte_ipv6_hdr *)output_text;\n+\t\t\t\tif (is_valid_ipv6_pkt(iph6) == false) {\n+\t\t\t\t\tprintf(\"Tunnel outer header is not IPv6\\n\");\n+\t\t\t\t\treturn TEST_FAILED;\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 884a795..07d2453 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -63,6 +63,7 @@ struct ipsec_test_flags {\n \tbool l4_csum;\n \tbool ipv6;\n \tbool tunnel_ipv6;\n+\tbool transport;\n \tbool fragment;\n };\n \n",
    "prefixes": [
        "07/13"
    ]
}