get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116821,
    "url": "http://patchwork.dpdk.org/api/patches/116821/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220924135758.3402392-4-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": "<20220924135758.3402392-4-gakhil@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220924135758.3402392-4-gakhil@marvell.com",
    "date": "2022-09-24T13:57:58",
    "name": "[v5,3/3] test/security: add inline IPsec SA hard expiry cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4e557c8b9acfacbf28b6d57376c3a01f9f314f43",
    "submitter": {
        "id": 2094,
        "url": "http://patchwork.dpdk.org/api/people/2094/?format=api",
        "name": "Akhil Goyal",
        "email": "gakhil@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/20220924135758.3402392-4-gakhil@marvell.com/mbox/",
    "series": [
        {
            "id": 24810,
            "url": "http://patchwork.dpdk.org/api/series/24810/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=24810",
            "date": "2022-09-24T13:57:55",
            "name": "Add and test IPsec SA expiry events",
            "version": 5,
            "mbox": "http://patchwork.dpdk.org/series/24810/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/116821/comments/",
    "check": "fail",
    "checks": "http://patchwork.dpdk.org/api/patches/116821/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 99B21A0542;\n\tSat, 24 Sep 2022 15:58:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1E0A442C0E;\n\tSat, 24 Sep 2022 15:58:29 +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 5160442C00\n for <dev@dpdk.org>; Sat, 24 Sep 2022 15:58: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 28ODmlm0000328;\n Sat, 24 Sep 2022 06:58:26 -0700",
            "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jt1dp0719-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sat, 24 Sep 2022 06:58:26 -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 Sat, 24 Sep 2022 06:58:24 -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; Sat, 24 Sep 2022 06:58:24 -0700",
            "from localhost.localdomain (unknown [10.28.36.102])\n by maili.marvell.com (Postfix) with ESMTP id 1951C3F70A0;\n Sat, 24 Sep 2022 06:58:20 -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=Xri7ylwBuqlgjEgcIiBOjWiuPcoiD2BlyzOtb2FkRCg=;\n b=e+QLCQlOXcm62IGMVHmSGjKVDU5puLY12w9a7itCfAEHiHLOYS9wbzChG3eR0b3DQ3a4\n IXURaSJ/cEAFOlLqrBE4KR5TuijfufpQiT9F9wOzmOYSx7qKH0bwDm7X+2xz3PvE6Zwo\n Qk7t0JOzh3ykwmDDjAgMO2HyPmf6Y86NSfXEnfnK+zfsXr9vMv8RKSnOwDK2X2ZL3lW/\n KlGiWahTineY0HNlgs43JgXsLyft/QFyb47OAj29OgUf26/ibo0HXH7qF/HlJoi6Vp5X\n 4NPvrdJENNDGP5L1D5iMi5gRNJRF8t7UAjEIXBUm3u4UdALv5xgtVoFIBzIVvpFxgLRO dw==",
        "From": "Akhil Goyal <gakhil@marvell.com>",
        "To": "<dev@dpdk.org>",
        "CC": "<thomas@monjalon.net>, <david.marchand@redhat.com>,\n <hemant.agrawal@nxp.com>, <vattunuru@marvell.com>,\n <ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>,\n <konstantin.v.ananyev@yandex.ru>, <jerinj@marvell.com>,\n <adwivedi@marvell.com>, <anoobj@marvell.com>, <ndabilpuram@marvell.com>",
        "Subject": "[PATCH v5 3/3] test/security: add inline IPsec SA hard expiry cases",
        "Date": "Sat, 24 Sep 2022 19:27:58 +0530",
        "Message-ID": "<20220924135758.3402392-4-gakhil@marvell.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220924135758.3402392-1-gakhil@marvell.com>",
        "References": "<20220416192530.173895-8-gakhil@marvell.com>\n <20220924135758.3402392-1-gakhil@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "9yO1_A5IVTZwq0m_Ffc83u_H2iBMu1N1",
        "X-Proofpoint-GUID": "9yO1_A5IVTZwq0m_Ffc83u_H2iBMu1N1",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1\n definitions=2022-09-24_06,2022-09-22_02,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: Vamsi Attunuru <vattunuru@marvell.com>\n\nPatch adds hard expiry unit tests for both packet\nand byte limits.\n\nSigned-off-by: Vamsi Attunuru <vattunuru@marvell.com>\n---\n app/test/test_security_inline_proto.c | 71 +++++++++++++++++++++++----\n 1 file changed, 61 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/app/test/test_security_inline_proto.c b/app/test/test_security_inline_proto.c\nindex 5747ee0990..8d0dd7765c 100644\n--- a/app/test/test_security_inline_proto.c\n+++ b/app/test/test_security_inline_proto.c\n@@ -969,18 +969,25 @@ test_ipsec_inline_sa_exp_event_callback(uint16_t port_id,\n \t\tprintf(\"Mismatch in event specific metadata\\n\");\n \t\treturn -1;\n \t}\n-\tif (event_desc->subtype == RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY) {\n+\tswitch (event_desc->subtype) {\n+\tcase RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY:\n \t\tvector->event = RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY;\n-\t\treturn 0;\n-\t} else if (event_desc->subtype == RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY) {\n+\t\tbreak;\n+\tcase RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY:\n \t\tvector->event = RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY;\n-\t\treturn 0;\n-\t} else if (event_desc->subtype >= RTE_ETH_EVENT_IPSEC_MAX) {\n+\t\tbreak;\n+\tcase RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY:\n+\t\tvector->event = RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY;\n+\t\tbreak;\n+\tcase RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY:\n+\t\tvector->event = RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY;\n+\t\tbreak;\n+\tdefault:\n \t\tprintf(\"Invalid IPsec event reported\\n\");\n \t\treturn -1;\n \t}\n \n-\treturn -1;\n+\treturn 0;\n }\n \n static enum rte_eth_event_ipsec_subtype\n@@ -995,8 +1002,12 @@ test_ipsec_inline_setup_expiry_vector(struct sa_expiry_vector *vector,\n \tvector->sa_data = (void *)tdata;\n \tif (flags->sa_expiry_pkts_soft)\n \t\tevent = RTE_ETH_EVENT_IPSEC_SA_PKT_EXPIRY;\n-\telse\n+\telse if (flags->sa_expiry_bytes_soft)\n \t\tevent = RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY;\n+\telse if (flags->sa_expiry_pkts_hard)\n+\t\tevent = RTE_ETH_EVENT_IPSEC_SA_PKT_HARD_EXPIRY;\n+\telse\n+\t\tevent = RTE_ETH_EVENT_IPSEC_SA_BYTE_HARD_EXPIRY;\n \trte_eth_dev_callback_register(port_id, RTE_ETH_EVENT_IPSEC,\n \t\t       test_ipsec_inline_sa_exp_event_callback, vector);\n \n@@ -1024,7 +1035,8 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,\n \n \tmemset(rx_pkts_burst, 0, sizeof(rx_pkts_burst[0]) * nb_pkts);\n \n-\tif (flags->sa_expiry_pkts_soft || flags->sa_expiry_bytes_soft) {\n+\tif (flags->sa_expiry_pkts_soft || flags->sa_expiry_bytes_soft ||\n+\t\tflags->sa_expiry_pkts_hard || flags->sa_expiry_bytes_hard) {\n \t\tif (td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS)\n \t\t\treturn TEST_SUCCESS;\n \t\tevent = test_ipsec_inline_setup_expiry_vector(&vector, flags, td);\n@@ -1112,7 +1124,9 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,\n \t\t\t\tbreak;\n \t\t} while (j++ < 5 || nb_rx == 0);\n \n-\tif (nb_rx != nb_sent) {\n+\tif (!flags->sa_expiry_pkts_hard &&\n+\t\t\t!flags->sa_expiry_bytes_hard &&\n+\t\t\t(nb_rx != nb_sent)) {\n \t\tprintf(\"\\nUnable to RX all %d packets, received(%i)\",\n \t\t\t\tnb_sent, nb_rx);\n \t\twhile (--nb_rx >= 0)\n@@ -1147,7 +1161,8 @@ test_ipsec_inline_proto_process(struct ipsec_test_data *td,\n out:\n \tif (td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS)\n \t\tdestroy_default_flow(port_id);\n-\tif (flags->sa_expiry_pkts_soft || flags->sa_expiry_bytes_soft) {\n+\tif (flags->sa_expiry_pkts_soft || flags->sa_expiry_bytes_soft ||\n+\t\tflags->sa_expiry_pkts_hard || flags->sa_expiry_bytes_hard) {\n \t\tif (vector.notify_event && (vector.event == event))\n \t\t\tret = TEST_SUCCESS;\n \t\telse\n@@ -1174,6 +1189,7 @@ test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)\n \n \tif (flags->iv_gen || flags->sa_expiry_pkts_soft ||\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 \n@@ -1210,6 +1226,13 @@ test_ipsec_inline_proto_all(const struct ipsec_test_flags *flags)\n \t\t\ttd_outb.ipsec_xform.life.bytes_soft_limit =\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\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+\t\t\t\t  * nb_pkts) >> 3) - 1;\n \n \t\tret = test_ipsec_inline_proto_process(&td_outb, &td_inb, nb_pkts,\n \t\t\t\t\t\tfalse, flags);\n@@ -2338,6 +2361,26 @@ test_ipsec_inline_proto_sa_byte_soft_expiry(const void *data __rte_unused)\n \treturn test_ipsec_inline_proto_all(&flags);\n }\n \n+static int\n+test_ipsec_inline_proto_sa_pkt_hard_expiry(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags = {\n+\t\t.sa_expiry_pkts_hard = true\n+\t};\n+\n+\treturn test_ipsec_inline_proto_all(&flags);\n+}\n+\n+static int\n+test_ipsec_inline_proto_sa_byte_hard_expiry(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags = {\n+\t\t.sa_expiry_bytes_hard = true\n+\t};\n+\n+\treturn test_ipsec_inline_proto_all(&flags);\n+}\n+\n static int\n test_ipsec_inline_proto_known_vec_fragmented(const void *test_data)\n {\n@@ -2748,6 +2791,14 @@ static struct unit_test_suite inline_ipsec_testsuite  = {\n \t\t\t\"SA soft expiry with byte limit\",\n \t\t\tut_setup_inline_ipsec, ut_teardown_inline_ipsec,\n \t\t\ttest_ipsec_inline_proto_sa_byte_soft_expiry),\n+\t\tTEST_CASE_NAMED_ST(\n+\t\t\t\"SA hard expiry with packet limit\",\n+\t\t\tut_setup_inline_ipsec, ut_teardown_inline_ipsec,\n+\t\t\ttest_ipsec_inline_proto_sa_pkt_hard_expiry),\n+\t\tTEST_CASE_NAMED_ST(\n+\t\t\t\"SA hard expiry with byte limit\",\n+\t\t\tut_setup_inline_ipsec, ut_teardown_inline_ipsec,\n+\t\t\ttest_ipsec_inline_proto_sa_byte_hard_expiry),\n \n \t\tTEST_CASE_NAMED_WITH_DATA(\n \t\t\t\"Antireplay with window size 1024\",\n",
    "prefixes": [
        "v5",
        "3/3"
    ]
}