get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 104879,
    "url": "http://patchwork.dpdk.org/api/patches/104879/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1638777528-553-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": "<1638777528-553-4-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1638777528-553-4-git-send-email-anoobj@marvell.com",
    "date": "2021-12-06T07:58:38",
    "name": "[03/13] test/crypto: add chained operations in combined cases",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fc9bbec8b03690eefde03b51bde23eeb0c4ab77c",
    "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-4-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/104879/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/104879/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 D8170A0C41;\n\tMon,  6 Dec 2021 08:59:39 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7FAF541155;\n\tMon,  6 Dec 2021 08:59:35 +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 8B8C141155\n for <dev@dpdk.org>; Mon,  6 Dec 2021 08:59:33 +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 1B5JOB8i023858;\n Sun, 5 Dec 2021 23:59:32 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3cs0qn271r-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Sun, 05 Dec 2021 23:59:32 -0800",
            "from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18;\n Sun, 5 Dec 2021 23:59:30 -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:30 -0800",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 40DF53F704A;\n Sun,  5 Dec 2021 23:59:27 -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=vo0qGbA0GJT27gtwRXR0Mi9miqq9cPAffnPwOcgQ780=;\n b=dsml2wk+Nyusx8HGrHYAL7dinN16E0QZCUzaYEQeFIh/iC99dcSsclDTlVKpjoquwvAf\n a1JWZd3t2GYGLJQMvjlPsEfftiDNN0Vmoim/mAEFe+40xsiJEIcSql/Lx01CB/QBGH3N\n b55vkbeBnmDszPDzkgBaCBVrBYc0yH8txPnRAJDYnjp//a//QJIpYWFXUVqG2iREl43H\n sN6LvVEnBrdBuVddKFl+rUsfz3/cziTetebWtpqwj+1fHFmFb4d6CEGj1zkSQYO+XACP\n y5rNe08KceSKPXiHunodt03gldT8wwbYEVWiDfwzqfvYq8V24UdMC0x6G+ZPHp6WHfiP Pg==",
        "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 03/13] test/crypto: add chained operations in combined cases",
        "Date": "Mon, 6 Dec 2021 13:28:38 +0530",
        "Message-ID": "<1638777528-553-4-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": "1BBvX25w8y1GmDwbe95ylYmRvDBTm5jI",
        "X-Proofpoint-ORIG-GUID": "1BBvX25w8y1GmDwbe95ylYmRvDBTm5jI",
        "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": "Extend lookaside IPsec combined mode cases to cover chained operations\nalso.\n\nCurrently covering combinations of,\n\nCiphers,\n1. AES-128-CBC\n\nAuth,\n1. NULL\n2. SHA2-256 [16B ICV]\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n app/test/test_cryptodev.c                | 11 +++--\n app/test/test_cryptodev_security_ipsec.c | 77 +++++++++++++++++++++++++-------\n app/test/test_cryptodev_security_ipsec.h | 36 +++++++++++++++\n 3 files changed, 103 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 3fa618d..2a7ede6 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -835,6 +835,8 @@ ipsec_proto_testsuite_setup(void)\n \t\tret = TEST_SKIPPED;\n \t}\n \n+\ttest_ipsec_alg_list_populate();\n+\n \t/*\n \t * Stop the device. Device would be started again by individual test\n \t * case setup routine.\n@@ -9381,9 +9383,9 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \t    flags->sa_expiry_pkts_hard)\n \t\tnb_pkts = IPSEC_TEST_PACKETS_MAX;\n \n-\tfor (i = 0; i < RTE_DIM(aead_list); i++) {\n-\t\ttest_ipsec_td_prepare(&aead_list[i],\n-\t\t\t\t      NULL,\n+\tfor (i = 0; i < RTE_DIM(alg_list); i++) {\n+\t\ttest_ipsec_td_prepare(alg_list[i].param1,\n+\t\t\t\t      alg_list[i].param2,\n \t\t\t\t      flags,\n \t\t\t\t      td_outb,\n \t\t\t\t      nb_pkts);\n@@ -9407,7 +9409,8 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \t\t\treturn TEST_FAILED;\n \n \t\tif (flags->display_alg)\n-\t\t\ttest_ipsec_display_alg(&aead_list[i], NULL);\n+\t\t\ttest_ipsec_display_alg(alg_list[i].param1,\n+\t\t\t\t\t       alg_list[i].param2);\n \n \t\tpass_cnt++;\n \t}\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex 45960bf..5f67dc0 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -15,7 +15,29 @@\n \n #define IV_LEN_MAX 16\n \n-extern struct ipsec_test_data pkt_aes_256_gcm;\n+struct crypto_param_comb alg_list[RTE_DIM(aead_list) +\n+\t\t\t\t  (RTE_DIM(cipher_list) *\n+\t\t\t\t   RTE_DIM(auth_list))];\n+\n+void\n+test_ipsec_alg_list_populate(void)\n+{\n+\tunsigned long i, j, index = 0;\n+\n+\tfor (i = 0; i < RTE_DIM(aead_list); i++) {\n+\t\talg_list[index].param1 = &aead_list[i];\n+\t\talg_list[index].param2 = NULL;\n+\t\tindex++;\n+\t}\n+\n+\tfor (i = 0; i < RTE_DIM(cipher_list); i++) {\n+\t\tfor (j = 0; j < RTE_DIM(auth_list); j++) {\n+\t\t\talg_list[index].param1 = &cipher_list[i];\n+\t\t\talg_list[index].param2 = &auth_list[j];\n+\t\t\tindex++;\n+\t\t}\n+\t}\n+}\n \n int\n test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform,\n@@ -293,18 +315,31 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \n \tfor (i = 0; i < nb_td; i++) {\n \t\ttd = &td_array[i];\n-\t\t/* Copy template for packet & key fields */\n-\t\tmemcpy(td, &pkt_aes_256_gcm, sizeof(*td));\n \n-\t\t/* Override fields based on param */\n+\t\t/* Prepare fields based on param */\n+\n+\t\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n+\t\t\t/* Copy template for packet & key fields */\n+\t\t\tmemcpy(td, &pkt_aes_256_gcm, sizeof(*td));\n \n-\t\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD)\n \t\t\ttd->aead = true;\n-\t\telse\n+\t\t\ttd->xform.aead.aead.algo = param1->alg.aead;\n+\t\t\ttd->xform.aead.aead.key.length = param1->key_length;\n+\t\t} else {\n+\t\t\t/* Copy template for packet & key fields */\n+\t\t\tmemcpy(td, &pkt_aes_128_cbc_hmac_sha256, sizeof(*td));\n+\n \t\t\ttd->aead = false;\n+\t\t\ttd->xform.chain.cipher.cipher.algo = param1->alg.cipher;\n+\t\t\ttd->xform.chain.cipher.cipher.key.length =\n+\t\t\t\t\tparam1->key_length;\n+\t\t\ttd->xform.chain.auth.auth.algo = param2->alg.auth;\n+\t\t\ttd->xform.chain.auth.auth.key.length =\n+\t\t\t\t\tparam2->key_length;\n+\t\t\ttd->xform.chain.auth.auth.digest_length =\n+\t\t\t\t\tparam2->digest_length;\n \n-\t\ttd->xform.aead.aead.algo = param1->alg.aead;\n-\t\ttd->xform.aead.aead.key.length = param1->key_length;\n+\t\t}\n \n \t\tif (flags->iv_gen)\n \t\t\ttd->ipsec_xform.options.iv_gen_disable = 0;\n@@ -324,8 +359,6 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\n \t\t}\n \n \t}\n-\n-\tRTE_SET_USED(param2);\n }\n \n void\n@@ -374,12 +407,21 @@ void\n test_ipsec_display_alg(const struct crypto_param *param1,\n \t\t       const struct crypto_param *param2)\n {\n-\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD)\n-\t\tprintf(\"\\t%s [%d]\\n\",\n+\tif (param1->type == RTE_CRYPTO_SYM_XFORM_AEAD) {\n+\t\tprintf(\"\\t%s [%d]\",\n \t\t       rte_crypto_aead_algorithm_strings[param1->alg.aead],\n-\t\t       param1->key_length);\n-\n-\tRTE_SET_USED(param2);\n+\t\t       param1->key_length * 8);\n+\t} else {\n+\t\tprintf(\"\\t%s\",\n+\t\t       rte_crypto_cipher_algorithm_strings[param1->alg.cipher]);\n+\t\tif (param1->alg.cipher != RTE_CRYPTO_CIPHER_NULL)\n+\t\t\tprintf(\" [%d]\", param1->key_length * 8);\n+\t\tprintf(\" %s\",\n+\t\t       rte_crypto_auth_algorithm_strings[param2->alg.auth]);\n+\t\tif (param2->alg.auth != RTE_CRYPTO_AUTH_NULL)\n+\t\t\tprintf(\" [%dB ICV]\", param2->digest_length);\n+\t}\n+\tprintf(\"\\n\");\n }\n \n static int\n@@ -631,8 +673,9 @@ test_ipsec_res_d_prepare(struct rte_mbuf *m, const struct ipsec_test_data *td,\n \tif (res_d->aead) {\n \t\tres_d->xform.aead.aead.op = RTE_CRYPTO_AEAD_OP_DECRYPT;\n \t} else {\n-\t\tprintf(\"Only AEAD supported\\n\");\n-\t\treturn TEST_SKIPPED;\n+\t\tres_d->xform.chain.cipher.cipher.op =\n+\t\t\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT;\n+\t\tres_d->xform.chain.auth.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n \t}\n \n \treturn TEST_SUCCESS;\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 70a264a..b1f0ff8 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -71,6 +71,7 @@ struct crypto_param {\n \t\tenum rte_crypto_aead_algorithm aead;\n \t} alg;\n \tuint16_t key_length;\n+\tuint16_t digest_length;\n };\n \n static const struct crypto_param aead_list[] = {\n@@ -91,6 +92,41 @@ static const struct crypto_param aead_list[] = {\n \t},\n };\n \n+static const struct crypto_param cipher_list[] = {\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n+\t\t.alg.cipher =  RTE_CRYPTO_CIPHER_AES_CBC,\n+\t\t.key_length = 16,\n+\t},\n+};\n+\n+static const struct crypto_param auth_list[] = {\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t.alg.auth =  RTE_CRYPTO_AUTH_NULL,\n+\t},\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t.alg.auth =  RTE_CRYPTO_AUTH_SHA256_HMAC,\n+\t\t.key_length = 32,\n+\t\t.digest_length = 16,\n+\t},\n+};\n+\n+struct crypto_param_comb {\n+\tconst struct crypto_param *param1;\n+\tconst struct crypto_param *param2;\n+};\n+\n+extern struct ipsec_test_data pkt_aes_256_gcm;\n+extern struct ipsec_test_data pkt_aes_128_cbc_hmac_sha256;\n+\n+extern struct crypto_param_comb alg_list[RTE_DIM(aead_list) +\n+\t\t\t\t\t (RTE_DIM(cipher_list) *\n+\t\t\t\t\t  RTE_DIM(auth_list))];\n+\n+void test_ipsec_alg_list_populate(void);\n+\n int test_ipsec_sec_caps_verify(struct rte_security_ipsec_xform *ipsec_xform,\n \t\t\t       const struct rte_security_capability *sec_cap,\n \t\t\t       bool silent);\n",
    "prefixes": [
        "03/13"
    ]
}