get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 96395,
    "url": "http://patchwork.dpdk.org/api/patches/96395/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1627555402-4789-4-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": "<1627555402-4789-4-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1627555402-4789-4-git-send-email-anoobj@marvell.com",
    "date": "2021-07-29T10:43:22",
    "name": "[21.11,3/3] test/crypto: add lookaside IPsec ICV corrupt test case",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "630b313ac4f119d9627491971d3777c88bfa8249",
    "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/1627555402-4789-4-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 18061,
            "url": "http://patchwork.dpdk.org/api/series/18061/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18061",
            "date": "2021-07-29T10:43:19",
            "name": "Add lookaside IPsec tests",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/18061/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96395/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/96395/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 28907A0C40;\n\tThu, 29 Jul 2021 12:44:00 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id E6FB240E46;\n\tThu, 29 Jul 2021 12:43:59 +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 6EBC1410DE\n for <dev@dpdk.org>; Thu, 29 Jul 2021 12:43:58 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id\n 16TAeF9n006856; Thu, 29 Jul 2021 03:43:57 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com with ESMTP id 3a37vvv2jy-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Thu, 29 Jul 2021 03:43:57 -0700",
            "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 Thu, 29 Jul 2021 03:43:56 -0700",
            "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; Thu, 29 Jul 2021 03:43:56 -0700",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 2DD163F7061;\n Thu, 29 Jul 2021 03:43:49 -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=BDrnj7nII60Mt69RJIANpeM4+6GsuabKJao+98L+BCA=;\n b=K4N9WpUPJXwQZhEBuBz9fiH0hOJNm0GXAE5KYvYDrq6yFVGZiD4T8rW9mfH+/JzVhiy0\n UWCWDl9UXp754MIz1kxiwxEi1pxF9xGOBBlvb9DFbZBadRxx1n9OSwjy3NjAkIkxa7gc\n snsUlFElWSzAU/be+CX+u9tiaSnWSOKXdSNZTdgI7QUuD/yvr3txbqEVyMt2dY1jyVIw\n lhcACeMEkMR+ORbFfsGZQB0SrZo3EY8/ymbIg/j6dU+fhmJoC6i6BAWSyZaCfFgLznQ5\n rNk2/BWPh8suLOTSXO2vL9UJ4aujx1c9P1JWZDQnJpbAlF1mAWW+O3PEV5RFwmzIvQ/k pQ==",
        "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 Ankur Dwivedi <adwivedi@marvell.com>, <dev@dpdk.org>, Anoob Joseph\n <anoobj@marvell.com>",
        "Date": "Thu, 29 Jul 2021 16:13:22 +0530",
        "Message-ID": "<1627555402-4789-4-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1627555402-4789-1-git-send-email-anoobj@marvell.com>",
        "References": "<1627555402-4789-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "MOhXmAIn1RASn3zAyqiKX8RruZn-gZxM",
        "X-Proofpoint-GUID": "MOhXmAIn1RASn3zAyqiKX8RruZn-gZxM",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790\n definitions=2021-07-29_09:2021-07-29,\n 2021-07-29 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 21.11 3/3] test/crypto: add lookaside IPsec ICV\n corrupt test case",
        "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\nAdding lookaside IPsec ICV corrupt test case.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Tejasree Kondoj <ktejasree@marvell.com>\n---\n app/test/test_cryptodev.c                | 16 ++++++++++++++++\n app/test/test_cryptodev_security_ipsec.c | 30 ++++++++++++++++++++----------\n app/test/test_cryptodev_security_ipsec.h |  1 +\n 3 files changed, 37 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex ad9f372..e59849a 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9091,6 +9091,18 @@ test_ipsec_proto_display_list(const void *data __rte_unused)\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+\n+\tmemset(&flags, 0, sizeof(flags));\n+\n+\tflags.icv_corrupt = 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@@ -14012,6 +14024,10 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\n \t\t\t\"Combined test alg list\",\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\"Negative test: ICV corruption\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_err_icv_corrupt),\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 5351556..331a8bf 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -175,9 +175,12 @@ test_ipsec_td_update(struct ipsec_test_data td_inb[],\n \t\tmemcpy(td_inb[i].output_text.data, td_outb[i].input_text.data,\n \t\t       td_outb[i].input_text.len);\n \t\ttd_inb[i].output_text.len = td_outb->input_text.len;\n-\t}\n \n-\tRTE_SET_USED(flags);\n+\t\tif (flags && flags->icv_corrupt) {\n+\t\t\tint icv_pos = td_inb[i].input_text.len - 4;\n+\t\t\ttd_inb[i].input_text.data[icv_pos] += 1;\n+\t\t}\n+\t}\n }\n \n void\n@@ -199,6 +202,11 @@ test_ipsec_td_verify(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \tuint8_t *output_text = rte_pktmbuf_mtod(m, uint8_t *);\n \tuint32_t skip = 0, len = rte_pktmbuf_pkt_len(m);\n \n+\t/* For negative tests, no need to do verification */\n+\tif (flags->icv_corrupt &&\n+\t    td->ipsec_xform.direction == RTE_SECURITY_IPSEC_SA_DIR_INGRESS)\n+\t\treturn TEST_SUCCESS;\n+\n \tif (len != td->output_text.len) {\n \t\tprintf(\"Output length (%d) not matching with expected (%d)\\n\",\n \t\t\tlen, td->output_text.len);\n@@ -231,8 +239,6 @@ test_ipsec_td_verify(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \t\treturn TEST_FAILED;\n \t}\n \n-\tRTE_SET_USED(flags);\n-\n \treturn TEST_SUCCESS;\n }\n \n@@ -289,13 +295,17 @@ test_ipsec_status_check(struct rte_crypto_op *op,\n {\n \tint ret = TEST_SUCCESS;\n \n-\tif (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {\n-\t\tprintf(\"Security op processing failed\\n\");\n-\t\tret = TEST_FAILED;\n+\tif (dir == RTE_SECURITY_IPSEC_SA_DIR_INGRESS && flags->icv_corrupt) {\n+\t\tif (op->status != RTE_CRYPTO_OP_STATUS_ERROR) {\n+\t\t\tprintf(\"ICV corruption test case failed\\n\");\n+\t\t\tret = TEST_FAILED;\n+\t\t}\n+\t} else {\n+\t\tif (op->status != RTE_CRYPTO_OP_STATUS_SUCCESS) {\n+\t\t\tprintf(\"Security op processing failed\\n\");\n+\t\t\tret = TEST_FAILED;\n+\t\t}\n \t}\n \n-\tRTE_SET_USED(flags);\n-\tRTE_SET_USED(dir);\n-\n \treturn ret;\n }\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 97f3f86..717aab4 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -47,6 +47,7 @@ struct ipsec_test_data {\n \n struct ipsec_test_flags {\n \tbool display_alg;\n+\tbool icv_corrupt;\n };\n \n struct crypto_param {\n",
    "prefixes": [
        "21.11",
        "3/3"
    ]
}