get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 51392,
    "url": "http://patchwork.dpdk.org/api/patches/51392/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1553084044-21373-1-git-send-email-bernard.iremonger@intel.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": "<1553084044-21373-1-git-send-email-bernard.iremonger@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1553084044-21373-1-git-send-email-bernard.iremonger@intel.com",
    "date": "2019-03-20T12:14:04",
    "name": "test/ipsec: fix test initialisation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2f27bdae6da9240a13e45be94836c7efa83d755e",
    "submitter": {
        "id": 91,
        "url": "http://patchwork.dpdk.org/api/people/91/?format=api",
        "name": "Iremonger, Bernard",
        "email": "bernard.iremonger@intel.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/1553084044-21373-1-git-send-email-bernard.iremonger@intel.com/mbox/",
    "series": [
        {
            "id": 3819,
            "url": "http://patchwork.dpdk.org/api/series/3819/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=3819",
            "date": "2019-03-20T12:14:04",
            "name": "test/ipsec: fix test initialisation",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/3819/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/51392/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/51392/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E86055A4A;\n\tWed, 20 Mar 2019 13:14:12 +0100 (CET)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 557E75A44\n\tfor <dev@dpdk.org>; Wed, 20 Mar 2019 13:14:10 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Mar 2019 05:14:09 -0700",
            "from sivswdev08.ir.intel.com (HELO localhost.localdomain)\n\t([10.237.217.47])\n\tby fmsmga001.fm.intel.com with ESMTP; 20 Mar 2019 05:14:07 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,248,1549958400\"; d=\"scan'208\";a=\"156665343\"",
        "From": "Bernard Iremonger <bernard.iremonger@intel.com>",
        "To": "dev@dpdk.org,\n\tkonstantin.ananyev@intel.com,\n\takhil.goyal@nxp.com",
        "Cc": "Bernard Iremonger <bernard.iremonger@intel.com>",
        "Date": "Wed, 20 Mar 2019 12:14:04 +0000",
        "Message-Id": "<1553084044-21373-1-git-send-email-bernard.iremonger@intel.com>",
        "X-Mailer": "git-send-email 1.7.0.7",
        "Subject": "[dpdk-dev] [PATCH] test/ipsec: fix test initialisation",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Fix xform initialisation.\nFix testsuite_setup.\nLoop on rte_cryptodev_dequeue_burst().\nRemove unused variables.\n\nFixes: 05fe65eb66b2 (\"test/ipsec: introduce functional test\")\nFixes: 59d7353b0df0 (\"test/ipsec: fix test suite setup\")\n\nSigned-off-by: Bernard Iremonger <bernard.iremonger@intel.com>\n---\n app/test/test_ipsec.c | 44 +++++++++++++++++++++++---------------------\n 1 file changed, 23 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c\nindex 80a2d25..7e3fc97 100644\n--- a/app/test/test_ipsec.c\n+++ b/app/test/test_ipsec.c\n@@ -42,6 +42,7 @@\n #define OUTBOUND_SPI\t17\n #define BURST_SIZE\t\t32\n #define REORDER_PKTS\t1\n+#define DEQUEUE_COUNT\t100\n \n struct user_params {\n \tenum rte_crypto_sym_xform_type auth;\n@@ -79,7 +80,6 @@ struct ipsec_unitest_params {\n \tstruct rte_mbuf *obuf[BURST_SIZE], *ibuf[BURST_SIZE],\n \t\t*testbuf[BURST_SIZE];\n \n-\tuint8_t *digest;\n \tuint16_t pkt_index;\n };\n \n@@ -111,8 +111,6 @@ static struct ipsec_testsuite_params testsuite_params = { NULL };\n static struct ipsec_unitest_params unittest_params;\n static struct user_params uparams;\n \n-static uint8_t global_key[128] = { 0 };\n-\n struct supported_cipher_algo {\n \tconst char *keyword;\n \tenum rte_crypto_cipher_algorithm algo;\n@@ -215,30 +213,26 @@ fill_crypto_xform(struct ipsec_unitest_params *ut_params,\n \tconst struct supported_auth_algo *auth_algo,\n \tconst struct supported_cipher_algo *cipher_algo)\n {\n-\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n-\tut_params->auth_xform.auth.algo = auth_algo->algo;\n-\tut_params->auth_xform.auth.key.data = global_key;\n-\tut_params->auth_xform.auth.key.length = auth_algo->key_len;\n-\tut_params->auth_xform.auth.digest_length = auth_algo->digest_len;\n-\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n-\n \tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n \tut_params->cipher_xform.cipher.algo = cipher_algo->algo;\n-\tut_params->cipher_xform.cipher.key.data = global_key;\n-\tut_params->cipher_xform.cipher.key.length = cipher_algo->key_len;\n-\tut_params->cipher_xform.cipher.op = RTE_CRYPTO_CIPHER_OP_DECRYPT;\n-\tut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;\n-\tut_params->cipher_xform.cipher.iv.length = cipher_algo->iv_len;\n+\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n+\tut_params->auth_xform.auth.algo = auth_algo->algo;\n \n \tif (ut_params->ipsec_xform.direction ==\n \t\t\tRTE_SECURITY_IPSEC_SA_DIR_INGRESS) {\n-\t\tut_params->crypto_xforms = &ut_params->auth_xform;\n-\t\tut_params->auth_xform.next = &ut_params->cipher_xform;\n+\t\tut_params->cipher_xform.cipher.op =\n+\t\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT;\n+\t\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_VERIFY;\n \t\tut_params->cipher_xform.next = NULL;\n+\t\tut_params->auth_xform.next = &ut_params->cipher_xform;\n+\t\tut_params->crypto_xforms = &ut_params->auth_xform;\n \t} else {\n-\t\tut_params->crypto_xforms = &ut_params->cipher_xform;\n-\t\tut_params->cipher_xform.next = &ut_params->auth_xform;\n+\t\tut_params->cipher_xform.cipher.op =\n+\t\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT;\n+\t\tut_params->auth_xform.auth.op = RTE_CRYPTO_AUTH_OP_GENERATE;\n \t\tut_params->auth_xform.next = NULL;\n+\t\tut_params->cipher_xform.next = &ut_params->auth_xform;\n+\t\tut_params->crypto_xforms = &ut_params->cipher_xform;\n \t}\n }\n \n@@ -287,9 +281,12 @@ testsuite_setup(void)\n \tint rc;\n \n \tmemset(ts_params, 0, sizeof(*ts_params));\n+\tmemset(ut_params, 0, sizeof(*ut_params));\n+\tmemset(&uparams, 0, sizeof(struct user_params));\n \n \tuparams.auth = RTE_CRYPTO_SYM_XFORM_AUTH;\n \tuparams.cipher = RTE_CRYPTO_SYM_XFORM_CIPHER;\n+\tuparams.aead = RTE_CRYPTO_SYM_XFORM_NOT_SPECIFIED;\n \tstrcpy(uparams.auth_algo, \"null\");\n \tstrcpy(uparams.cipher_algo, \"null\");\n \n@@ -759,6 +756,7 @@ crypto_ipsec(uint16_t num_pkts)\n \tstruct ipsec_unitest_params *ut_params = &unittest_params;\n \tuint32_t k, ng;\n \tstruct rte_ipsec_group grp[1];\n+\tint i = 0;\n \n \t/* call crypto prepare */\n \tk = rte_ipsec_pkt_crypto_prepare(&ut_params->ss[0], ut_params->ibuf,\n@@ -774,8 +772,12 @@ crypto_ipsec(uint16_t num_pkts)\n \t\treturn TEST_FAILED;\n \t}\n \n-\tk = rte_cryptodev_dequeue_burst(ts_params->valid_dev, 0,\n-\t\tut_params->cop, num_pkts);\n+\twhile ((k = rte_cryptodev_dequeue_burst(ts_params->valid_dev, 0,\n+\t\t\tut_params->cop, num_pkts)) == 0 && i < DEQUEUE_COUNT) {\n+\t\trte_pause();\n+\t\ti++;\n+\t}\n+\n \tif (k != num_pkts) {\n \t\tRTE_LOG(ERR, USER1, \"rte_cryptodev_dequeue_burst fail\\n\");\n \t\treturn TEST_FAILED;\n",
    "prefixes": []
}