get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80373,
    "url": "https://patches.dpdk.org/api/patches/80373/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201012141006.31463-8-akhil.goyal@nxp.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": "<20201012141006.31463-8-akhil.goyal@nxp.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201012141006.31463-8-akhil.goyal@nxp.com",
    "date": "2020-10-12T14:10:05",
    "name": "[v3,7/8] test/crypto: Modify test_pdcp_proto to take parameters",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a9ce9f453fcee2ae5a95bc3452b46c072a4ab372",
    "submitter": {
        "id": 517,
        "url": "https://patches.dpdk.org/api/people/517/?format=api",
        "name": "Akhil Goyal",
        "email": "akhil.goyal@nxp.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/20201012141006.31463-8-akhil.goyal@nxp.com/mbox/",
    "series": [
        {
            "id": 12883,
            "url": "https://patches.dpdk.org/api/series/12883/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=12883",
            "date": "2020-10-12T14:09:58",
            "name": "support PDCP-SDAP for dpaa2_sec",
            "version": 3,
            "mbox": "https://patches.dpdk.org/series/12883/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/80373/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/80373/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 39E5FA04B6;\n\tMon, 12 Oct 2020 16:12:44 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4BB0F1D918;\n\tMon, 12 Oct 2020 16:10:32 +0200 (CEST)",
            "from inva021.nxp.com (inva021.nxp.com [92.121.34.21])\n by dpdk.org (Postfix) with ESMTP id 2AC7A1D8D6;\n Mon, 12 Oct 2020 16:10:25 +0200 (CEST)",
            "from inva021.nxp.com (localhost [127.0.0.1])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 0BF45200E0D;\n Mon, 12 Oct 2020 16:10:24 +0200 (CEST)",
            "from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com\n [165.114.16.14])\n by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 6A415200E29;\n Mon, 12 Oct 2020 16:10:20 +0200 (CEST)",
            "from lsv03273.swis.in-blr01.nxp.com (lsv03273.swis.in-blr01.nxp.com\n [92.120.147.113])\n by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 266F04032B;\n Mon, 12 Oct 2020 16:10:13 +0200 (CEST)"
        ],
        "From": "Akhil Goyal <akhil.goyal@nxp.com>",
        "To": "dev@dpdk.org,\n\ttechboard@dpdk.org",
        "Cc": "thomas@monjalon.net, anoobj@marvell.com, hemant.agrawal@nxp.com,\n declan.doherty@intel.com, david.coyle@intel.com,\n Franck Lenormand <franck.lenormand@nxp.com>",
        "Date": "Mon, 12 Oct 2020 19:40:05 +0530",
        "Message-Id": "<20201012141006.31463-8-akhil.goyal@nxp.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20201012141006.31463-1-akhil.goyal@nxp.com>",
        "References": "<20201011213403.21169-1-akhil.goyal@nxp.com>\n <20201012141006.31463-1-akhil.goyal@nxp.com>",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [PATCH v3 7/8] test/crypto: Modify test_pdcp_proto to\n\ttake parameters",
        "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 <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: Franck Lenormand <franck.lenormand@nxp.com>\n\nThe function test_pdcp_proto was relying to heavily on the structure\nof test vectors for PDCP making it difficult to be reusable.\n\nThe function is changed to take all the test parameters as input and\ndoes not need access to the tests vectors anymore.\n\nSigned-off-by: Franck Lenormand <franck.lenormand@nxp.com>\n---\n app/test/test_cryptodev.c | 183 ++++++++++++++++++++++----------------\n 1 file changed, 104 insertions(+), 79 deletions(-)",
    "diff": "diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c\nindex ac2a36bc2..7cea914f9 100644\n--- a/app/test/test_cryptodev.c\n+++ b/app/test/test_cryptodev.c\n@@ -7121,14 +7121,18 @@ security_proto_supported(enum rte_security_session_action_type action,\n  * on input_vec. Checks the output of the crypto operation against\n  * output_vec.\n  */\n-static int\n-test_pdcp_proto(int i, int oop,\n-\tenum rte_crypto_cipher_operation opc,\n-\tenum rte_crypto_auth_operation opa,\n-\tuint8_t *input_vec,\n-\tunsigned int input_vec_len,\n-\tuint8_t *output_vec,\n-\tunsigned int output_vec_len)\n+static int test_pdcp_proto(int i, int oop, enum rte_crypto_cipher_operation opc,\n+\t\t\t   enum rte_crypto_auth_operation opa,\n+\t\t\t   const uint8_t *input_vec, unsigned int input_vec_len,\n+\t\t\t   const uint8_t *output_vec,\n+\t\t\t   unsigned int output_vec_len,\n+\t\t\t   enum rte_crypto_cipher_algorithm cipher_alg,\n+\t\t\t   const uint8_t *cipher_key, uint32_t cipher_key_len,\n+\t\t\t   enum rte_crypto_auth_algorithm auth_alg,\n+\t\t\t   const uint8_t *auth_key, uint32_t auth_key_len,\n+\t\t\t   uint8_t bearer, enum rte_security_pdcp_domain domain,\n+\t\t\t   uint8_t packet_direction, uint8_t sn_size,\n+\t\t\t   uint32_t hfn, uint32_t hfn_threshold, uint8_t sdap)\n {\n \tstruct crypto_testsuite_params *ts_params = &testsuite_params;\n \tstruct crypto_unittest_params *ut_params = &unittest_params;\n@@ -7143,7 +7147,7 @@ test_pdcp_proto(int i, int oop,\n \n \tsec_cap_idx.action = ut_params->type;\n \tsec_cap_idx.protocol = RTE_SECURITY_PROTOCOL_PDCP;\n-\tsec_cap_idx.pdcp.domain = pdcp_test_params[i].domain;\n+\tsec_cap_idx.pdcp.domain = domain;\n \tif (rte_security_capability_get(ctx, &sec_cap_idx) == NULL)\n \t\treturn -ENOTSUP;\n \n@@ -7169,24 +7173,22 @@ test_pdcp_proto(int i, int oop,\n \n \t/* Setup Cipher Parameters */\n \tut_params->cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;\n-\tut_params->cipher_xform.cipher.algo = pdcp_test_params[i].cipher_alg;\n+\tut_params->cipher_xform.cipher.algo = cipher_alg;\n \tut_params->cipher_xform.cipher.op = opc;\n-\tut_params->cipher_xform.cipher.key.data = pdcp_test_crypto_key[i];\n-\tut_params->cipher_xform.cipher.key.length =\n-\t\t\t\t\tpdcp_test_params[i].cipher_key_len;\n+\tut_params->cipher_xform.cipher.key.data = cipher_key;\n+\tut_params->cipher_xform.cipher.key.length = cipher_key_len;\n \tut_params->cipher_xform.cipher.iv.length =\n-\t\t\t\tpdcp_test_packet_direction[i] ? 4 : 0;\n+\t\t\t\tpacket_direction ? 4 : 0;\n \tut_params->cipher_xform.cipher.iv.offset = IV_OFFSET;\n \n \t/* Setup HMAC Parameters if ICV header is required */\n-\tif (pdcp_test_params[i].auth_alg != 0) {\n+\tif (auth_alg != 0) {\n \t\tut_params->auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;\n \t\tut_params->auth_xform.next = NULL;\n-\t\tut_params->auth_xform.auth.algo = pdcp_test_params[i].auth_alg;\n+\t\tut_params->auth_xform.auth.algo = auth_alg;\n \t\tut_params->auth_xform.auth.op = opa;\n-\t\tut_params->auth_xform.auth.key.data = pdcp_test_auth_key[i];\n-\t\tut_params->auth_xform.auth.key.length =\n-\t\t\t\t\tpdcp_test_params[i].auth_key_len;\n+\t\tut_params->auth_xform.auth.key.data = auth_key;\n+\t\tut_params->auth_xform.auth.key.length = auth_key_len;\n \n \t\tut_params->cipher_xform.next = &ut_params->auth_xform;\n \t} else {\n@@ -7197,22 +7199,22 @@ test_pdcp_proto(int i, int oop,\n \t\t.action_type = ut_params->type,\n \t\t.protocol = RTE_SECURITY_PROTOCOL_PDCP,\n \t\t{.pdcp = {\n-\t\t\t.bearer = pdcp_test_bearer[i],\n-\t\t\t.domain = pdcp_test_params[i].domain,\n-\t\t\t.pkt_dir = pdcp_test_packet_direction[i],\n-\t\t\t.sn_size = pdcp_test_data_sn_size[i],\n-\t\t\t.hfn = pdcp_test_packet_direction[i] ?\n-\t\t\t\t0 : pdcp_test_hfn[i],\n-\t\t\t\t/**\n-\t\t\t\t * hfn can be set as pdcp_test_hfn[i]\n-\t\t\t\t * if hfn_ovrd is not set. Here, PDCP\n-\t\t\t\t * packet direction is just used to\n-\t\t\t\t * run half of the cases with session\n-\t\t\t\t * HFN and other half with per packet\n-\t\t\t\t * HFN.\n-\t\t\t\t */\n-\t\t\t.hfn_threshold = pdcp_test_hfn_threshold[i],\n-\t\t\t.hfn_ovrd = pdcp_test_packet_direction[i] ? 1 : 0,\n+\t\t\t.bearer = bearer,\n+\t\t\t.domain = domain,\n+\t\t\t.pkt_dir = packet_direction,\n+\t\t\t.sn_size = sn_size,\n+\t\t\t.hfn = packet_direction ? 0 : hfn,\n+\t\t\t/**\n+\t\t\t * hfn can be set as pdcp_test_hfn[i]\n+\t\t\t * if hfn_ovrd is not set. Here, PDCP\n+\t\t\t * packet direction is just used to\n+\t\t\t * run half of the cases with session\n+\t\t\t * HFN and other half with per packet\n+\t\t\t * HFN.\n+\t\t\t */\n+\t\t\t.hfn_threshold = hfn_threshold,\n+\t\t\t.hfn_ovrd = packet_direction ? 1 : 0,\n+\t\t\t.sdap_enabled = sdap,\n \t\t} },\n \t\t.crypto_xform = &ut_params->cipher_xform\n \t};\n@@ -7241,7 +7243,7 @@ test_pdcp_proto(int i, int oop,\n \n \tuint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ut_params->op,\n \t\t\t\t\tuint32_t *, IV_OFFSET);\n-\t*per_pkt_hfn = pdcp_test_packet_direction[i] ? pdcp_test_hfn[i] : 0;\n+\t*per_pkt_hfn = packet_direction ? hfn : 0;\n \n \trte_security_attach_session(ut_params->op, ut_params->sec_session);\n \n@@ -7582,74 +7584,97 @@ test_pdcp_proto_SGL(int i, int oop,\n int\n test_pdcp_proto_cplane_encap(int i)\n {\n-\treturn test_pdcp_proto(i, 0,\n-\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT,\n-\t\tRTE_CRYPTO_AUTH_OP_GENERATE,\n-\t\tpdcp_test_data_in[i],\n-\t\tpdcp_test_data_in_len[i],\n-\t\tpdcp_test_data_out[i],\n-\t\tpdcp_test_data_in_len[i]+4);\n+\treturn test_pdcp_proto(\n+\t\ti, 0, RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_AUTH_OP_GENERATE,\n+\t\tpdcp_test_data_in[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_data_out[i], pdcp_test_data_in_len[i] + 4,\n+\t\tpdcp_test_params[i].cipher_alg, pdcp_test_crypto_key[i],\n+\t\tpdcp_test_params[i].cipher_key_len,\n+\t\tpdcp_test_params[i].auth_alg, pdcp_test_auth_key[i],\n+\t\tpdcp_test_params[i].auth_key_len, pdcp_test_bearer[i],\n+\t\tpdcp_test_params[i].domain, pdcp_test_packet_direction[i],\n+\t\tpdcp_test_data_sn_size[i], pdcp_test_hfn[i],\n+\t\tpdcp_test_hfn_threshold[i], SDAP_DISABLED);\n }\n \n int\n test_pdcp_proto_uplane_encap(int i)\n {\n-\treturn test_pdcp_proto(i, 0,\n-\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT,\n-\t\tRTE_CRYPTO_AUTH_OP_GENERATE,\n-\t\tpdcp_test_data_in[i],\n-\t\tpdcp_test_data_in_len[i],\n-\t\tpdcp_test_data_out[i],\n-\t\tpdcp_test_data_in_len[i]);\n-\n+\treturn test_pdcp_proto(\n+\t\ti, 0, RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_AUTH_OP_GENERATE,\n+\t\tpdcp_test_data_in[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_data_out[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_params[i].cipher_alg, pdcp_test_crypto_key[i],\n+\t\tpdcp_test_params[i].cipher_key_len,\n+\t\tpdcp_test_params[i].auth_alg, pdcp_test_auth_key[i],\n+\t\tpdcp_test_params[i].auth_key_len, pdcp_test_bearer[i],\n+\t\tpdcp_test_params[i].domain, pdcp_test_packet_direction[i],\n+\t\tpdcp_test_data_sn_size[i], pdcp_test_hfn[i],\n+\t\tpdcp_test_hfn_threshold[i], SDAP_DISABLED);\n }\n \n int\n test_pdcp_proto_uplane_encap_with_int(int i)\n {\n-\treturn test_pdcp_proto(i, 0,\n-\t\tRTE_CRYPTO_CIPHER_OP_ENCRYPT,\n-\t\tRTE_CRYPTO_AUTH_OP_GENERATE,\n-\t\tpdcp_test_data_in[i],\n-\t\tpdcp_test_data_in_len[i],\n-\t\tpdcp_test_data_out[i],\n-\t\tpdcp_test_data_in_len[i] + 4);\n+\treturn test_pdcp_proto(\n+\t\ti, 0, RTE_CRYPTO_CIPHER_OP_ENCRYPT, RTE_CRYPTO_AUTH_OP_GENERATE,\n+\t\tpdcp_test_data_in[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_data_out[i], pdcp_test_data_in_len[i] + 4,\n+\t\tpdcp_test_params[i].cipher_alg, pdcp_test_crypto_key[i],\n+\t\tpdcp_test_params[i].cipher_key_len,\n+\t\tpdcp_test_params[i].auth_alg, pdcp_test_auth_key[i],\n+\t\tpdcp_test_params[i].auth_key_len, pdcp_test_bearer[i],\n+\t\tpdcp_test_params[i].domain, pdcp_test_packet_direction[i],\n+\t\tpdcp_test_data_sn_size[i], pdcp_test_hfn[i],\n+\t\tpdcp_test_hfn_threshold[i], SDAP_DISABLED);\n }\n \n int\n test_pdcp_proto_cplane_decap(int i)\n {\n-\treturn test_pdcp_proto(i, 0,\n-\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT,\n-\t\tRTE_CRYPTO_AUTH_OP_VERIFY,\n-\t\tpdcp_test_data_out[i],\n-\t\tpdcp_test_data_in_len[i] + 4,\n-\t\tpdcp_test_data_in[i],\n-\t\tpdcp_test_data_in_len[i]);\n+\treturn test_pdcp_proto(\n+\t\ti, 0, RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_AUTH_OP_VERIFY,\n+\t\tpdcp_test_data_out[i], pdcp_test_data_in_len[i] + 4,\n+\t\tpdcp_test_data_in[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_params[i].cipher_alg, pdcp_test_crypto_key[i],\n+\t\tpdcp_test_params[i].cipher_key_len,\n+\t\tpdcp_test_params[i].auth_alg, pdcp_test_auth_key[i],\n+\t\tpdcp_test_params[i].auth_key_len, pdcp_test_bearer[i],\n+\t\tpdcp_test_params[i].domain, pdcp_test_packet_direction[i],\n+\t\tpdcp_test_data_sn_size[i], pdcp_test_hfn[i],\n+\t\tpdcp_test_hfn_threshold[i], SDAP_DISABLED);\n }\n \n int\n test_pdcp_proto_uplane_decap(int i)\n {\n-\treturn test_pdcp_proto(i, 0,\n-\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT,\n-\t\tRTE_CRYPTO_AUTH_OP_VERIFY,\n-\t\tpdcp_test_data_out[i],\n-\t\tpdcp_test_data_in_len[i],\n-\t\tpdcp_test_data_in[i],\n-\t\tpdcp_test_data_in_len[i]);\n+\treturn test_pdcp_proto(\n+\t\ti, 0, RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_AUTH_OP_VERIFY,\n+\t\tpdcp_test_data_out[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_data_in[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_params[i].cipher_alg, pdcp_test_crypto_key[i],\n+\t\tpdcp_test_params[i].cipher_key_len,\n+\t\tpdcp_test_params[i].auth_alg, pdcp_test_auth_key[i],\n+\t\tpdcp_test_params[i].auth_key_len, pdcp_test_bearer[i],\n+\t\tpdcp_test_params[i].domain, pdcp_test_packet_direction[i],\n+\t\tpdcp_test_data_sn_size[i], pdcp_test_hfn[i],\n+\t\tpdcp_test_hfn_threshold[i], SDAP_DISABLED);\n }\n \n int\n test_pdcp_proto_uplane_decap_with_int(int i)\n {\n-\treturn test_pdcp_proto(i, 0,\n-\t\tRTE_CRYPTO_CIPHER_OP_DECRYPT,\n-\t\tRTE_CRYPTO_AUTH_OP_VERIFY,\n-\t\tpdcp_test_data_out[i],\n-\t\tpdcp_test_data_in_len[i] + 4,\n-\t\tpdcp_test_data_in[i],\n-\t\tpdcp_test_data_in_len[i]);\n+\treturn test_pdcp_proto(\n+\t\ti, 0, RTE_CRYPTO_CIPHER_OP_DECRYPT, RTE_CRYPTO_AUTH_OP_VERIFY,\n+\t\tpdcp_test_data_out[i], pdcp_test_data_in_len[i] + 4,\n+\t\tpdcp_test_data_in[i], pdcp_test_data_in_len[i],\n+\t\tpdcp_test_params[i].cipher_alg, pdcp_test_crypto_key[i],\n+\t\tpdcp_test_params[i].cipher_key_len,\n+\t\tpdcp_test_params[i].auth_alg, pdcp_test_auth_key[i],\n+\t\tpdcp_test_params[i].auth_key_len, pdcp_test_bearer[i],\n+\t\tpdcp_test_params[i].domain, pdcp_test_packet_direction[i],\n+\t\tpdcp_test_data_sn_size[i], pdcp_test_hfn[i],\n+\t\tpdcp_test_hfn_threshold[i], SDAP_DISABLED);\n }\n \n static int\n",
    "prefixes": [
        "v3",
        "7/8"
    ]
}