get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99895,
    "url": "https://patches.dpdk.org/api/patches/99895/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1632826799-454-5-git-send-email-anoobj@marvell.com/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<1632826799-454-5-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1632826799-454-5-git-send-email-anoobj@marvell.com",
    "date": "2021-09-28T10:59:57",
    "name": "[v4,4/6] test/crypto: add packets soft expiry cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6e1ae7d732347b207b04dc60cc1215b4d0d558a1",
    "submitter": {
        "id": 1205,
        "url": "https://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 6690,
        "url": "https://patches.dpdk.org/api/users/6690/?format=api",
        "username": "akhil",
        "first_name": "akhil",
        "last_name": "goyal",
        "email": "gakhil@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1632826799-454-5-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 19223,
            "url": "https://patches.dpdk.org/api/series/19223/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=19223",
            "date": "2021-09-28T10:59:53",
            "name": "Add SA lifetime in security",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/19223/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/99895/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/99895/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 AE403A0032;\n\tTue, 28 Sep 2021 13:00:41 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 21E1E410ED;\n\tTue, 28 Sep 2021 13:00:39 +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 0B51A410E6\n for <dev@dpdk.org>; Tue, 28 Sep 2021 13:00:36 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id\n 18SAF7nm019504;\n Tue, 28 Sep 2021 04:00:36 -0700",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com with ESMTP id 3bc14pr4y1-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Tue, 28 Sep 2021 04:00:36 -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 Tue, 28 Sep 2021 04:00:34 -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; Tue, 28 Sep 2021 04:00:34 -0700",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 7BCAC3F7099;\n Tue, 28 Sep 2021 04:00:30 -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=fj3jp5GhbSyLNAOq+4hsof2I2m+g+sonBX0f8eEmbDU=;\n b=Z63nClirKH0E7rbEpD5EKy8maxyhsAXXWjnlkd7dC39f67YJOaUS8339mzocsXZ33zxR\n n+2ScH/BsYC7Vjlt8UjEQGHtZir70zaK4Uw5wVCIP4tGKJJ9B3tu38PhKMmFFoxQgBzx\n 6UTbNVBuuMGDm6Vbv+uKULOynTXPcFhWb5xai1zalv2aXofcVT9xxeOgfER0Pk4BJyQd\n rmsNPhn6IBgtqnmtNngj9/LAtygWBNFUAGMlk7OWV6KOkstuKCPN5euperISD6PgkeFN\n qC5eqAPzeChUL7lzeBnPf3ga4ELOMs+En/5x8Eq/1yhOHdm2cAADWLkANpxVc85jVX12 lQ==",
        "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": "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>",
        "Date": "Tue, 28 Sep 2021 16:29:57 +0530",
        "Message-ID": "<1632826799-454-5-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1632826799-454-1-git-send-email-anoobj@marvell.com>",
        "References": "<1632823662-384-1-git-send-email-anoobj@marvell.com>\n <1632826799-454-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-ORIG-GUID": "EXTA4c48iUx1z2W6Z-KI-qQVtWN7hXzF",
        "X-Proofpoint-GUID": "EXTA4c48iUx1z2W6Z-KI-qQVtWN7hXzF",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475\n definitions=2021-09-28_05,2021-09-28_01,2020-04-07_01",
        "Subject": "[dpdk-dev] [PATCH v4 4/6] test/crypto: add packets soft expiry cases",
        "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": "Add tests to validate packets soft expiry handling.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n\n---\n app/test/test_cryptodev.c                | 21 +++++++++++++++++++--\n app/test/test_cryptodev_security_ipsec.c | 18 ++++++++++++++++--\n app/test/test_cryptodev_security_ipsec.h |  4 +++-\n 3 files changed, 38 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex f57a1a4..1befbeb 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9045,7 +9045,7 @@ test_ipsec_proto_process(const struct ipsec_test_data td[],\n \t\t/* Process crypto operation */\n \t\tprocess_crypto_request(dev_id, ut_params->op);\n \n-\t\tret = test_ipsec_status_check(ut_params->op, flags, dir);\n+\t\tret = test_ipsec_status_check(ut_params->op, flags, dir, i + 1);\n \t\tif (ret != TEST_SUCCESS)\n \t\t\tgoto crypto_op_free;\n \n@@ -9115,7 +9115,8 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \tunsigned int i, nb_pkts = 1, pass_cnt = 0;\n \tint ret;\n \n-\tif (flags->iv_gen)\n+\tif (flags->iv_gen ||\n+\t    flags->sa_expiry_pkts_soft)\n \t\tnb_pkts = IPSEC_TEST_PACKETS_MAX;\n \n \tfor (i = 0; i < RTE_DIM(aead_list); i++) {\n@@ -9180,6 +9181,18 @@ test_ipsec_proto_iv_gen(const void *data __rte_unused)\n }\n \n static int\n+test_ipsec_proto_sa_exp_pkts_soft(const void *data __rte_unused)\n+{\n+\tstruct ipsec_test_flags flags;\n+\n+\tmemset(&flags, 0, sizeof(flags));\n+\n+\tflags.sa_expiry_pkts_soft = true;\n+\n+\treturn test_ipsec_proto_all(&flags);\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@@ -14136,6 +14149,10 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\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\"SA expiry packets soft\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_sa_exp_pkts_soft),\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),\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex f371b15..56a44b5 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -173,6 +173,10 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \n \t\tif (flags->iv_gen)\n \t\t\ttd->ipsec_xform.options.iv_gen_disable = 0;\n+\n+\t\tif (flags->sa_expiry_pkts_soft)\n+\t\t\ttd->ipsec_xform.life.packets_soft_limit =\n+\t\t\t\t\tIPSEC_TEST_PACKETS_MAX - 1;\n \t}\n \n \tRTE_SET_USED(param2);\n@@ -395,7 +399,8 @@ test_ipsec_post_process(struct rte_mbuf *m, const struct ipsec_test_data *td,\n int\n test_ipsec_status_check(struct rte_crypto_op *op,\n \t\t\tconst struct ipsec_test_flags *flags,\n-\t\t\tenum rte_security_ipsec_sa_direction dir)\n+\t\t\tenum rte_security_ipsec_sa_direction dir,\n+\t\t\tint pkt_num)\n {\n \tint ret = TEST_SUCCESS;\n \n@@ -406,7 +411,16 @@ test_ipsec_status_check(struct rte_crypto_op *op,\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\tprintf(\"Security op processing failed [pkt_num: %d]\\n\",\n+\t\t\t       pkt_num);\n+\t\t\tret = TEST_FAILED;\n+\t\t}\n+\t}\n+\n+\tif (flags->sa_expiry_pkts_soft && pkt_num == IPSEC_TEST_PACKETS_MAX) {\n+\t\tif (!(op->aux_flags &\n+\t\t      RTE_CRYPTO_OP_AUX_FLAGS_IPSEC_SOFT_EXPIRY)) {\n+\t\t\tprintf(\"SA soft expiry (pkts) test failed\\n\");\n \t\t\tret = TEST_FAILED;\n \t\t}\n \t}\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex e1645f4..eed3476 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -49,6 +49,7 @@ struct ipsec_test_data {\n \n struct ipsec_test_flags {\n \tbool display_alg;\n+\tbool sa_expiry_pkts_soft;\n \tbool icv_corrupt;\n \tbool iv_gen;\n \tbool udp_encap;\n@@ -114,6 +115,7 @@ int test_ipsec_post_process(struct rte_mbuf *m,\n \n int test_ipsec_status_check(struct rte_crypto_op *op,\n \t\t\t    const struct ipsec_test_flags *flags,\n-\t\t\t    enum rte_security_ipsec_sa_direction dir);\n+\t\t\t    enum rte_security_ipsec_sa_direction dir,\n+\t\t\t    int pkt_num);\n \n #endif\n",
    "prefixes": [
        "v4",
        "4/6"
    ]
}