get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 105581,
    "url": "http://patchwork.dpdk.org/api/patches/105581/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220103150813.1694888-7-gakhil@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": "<20220103150813.1694888-7-gakhil@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220103150813.1694888-7-gakhil@marvell.com",
    "date": "2022-01-03T15:08:11",
    "name": "[6/8] app/test: add IP reassembly case with no frags",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "93d84ea8ee1a95ad65087ec9bac9087a3032055d",
    "submitter": {
        "id": 2094,
        "url": "http://patchwork.dpdk.org/api/people/2094/?format=api",
        "name": "Akhil Goyal",
        "email": "gakhil@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220103150813.1694888-7-gakhil@marvell.com/mbox/",
    "series": [
        {
            "id": 21052,
            "url": "http://patchwork.dpdk.org/api/series/21052/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21052",
            "date": "2022-01-03T15:08:05",
            "name": "ethdev: introduce IP reassembly offload",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/21052/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/105581/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/105581/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 CA091A04A3;\n\tMon,  3 Jan 2022 16:09:15 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 8425341157;\n\tMon,  3 Jan 2022 16:09:00 +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 A46D241163\n for <dev@dpdk.org>; Mon,  3 Jan 2022 16:08:58 +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 203EHCRc016199;\n Mon, 3 Jan 2022 07:08:57 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3dbmvswf9v-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 03 Jan 2022 07:08:56 -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.18;\n Mon, 3 Jan 2022 07:08:55 -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.18 via Frontend\n Transport; Mon, 3 Jan 2022 07:08:55 -0800",
            "from localhost.localdomain (unknown [10.28.48.55])\n by maili.marvell.com (Postfix) with ESMTP id A6A333F7095;\n Mon,  3 Jan 2022 07:08:51 -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=5H+QgDl6fSeP8VOwPTWuGfducSDVELPSdF0yL0oAw20=;\n b=SYWuwMet1c1J3/t9XLaG77upXI9K7kCu/CmzMUTMyAxcRdmoZB9nC4Icqw4rwXXydx6h\n O1zDdTXI6iPUMNaIuDmD1Rt7g7k93RSRQ96QZDESzBPiH/QwShJeFTjDXRzNVlTw44qD\n oOYr2OUUGoD42oFY+rMGl/U7rBNdUCbAqy69MzA4yn+caRienuwd/nxnFjtKY1MTar6G\n MlvV97L18yToJJfrpkjdJa/wRikhLa3invCRhFL0QFV4cAi0iDC9VH+UsPynTC6h6Yjn\n O31Qp+VMPW3FAJNUPnDrcNAOrH0bMEmz+RfX5tbi44D1fYSygPN3BsRFNB//tX6mRXbV 6Q==",
        "From": "Akhil Goyal <gakhil@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<anoobj@marvell.com>, <radu.nicolau@intel.com>,\n <declan.doherty@intel.com>,\n <hemant.agrawal@nxp.com>, <matan@nvidia.com>,\n <konstantin.ananyev@intel.com>, <thomas@monjalon.net>,\n <ferruh.yigit@intel.com>, <andrew.rybchenko@oktetlabs.ru>,\n <olivier.matz@6wind.com>, <rosen.xu@intel.com>, Akhil Goyal\n <gakhil@marvell.com>",
        "Subject": "[PATCH 6/8] app/test: add IP reassembly case with no frags",
        "Date": "Mon, 3 Jan 2022 20:38:11 +0530",
        "Message-ID": "<20220103150813.1694888-7-gakhil@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220103150813.1694888-1-gakhil@marvell.com>",
        "References": "<20210823100259.1619886-1-gakhil@marvell.com>\n <20220103150813.1694888-1-gakhil@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "uXlSU5zjxSSocHUgw4a4tAvlG4onli6h",
        "X-Proofpoint-GUID": "uXlSU5zjxSSocHUgw4a4tAvlG4onli6h",
        "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=2022-01-03_06,2022-01-01_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": "test_inline_ipsec testsuite is extended to test IP reassembly of inbound\nfragmented packets. The fragmented packet is sent on an interface\nwhich encrypts the packet and then it is loopbacked on the\nsame interface which decrypts the packet and then attempts IP reassembly\nof the decrypted packets.\nIn this patch, a case is added for packets without fragmentation to\nverify the complete path. Other cases are added in subsequent patches.\n\nSigned-off-by: Akhil Goyal <gakhil@marvell.com>\n---\n app/test/test_inline_ipsec.c | 154 +++++++++++++++++++++++++++++++++++\n 1 file changed, 154 insertions(+)",
    "diff": "diff --git a/app/test/test_inline_ipsec.c b/app/test/test_inline_ipsec.c\nindex 54b56ba9e8..f704725c0f 100644\n--- a/app/test/test_inline_ipsec.c\n+++ b/app/test/test_inline_ipsec.c\n@@ -460,6 +460,145 @@ create_default_flow(uint16_t port_id)\n \n struct rte_mbuf **tx_pkts_burst;\n \n+static int\n+compare_pkt_data(struct rte_mbuf *m, uint8_t *ref, unsigned int tot_len)\n+{\n+\tunsigned int len;\n+\tunsigned int nb_segs = m->nb_segs;\n+\tunsigned int matched = 0;\n+\n+\twhile (m && nb_segs != 0) {\n+\t\tlen = tot_len;\n+\t\tif (len > m->data_len)\n+\t\t\tlen = m->data_len;\n+\t\tif (len != 0) {\n+\t\t\tif (memcmp(rte_pktmbuf_mtod(m, char *),\n+\t\t\t\t\tref + matched, len)) {\n+\t\t\t\tprintf(\"\\n====Reassembly case failed: Data Mismatch\");\n+\t\t\t\trte_hexdump(stdout, \"Reassembled\",\n+\t\t\t\t\trte_pktmbuf_mtod(m, char *),\n+\t\t\t\t\tlen);\n+\t\t\t\trte_hexdump(stdout, \"reference\",\n+\t\t\t\t\tref + matched,\n+\t\t\t\t\tlen);\n+\t\t\t\treturn TEST_FAILED;\n+\t\t\t}\n+\t\t}\n+\t\ttot_len -= len;\n+\t\tmatched += len;\n+\t\tm = m->next;\n+\t\tnb_segs--;\n+\t}\n+\treturn TEST_SUCCESS;\n+}\n+\n+static int\n+test_reassembly(struct reassembly_vector *vector,\n+\t\tenum rte_security_ipsec_tunnel_type tun_type)\n+{\n+\tstruct rte_mbuf *pkts_burst[MAX_PKT_BURST];\n+\tunsigned i, portid, nb_rx = 0, nb_tx = 0;\n+\tstruct rte_ipsec_session out_ips = {0};\n+\tstruct rte_ipsec_session in_ips = {0};\n+\tstruct rte_eth_dev_info dev_info = {0};\n+\tint ret = 0;\n+\n+\t/* Initialize mbuf with test vectors. */\n+\tnb_tx = reass_test_vectors_init(vector);\n+\n+\tportid = lcore_cfg.port;\n+\trte_eth_dev_info_get(portid, &dev_info);\n+\tif (dev_info.reass_capa.max_frags < nb_tx)\n+\t\treturn TEST_SKIPPED;\n+\n+\t/**\n+\t * Set some finite value in timeout incase PMD support much\n+\t * more than requied in this app.\n+\t */\n+\tif (dev_info.reass_capa.reass_timeout > APP_REASS_TIMEOUT) {\n+\t\tdev_info.reass_capa.reass_timeout = APP_REASS_TIMEOUT;\n+\t\trte_eth_ip_reassembly_conf_set(portid, &dev_info.reass_capa);\n+\t}\n+\n+\tinit_traffic(mbufpool[lcore_cfg.socketid],\n+\t\t\ttx_pkts_burst, vector->frags, nb_tx);\n+\n+\t/* Create Inline IPsec outbound session. */\n+\tret = create_inline_ipsec_session(vector->sa_data, portid, &out_ips,\n+\t\t\tRTE_SECURITY_IPSEC_SA_DIR_EGRESS, tun_type);\n+\tif (ret)\n+\t\treturn ret;\n+\tfor (i = 0; i < nb_tx; i++) {\n+\t\tif (out_ips.security.ol_flags &\n+\t\t\t\tRTE_SECURITY_TX_OLOAD_NEED_MDATA)\n+\t\t\trte_security_set_pkt_metadata(out_ips.security.ctx,\n+\t\t\t\tout_ips.security.ses, tx_pkts_burst[i], NULL);\n+\t\ttx_pkts_burst[i]->ol_flags |= RTE_MBUF_F_TX_SEC_OFFLOAD;\n+\t\ttx_pkts_burst[i]->l2_len = RTE_ETHER_HDR_LEN;\n+\t}\n+\t/* Create Inline IPsec inbound session. */\n+\tcreate_inline_ipsec_session(vector->sa_data, portid, &in_ips,\n+\t\t\tRTE_SECURITY_IPSEC_SA_DIR_INGRESS, tun_type);\n+\tcreate_default_flow(portid);\n+\n+\tnb_tx = rte_eth_tx_burst(portid, 0, tx_pkts_burst, nb_tx);\n+\n+\trte_pause();\n+\n+\tdo {\n+\t\tnb_rx = rte_eth_rx_burst(portid, 0, pkts_burst, MAX_PKT_BURST);\n+\t\tfor (i = 0; i < nb_rx; i++) {\n+\t\t\tif ((pkts_burst[i]->ol_flags &\n+\t\t\t    RTE_MBUF_F_RX_IPREASSEMBLY_INCOMPLETE) &&\n+\t\t\t    rte_eth_ip_reass_dynfield_is_registered()) {\n+\t\t\t\trte_eth_ip_reass_dynfield_t *dynfield[MAX_PKT_BURST];\n+\t\t\t\tint j = 0;\n+\n+\t\t\t\tdynfield[j] = rte_eth_ip_reass_dynfield(pkts_burst[i]);\n+\t\t\t\twhile ((dynfield[j]->next_frag->ol_flags &\n+\t\t\t\t    RTE_MBUF_F_RX_IPREASSEMBLY_INCOMPLETE) &&\n+\t\t\t\t    dynfield[j]->nb_frags > 0) {\n+\n+\t\t\t\t\trte_pktmbuf_dump(stdout,\n+\t\t\t\t\t\tdynfield[j]->next_frag,\n+\t\t\t\t\t\tdynfield[j]->next_frag->data_len);\n+\t\t\t\t\tj++;\n+\t\t\t\t\tdynfield[j] = rte_eth_ip_reass_dynfield(\n+\t\t\t\t\t\tdynfield[j-1]->next_frag);\n+\t\t\t\t}\n+\t\t\t\t/**\n+\t\t\t\t * IP reassembly offload is incomplete, and\n+\t\t\t\t * fragments are listed in dynfield which\n+\t\t\t\t * can be reassembled in SW.\n+\t\t\t\t */\n+\t\t\t\tprintf(\"\\nHW IP Reassembly failed,\"\n+\t\t\t\t\t\"\\nAttempt SW IP Reassembly,\"\n+\t\t\t\t\t\"\\nmbuf is chained with fragments.\\n\");\n+\t\t\t}\n+\t\t}\n+\t} while (nb_rx == 0);\n+\n+\t/* Clear session data. */\n+\trte_security_session_destroy(out_ips.security.ctx,\n+\t\t\t\t     out_ips.security.ses);\n+\trte_security_session_destroy(in_ips.security.ctx,\n+\t\t\t\t     in_ips.security.ses);\n+\n+\t/* Compare results with known vectors. */\n+\tif (nb_rx == 1) {\n+\t\tif (vector->full_pkt->len == pkts_burst[0]->pkt_len)\n+\t\t\treturn compare_pkt_data(pkts_burst[0],\n+\t\t\t\t\tvector->full_pkt->data,\n+\t\t\t\t\tvector->full_pkt->len);\n+\t\telse {\n+\t\t\trte_pktmbuf_dump(stdout, pkts_burst[0],\n+\t\t\t\t\tpkts_burst[0]->pkt_len);\n+\t\t}\n+\t}\n+\n+\treturn TEST_FAILED;\n+}\n+\n static int\n test_ipsec(struct reassembly_vector *vector,\n \t   enum rte_security_ipsec_sa_direction dir,\n@@ -703,6 +842,18 @@ test_ipsec_ipv4_decap_nofrag(void) {\n \t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4);\n }\n \n+static int\n+test_reassembly_ipv4_nofrag(void) {\n+\tstruct reassembly_vector ipv4_nofrag_case = {\n+\t\t\t\t.sa_data = &conf_aes_128_gcm,\n+\t\t\t\t.full_pkt = &pkt_ipv4_plain,\n+\t\t\t\t.frags[0] = &pkt_ipv4_plain,\n+\t};\n+\treturn test_reassembly(&ipv4_nofrag_case,\n+\t\t\tRTE_SECURITY_IPSEC_TUNNEL_IPV4);\n+}\n+\n+\n static struct unit_test_suite inline_ipsec_testsuite  = {\n \t.suite_name = \"Inline IPsec Ethernet Device Unit Test Suite\",\n \t.setup = testsuite_setup,\n@@ -714,6 +865,9 @@ static struct unit_test_suite inline_ipsec_testsuite  = {\n \t\tTEST_CASE_ST(ut_setup_inline_ipsec,\n \t\t\t\tut_teardown_inline_ipsec,\n \t\t\t\ttest_ipsec_ipv4_decap_nofrag),\n+\t\tTEST_CASE_ST(ut_setup_inline_ipsec,\n+\t\t\t\tut_teardown_inline_ipsec,\n+\t\t\t\ttest_reassembly_ipv4_nofrag),\n \n \t\tTEST_CASES_END() /**< NULL terminate unit test array */\n \t}\n",
    "prefixes": [
        "6/8"
    ]
}