get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 104920,
    "url": "http://patchwork.dpdk.org/api/patches/104920/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1638788880-650-13-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": "<1638788880-650-13-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1638788880-650-13-git-send-email-anoobj@marvell.com",
    "date": "2021-12-06T11:07:59",
    "name": "[v2,12/13] test/crypto: add aes xcbc known vectors",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "05afbd5d5598abc74ee837e54e1c13eb13895be1",
    "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/1638788880-650-13-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 20868,
            "url": "http://patchwork.dpdk.org/api/series/20868/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=20868",
            "date": "2021-12-06T11:07:47",
            "name": "Add new cases to lookaside IPsec tests",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/20868/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/104920/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/104920/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 4EC05A034F;\n\tMon,  6 Dec 2021 12:09:36 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 48FE9411B8;\n\tMon,  6 Dec 2021 12:09:21 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 232CC410E5\n for <dev@dpdk.org>; Mon,  6 Dec 2021 12:09:20 +0100 (CET)",
            "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 ESMTP id\n 1B62KDbe002190;\n Mon, 6 Dec 2021 03:09:19 -0800",
            "from dc5-exch02.marvell.com ([199.233.59.182])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3cs9muhfyg-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 06 Dec 2021 03:09:19 -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 Mon, 6 Dec 2021 03:09:17 -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; Mon, 6 Dec 2021 03:09:17 -0800",
            "from HY-LT1002.marvell.com (HY-LT1002.marvell.com [10.28.176.218])\n by maili.marvell.com (Postfix) with ESMTP id 4E84B3F705F;\n Mon,  6 Dec 2021 03:09:13 -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=rnRBTB0RA9zNK5Ytif5gl4myahrRnRzsJXuitBjvPiY=;\n b=dxYsR72QYB6/scnO4DopinkpYKYSMAw7OIGb6b76/1ejXuJJd8LTRxkOXGsI8o2rQbsL\n H2IIJbeBCwAf8TaRWggy9JfFPQ9OeXIbJevvpeOVg7VgJ8TmfyyZd2JVfo0E5Z6Mwcn7\n 3n1vUFo6k+MTMYeSNU9JzwnT8OQGWgWmUFEgL/gvHAtYFr3G300DK6u6Mm0wZgd8IVja\n nefWJWzUwEuN9Hn9Qx7LljYzzPLizActbFfJ8ulWBD8C24YSRydVfETarFBe26JclHnt\n KQn7kCT23wy94LNbi4CmFahn1GDkEQm0hyzeyEVf4kwnTf8Rf39DUJFOeQCkEtUpr7p7 ig==",
        "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 v2 12/13] test/crypto: add aes xcbc known vectors",
        "Date": "Mon, 6 Dec 2021 16:37:59 +0530",
        "Message-ID": "<1638788880-650-13-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1638788880-650-1-git-send-email-anoobj@marvell.com>",
        "References": "<1638777528-553-1-git-send-email-anoobj@marvell.com>\n <1638788880-650-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-GUID": "3u7qs4QZFfbOL6VFX3weYr78_5O3Nsul",
        "X-Proofpoint-ORIG-GUID": "3u7qs4QZFfbOL6VFX3weYr78_5O3Nsul",
        "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_04,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": "Add known vector test cases for NULL cipher + AES-XCBC. Also add both\nalgos to the combined mode list of algos.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\n---\n app/test/test_cryptodev.c                          | 38 +++++++--\n app/test/test_cryptodev_security_ipsec.c           |  2 +\n app/test/test_cryptodev_security_ipsec.h           | 17 ++++\n .../test_cryptodev_security_ipsec_test_vectors.h   | 90 ++++++++++++++++++++++\n doc/guides/rel_notes/release_22_03.rst             |  1 +\n 5 files changed, 142 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex 0ab4ca7..203b4a4 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -9368,8 +9368,11 @@ test_ipsec_proto_known_vec(const void *test_data)\n \n \tmemcpy(&td_outb, test_data, sizeof(td_outb));\n \n-\t/* Disable IV gen to be able to test with known vectors */\n-\ttd_outb.ipsec_xform.options.iv_gen_disable = 1;\n+\tif (td_outb.aead ||\n+\t    td_outb.xform.chain.cipher.cipher.algo != RTE_CRYPTO_CIPHER_NULL) {\n+\t\t/* Disable IV gen to be able to test with known vectors */\n+\t\ttd_outb.ipsec_xform.options.iv_gen_disable = 1;\n+\t}\n \n \treturn test_ipsec_proto_process(&td_outb, NULL, 1, false, &flags);\n }\n@@ -9428,10 +9431,23 @@ test_ipsec_proto_all(const struct ipsec_test_flags *flags)\n \t\t\t\t      td_outb,\n \t\t\t\t      nb_pkts);\n \n-\t\tif (flags->icv_corrupt && (td_outb->aead == false) &&\n-\t\t    (td_outb->xform.chain.auth.auth.algo ==\n-\t\t     RTE_CRYPTO_AUTH_NULL))\n-\t\t\tcontinue;\n+\t\tif (!td_outb->aead) {\n+\t\t\tenum rte_crypto_cipher_algorithm cipher_alg;\n+\t\t\tenum rte_crypto_auth_algorithm auth_alg;\n+\n+\t\t\tcipher_alg = td_outb->xform.chain.cipher.cipher.algo;\n+\t\t\tauth_alg = td_outb->xform.chain.auth.auth.algo;\n+\n+\t\t\t/* ICV is not applicable for NULL auth */\n+\t\t\tif (flags->icv_corrupt &&\n+\t\t\t    auth_alg == RTE_CRYPTO_AUTH_NULL)\n+\t\t\t\tcontinue;\n+\n+\t\t\t/* IV is not applicable for NULL cipher */\n+\t\t\tif (flags->iv_gen &&\n+\t\t\t    cipher_alg == RTE_CRYPTO_CIPHER_NULL)\n+\t\t\t\tcontinue;\n+\t\t}\n \n \t\tret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,\n \t\t\t\t\t       flags);\n@@ -14582,6 +14598,11 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\n \t\t\ttest_ipsec_proto_known_vec,\n \t\t\t&pkt_aes_128_cbc_hmac_sha256_v6),\n \t\tTEST_CASE_NAMED_WITH_DATA(\n+\t\t\t\"Outbound known vector (ESP tunnel mode IPv4 NULL AES-XCBC-MAC [12B ICV])\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_known_vec,\n+\t\t\t&pkt_null_aes_xcbc),\n+\t\tTEST_CASE_NAMED_WITH_DATA(\n \t\t\t\"Outbound fragmented packet\",\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_known_vec_fragmented,\n@@ -14626,6 +14647,11 @@ static struct unit_test_suite ipsec_proto_testsuite  = {\n \t\t\tut_setup_security, ut_teardown,\n \t\t\ttest_ipsec_proto_known_vec_inb,\n \t\t\t&pkt_aes_128_cbc_hmac_sha256_v6),\n+\t\tTEST_CASE_NAMED_WITH_DATA(\n+\t\t\t\"Inbound known vector (ESP tunnel mode IPv4 NULL AES-XCBC-MAC [12B ICV])\",\n+\t\t\tut_setup_security, ut_teardown,\n+\t\t\ttest_ipsec_proto_known_vec_inb,\n+\t\t\t&pkt_null_aes_xcbc),\n \t\tTEST_CASE_NAMED_ST(\n \t\t\t\"Combined test alg list\",\n \t\t\tut_setup_security, ut_teardown,\ndiff --git a/app/test/test_cryptodev_security_ipsec.c b/app/test/test_cryptodev_security_ipsec.c\nindex 832f9d8..94e5213 100644\n--- a/app/test/test_cryptodev_security_ipsec.c\n+++ b/app/test/test_cryptodev_security_ipsec.c\n@@ -375,6 +375,8 @@ test_ipsec_td_prepare(const struct crypto_param *param1,\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.cipher.cipher.iv.length =\n+\t\t\t\t\tparam1->iv_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;\ndiff --git a/app/test/test_cryptodev_security_ipsec.h b/app/test/test_cryptodev_security_ipsec.h\nindex 3376d08..6e27eba 100644\n--- a/app/test/test_cryptodev_security_ipsec.h\n+++ b/app/test/test_cryptodev_security_ipsec.h\n@@ -76,6 +76,7 @@ struct crypto_param {\n \t\tenum rte_crypto_aead_algorithm aead;\n \t} alg;\n \tuint16_t key_length;\n+\tuint16_t iv_length;\n \tuint16_t digest_length;\n };\n \n@@ -100,23 +101,33 @@ static const struct crypto_param aead_list[] = {\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_NULL,\n+\t\t.key_length = 0,\n+\t\t.iv_length = 0,\n+\t},\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\t.iv_length = 16,\n \t},\n \t{\n \t\t.type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n \t\t.alg.cipher =  RTE_CRYPTO_CIPHER_AES_CTR,\n \t\t.key_length = 16,\n+\t\t.iv_length = 16,\n \t},\n \t{\n \t\t.type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n \t\t.alg.cipher =  RTE_CRYPTO_CIPHER_AES_CTR,\n \t\t.key_length = 24,\n+\t\t.iv_length = 16,\n \t},\n \t{\n \t\t.type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n \t\t.alg.cipher =  RTE_CRYPTO_CIPHER_AES_CTR,\n \t\t.key_length = 32,\n+\t\t.iv_length = 16,\n \t},\n };\n \n@@ -143,6 +154,12 @@ static const struct crypto_param auth_list[] = {\n \t\t.key_length = 64,\n \t\t.digest_length = 32,\n \t},\n+\t{\n+\t\t.type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t.alg.auth =  RTE_CRYPTO_AUTH_AES_XCBC_MAC,\n+\t\t.key_length = 16,\n+\t\t.digest_length = 12,\n+\t},\n };\n \n struct crypto_param_comb {\ndiff --git a/app/test/test_cryptodev_security_ipsec_test_vectors.h b/app/test/test_cryptodev_security_ipsec_test_vectors.h\nindex b6d48ad..85cd6c5 100644\n--- a/app/test/test_cryptodev_security_ipsec_test_vectors.h\n+++ b/app/test/test_cryptodev_security_ipsec_test_vectors.h\n@@ -1062,4 +1062,94 @@ struct ipsec_test_data pkt_aes_128_gcm_frag = {\n \t},\n };\n \n+struct ipsec_test_data pkt_null_aes_xcbc = {\n+\t.auth_key = {\n+\t\t.data = {\n+\t\t\t0x61, 0x31, 0x62, 0x32, 0x63, 0x33, 0x64, 0x34,\n+\t\t\t0x65, 0x35, 0x66, 0x36, 0x67, 0x37, 0x68, 0x38,\n+\t\t},\n+\t},\n+\t.input_text = {\n+\t\t.data = {\n+\t\t\t/* IP */\n+\t\t\t0x45, 0x00, 0x00, 0x2f, 0x49, 0x37, 0x00, 0x00,\n+\t\t\t0x40, 0x11, 0x22, 0x84, 0x0d, 0x00, 0x00, 0x02,\n+\t\t\t0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x08, 0x00,\n+\t\t\t0x00, 0x1b, 0x6d, 0x99, 0x58, 0x58, 0x58, 0x58,\n+\t\t\t0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,\n+\t\t\t0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,\n+\t\t},\n+\t\t.len = 47,\n+\t},\n+\t.output_text = {\n+\t\t.data = {\n+\t\t\t/* IP */\n+\t\t\t0x45, 0x00, 0x00, 0x5c, 0x06, 0x00, 0x00, 0x00,\n+\t\t\t0x40, 0x32, 0x13, 0x6c, 0x0a, 0x00, 0x6f, 0x02,\n+\t\t\t0x0a, 0x00, 0xde, 0x02,\n+\n+\t\t\t/* ESP */\n+\t\t\t0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,\n+\n+\t\t\t/* IP */\n+\t\t\t0x45, 0x00, 0x00, 0x2f, 0x49, 0x37, 0x00, 0x00,\n+\t\t\t0x40, 0x11, 0x22, 0x84, 0x0d, 0x00, 0x00, 0x02,\n+\t\t\t0x02, 0x00, 0x00, 0x02, 0x08, 0x00, 0x08, 0x00,\n+\t\t\t0x00, 0x1b, 0x6d, 0x99, 0x58, 0x58, 0x58, 0x58,\n+\t\t\t0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,\n+\t\t\t0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58,\n+\n+\t\t\t/* ESP trailer */\n+\t\t\t0x01, 0x02, 0x03, 0x03, 0x04,\n+\n+\t\t\t/* ICV */\n+\t\t\t0xf1, 0x52, 0x64, 0xd1, 0x9b, 0x62, 0x24, 0xdd,\n+\t\t\t0xcc, 0x14, 0xf5, 0xc1,\n+\t\t},\n+\t\t.len = 92,\n+\t},\n+\t.ipsec_xform = {\n+\t\t.spi = 0x100,\n+\t\t.options.esn = 0,\n+\t\t.options.udp_encap = 0,\n+\t\t.options.copy_dscp = 0,\n+\t\t.options.copy_flabel = 0,\n+\t\t.options.copy_df = 0,\n+\t\t.options.dec_ttl = 0,\n+\t\t.options.ecn = 0,\n+\t\t.options.stats = 0,\n+\t\t.options.tunnel_hdr_verify = 0,\n+\t\t.options.ip_csum_enable = 0,\n+\t\t.options.l4_csum_enable = 0,\n+\t\t.direction = RTE_SECURITY_IPSEC_SA_DIR_EGRESS,\n+\t\t.proto = RTE_SECURITY_IPSEC_SA_PROTO_ESP,\n+\t\t.mode = RTE_SECURITY_IPSEC_SA_MODE_TUNNEL,\n+\t\t.tunnel.type = RTE_SECURITY_IPSEC_TUNNEL_IPV4,\n+\t\t.replay_win_sz = 0,\n+\t},\n+\t.aead = false,\n+\t.xform = {\n+\t\t.chain.cipher = {\n+\t\t\t.next = NULL,\n+\t\t\t.type = RTE_CRYPTO_SYM_XFORM_CIPHER,\n+\t\t\t.cipher = {\n+\t\t\t\t.op = RTE_CRYPTO_CIPHER_OP_ENCRYPT,\n+\t\t\t\t.algo = RTE_CRYPTO_CIPHER_NULL,\n+\t\t\t\t.key.length = 0,\n+\t\t\t\t.iv.length = 0,\n+\t\t\t},\n+\t\t},\n+\t\t.chain.auth = {\n+\t\t\t.next = NULL,\n+\t\t\t.type = RTE_CRYPTO_SYM_XFORM_AUTH,\n+\t\t\t.auth = {\n+\t\t\t\t.op = RTE_CRYPTO_AUTH_OP_GENERATE,\n+\t\t\t\t.algo = RTE_CRYPTO_AUTH_AES_XCBC_MAC,\n+\t\t\t\t.key.length = 16,\n+\t\t\t\t.digest_length = 12,\n+\t\t\t},\n+\t\t},\n+\t},\n+};\n+\n #endif /* TEST_CRYPTODEV_SECURITY_IPSEC_TEST_VECTORS_H_ */\ndiff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst\nindex db5ec20..a7d0e53 100644\n--- a/doc/guides/rel_notes/release_22_03.rst\n+++ b/doc/guides/rel_notes/release_22_03.rst\n@@ -62,6 +62,7 @@ New Features\n   * Added AES-CBC 128 HMAC-SHA256 known vector tests.\n   * Added AES-CBC 128 HMAC-SHA384 known vector tests.\n   * Added AES-CBC 128 HMAC-SHA512 known vector tests.\n+  * Added NULL cipher AES-XCBC known vector tests.\n   * Added tunnel mode tests\n     * IPv6 in IPv6\n     * IPv4 in IPv4\n",
    "prefixes": [
        "v2",
        "12/13"
    ]
}