get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 43270,
    "url": "http://patches.dpdk.org/api/patches/43270/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180723131715.62875-2-roy.fan.zhang@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20180723131715.62875-2-roy.fan.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180723131715.62875-2-roy.fan.zhang@intel.com",
    "date": "2018-07-23T13:17:14",
    "name": "[v2,1/2] crypto/scheduler: add mode param parsing",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "d5e87e6162a7113b0bcda0288f3843b5f23cc505",
    "submitter": {
        "id": 304,
        "url": "http://patches.dpdk.org/api/people/304/?format=api",
        "name": "Fan Zhang",
        "email": "roy.fan.zhang@intel.com"
    },
    "delegate": {
        "id": 22,
        "url": "http://patches.dpdk.org/api/users/22/?format=api",
        "username": "pdelarag",
        "first_name": "Pablo",
        "last_name": "de Lara Guarch",
        "email": "pablo.de.lara.guarch@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180723131715.62875-2-roy.fan.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 716,
            "url": "http://patches.dpdk.org/api/series/716/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=716",
            "date": "2018-07-23T13:17:13",
            "name": "crypto/scheduler: add mode specific parameter support",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/716/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/43270/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/43270/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 E6204322C;\n\tMon, 23 Jul 2018 15:29:23 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id BC78D98\n\tfor <dev@dpdk.org>; Mon, 23 Jul 2018 15:29:20 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t23 Jul 2018 06:29:18 -0700",
            "from silpixa00398673.ir.intel.com (HELO\n\tsilpixa00398673.ger.corp.intel.com) ([10.237.223.54])\n\tby fmsmga005.fm.intel.com with ESMTP; 23 Jul 2018 06:29:14 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,393,1526367600\"; d=\"scan'208\";a=\"247583035\"",
        "From": "Fan Zhang <roy.fan.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "pablo.de.lara.guarch@intel.com",
        "Date": "Mon, 23 Jul 2018 14:17:14 +0100",
        "Message-Id": "<20180723131715.62875-2-roy.fan.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180723131715.62875-1-roy.fan.zhang@intel.com>",
        "References": "<20180622120847.72376-1-roy.fan.zhang@intel.com>\n\t<20180723131715.62875-1-roy.fan.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 1/2] crypto/scheduler: add mode param parsing",
        "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": "This patch adds the mode parameter parsing to scheduler PMD.\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n doc/guides/cryptodevs/scheduler.rst      |  5 +++++\n drivers/crypto/scheduler/scheduler_pmd.c | 22 ++++++++++++++++++++++\n 2 files changed, 27 insertions(+)",
    "diff": "diff --git a/doc/guides/cryptodevs/scheduler.rst b/doc/guides/cryptodevs/scheduler.rst\nindex d67894d55..4d7f5b152 100644\n--- a/doc/guides/cryptodevs/scheduler.rst\n+++ b/doc/guides/cryptodevs/scheduler.rst\n@@ -71,6 +71,11 @@ two calls:\n   mode parameter values are specified in the \"Cryptodev Scheduler Modes\n   Overview\" section.\n \n+* mode_param: Specify the mode-specific parameter. Some scheduling modes\n+  may be initialized with specific parameters other than the default ones,\n+  such as the **threshold** packet size of **packet-size-distr** mode. This\n+  parameter fulfills the purpose.\n+\n * ordering: Specify the status of the crypto operations ordering feature.\n   The value of this parameter can be \"enable\" or \"disable\". This feature\n   is disabled by default.\ndiff --git a/drivers/crypto/scheduler/scheduler_pmd.c b/drivers/crypto/scheduler/scheduler_pmd.c\nindex 6c5c01d63..ac9185e65 100644\n--- a/drivers/crypto/scheduler/scheduler_pmd.c\n+++ b/drivers/crypto/scheduler/scheduler_pmd.c\n@@ -9,6 +9,7 @@\n #include <rte_malloc.h>\n #include <rte_cpuflags.h>\n #include <rte_reorder.h>\n+#include <rte_string_fns.h>\n \n #include \"rte_cryptodev_scheduler.h\"\n #include \"scheduler_pmd_private.h\"\n@@ -19,6 +20,7 @@ struct scheduler_init_params {\n \tstruct rte_cryptodev_pmd_init_params def_p;\n \tuint32_t nb_slaves;\n \tenum rte_cryptodev_scheduler_mode mode;\n+\tchar mode_param_str[RTE_CRYPTODEV_SCHEDULER_NAME_MAX_LEN];\n \tuint32_t enable_ordering;\n \tuint16_t wc_pool[RTE_MAX_LCORE];\n \tuint16_t nb_wc;\n@@ -29,6 +31,7 @@ struct scheduler_init_params {\n #define RTE_CRYPTODEV_VDEV_NAME\t\t\t(\"name\")\n #define RTE_CRYPTODEV_VDEV_SLAVE\t\t(\"slave\")\n #define RTE_CRYPTODEV_VDEV_MODE\t\t\t(\"mode\")\n+#define RTE_CRYPTODEV_VDEV_MODE_PARAM\t\t(\"mode_param\")\n #define RTE_CRYPTODEV_VDEV_ORDERING\t\t(\"ordering\")\n #define RTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG\t(\"max_nb_queue_pairs\")\n #define RTE_CRYPTODEV_VDEV_SOCKET_ID\t\t(\"socket_id\")\n@@ -39,6 +42,7 @@ const char *scheduler_valid_params[] = {\n \tRTE_CRYPTODEV_VDEV_NAME,\n \tRTE_CRYPTODEV_VDEV_SLAVE,\n \tRTE_CRYPTODEV_VDEV_MODE,\n+\tRTE_CRYPTODEV_VDEV_MODE_PARAM,\n \tRTE_CRYPTODEV_VDEV_ORDERING,\n \tRTE_CRYPTODEV_VDEV_MAX_NB_QP_ARG,\n \tRTE_CRYPTODEV_VDEV_SOCKET_ID,\n@@ -346,6 +350,7 @@ parse_mode_arg(const char *key __rte_unused,\n \t\tif (strcmp(value, scheduler_mode_map[i].name) == 0) {\n \t\t\tparam->mode = (enum rte_cryptodev_scheduler_mode)\n \t\t\t\t\tscheduler_mode_map[i].val;\n+\n \t\t\tbreak;\n \t\t}\n \t}\n@@ -359,6 +364,18 @@ parse_mode_arg(const char *key __rte_unused,\n }\n \n static int\n+parse_mode_param_arg(const char *key __rte_unused,\n+\t\tconst char *value, void *extra_args)\n+{\n+\tstruct scheduler_init_params *param = extra_args;\n+\n+\tstrlcpy(param->mode_param_str, value,\n+\t\t\tRTE_CRYPTODEV_SCHEDULER_NAME_MAX_LEN);\n+\n+\treturn 0;\n+}\n+\n+static int\n parse_ordering_arg(const char *key __rte_unused,\n \t\tconst char *value, void *extra_args)\n {\n@@ -438,6 +455,11 @@ scheduler_parse_init_params(struct scheduler_init_params *params,\n \t\tif (ret < 0)\n \t\t\tgoto free_kvlist;\n \n+\t\tret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_MODE_PARAM,\n+\t\t\t\t&parse_mode_param_arg, params);\n+\t\tif (ret < 0)\n+\t\t\tgoto free_kvlist;\n+\n \t\tret = rte_kvargs_process(kvlist, RTE_CRYPTODEV_VDEV_ORDERING,\n \t\t\t\t&parse_ordering_arg, params);\n \t\tif (ret < 0)\n",
    "prefixes": [
        "v2",
        "1/2"
    ]
}