get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77216,
    "url": "http://patches.dpdk.org/api/patches/77216/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1599763717-135002-8-git-send-email-savinay.dharmappa@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": "<1599763717-135002-8-git-send-email-savinay.dharmappa@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1599763717-135002-8-git-send-email-savinay.dharmappa@intel.com",
    "date": "2020-09-10T18:48:34",
    "name": "[v2,07/10] example/ip_pipeline: add dynamic config of subport",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a77e5ff0f9fc6bb0581c757efe805a5f8f829706",
    "submitter": {
        "id": 1535,
        "url": "http://patches.dpdk.org/api/people/1535/?format=api",
        "name": "Savinay Dharmappa",
        "email": "savinay.dharmappa@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1599763717-135002-8-git-send-email-savinay.dharmappa@intel.com/mbox/",
    "series": [
        {
            "id": 12110,
            "url": "http://patches.dpdk.org/api/series/12110/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12110",
            "date": "2020-09-10T18:48:27",
            "name": "Enable dynamic config of subport bandwidth",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/12110/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77216/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/77216/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 0A7AEA04B5;\n\tThu, 10 Sep 2020 20:49:58 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B3AB11C124;\n\tThu, 10 Sep 2020 20:49:01 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id A10DD1C0D7\n for <dev@dpdk.org>; Thu, 10 Sep 2020 20:48:55 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Sep 2020 11:48:55 -0700",
            "from silpixa00400629.ir.intel.com ([10.237.214.135])\n by orsmga007.jf.intel.com with ESMTP; 10 Sep 2020 11:48:53 -0700"
        ],
        "IronPort-SDR": [
            "\n Wf+Bz2nAuA3qO5fiGrPRmpxU0A9DiUPHFCJwl5jvKQknK5QkupC2cTD7Gh3GFhgLUHCTfdFMcy\n GCxEz1FHfvag==",
            "\n UD6GXHOgncDycQKkwqZ88LecOpvSk8+LiNZUFU6/F7T6DVEYdPtlpqGDBBoF+NmYsvL7FUrgLb\n qz/HhaAfDw5w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9740\"; a=\"138130677\"",
            "E=Sophos;i=\"5.76,413,1592895600\"; d=\"scan'208\";a=\"138130677\"",
            "E=Sophos;i=\"5.76,413,1592895600\"; d=\"scan'208\";a=\"344371121\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Savinay Dharmappa <savinay.dharmappa@intel.com>",
        "To": "jasvinder.singh@intel.com,\n\tcristian.dumitrescu@intel.com,\n\tdev@dpdk.org",
        "Cc": "savinay.dharmappa@intel.com",
        "Date": "Thu, 10 Sep 2020 19:48:34 +0100",
        "Message-Id": "<1599763717-135002-8-git-send-email-savinay.dharmappa@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1599763717-135002-1-git-send-email-savinay.dharmappa@intel.com>",
        "References": "<1599037006-3931-1-git-send-email-savinay.dharmappa@intel.com>\n <1599763717-135002-1-git-send-email-savinay.dharmappa@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 07/10] example/ip_pipeline: add dynamic config\n\tof subport",
        "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": "Modify the ip_pipeline application to build the hierarchical scheduler\nwith default subport bandwidth profile. It also allows to configure\na subport with different subport bandwidth profile dynamically\n\nSigned-off-by: Savinay Dharmappa <savinay.dharmappa@intel.com>\n---\n examples/ip_pipeline/cli.c  | 10 ++++++----\n examples/ip_pipeline/tmgr.c | 28 +++++++++++++++++++++++++---\n examples/ip_pipeline/tmgr.h |  3 ++-\n 3 files changed, 33 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c\nindex d79699e..e192275 100644\n--- a/examples/ip_pipeline/cli.c\n+++ b/examples/ip_pipeline/cli.c\n@@ -406,7 +406,8 @@ cmd_tmgr_subport_profile(char **tokens,\n \tchar *out,\n \tsize_t out_size)\n {\n-\tstruct rte_sched_subport_params p;\n+\tstruct rte_sched_subport_params params;\n+\tstruct rte_sched_subport_profile_params p;\n \tint status, i;\n \n \tif (n_tokens != 35) {\n@@ -440,7 +441,8 @@ cmd_tmgr_subport_profile(char **tokens,\n \t\treturn;\n \t}\n \n-\tif (parser_read_uint32(&p.n_pipes_per_subport_enabled, tokens[20]) != 0) {\n+\tif (parser_read_uint32(&params.n_pipes_per_subport_enabled,\n+\t\ttokens[20]) != 0) {\n \t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"n_pipes_per_subport\");\n \t\treturn;\n \t}\n@@ -451,12 +453,12 @@ cmd_tmgr_subport_profile(char **tokens,\n \t}\n \n \tfor (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++)\n-\t\tif (parser_read_uint16(&p.qsize[i], tokens[22 + i]) != 0) {\n+\t\tif (parser_read_uint16(&params.qsize[i], tokens[22 + i]) != 0) {\n \t\t\tsnprintf(out, out_size, MSG_ARG_INVALID, \"qsize\");\n \t\t\treturn;\n \t\t}\n \n-\tstatus = tmgr_subport_profile_add(&p);\n+\tstatus = tmgr_subport_profile_add(&p, &params);\n \tif (status != 0) {\n \t\tsnprintf(out, out_size, MSG_CMD_FAIL, tokens[0]);\n \t\treturn;\ndiff --git a/examples/ip_pipeline/tmgr.c b/examples/ip_pipeline/tmgr.c\nindex 91ccbf6..c609102 100644\n--- a/examples/ip_pipeline/tmgr.c\n+++ b/examples/ip_pipeline/tmgr.c\n@@ -11,6 +11,9 @@\n static struct rte_sched_subport_params\n \tsubport_profile[TMGR_SUBPORT_PROFILE_MAX];\n \n+static struct rte_sched_subport_profile_params\n+\t\tprofile_params[TMGR_SUBPORT_PROFILE_MAX];\n+\n static uint32_t n_subport_profiles;\n \n static struct rte_sched_pipe_params\n@@ -44,15 +47,20 @@ tmgr_port_find(const char *name)\n }\n \n int\n-tmgr_subport_profile_add(struct rte_sched_subport_params *p)\n+tmgr_subport_profile_add(struct rte_sched_subport_profile_params *p,\n+\t\t\t struct rte_sched_subport_params *params)\n {\n \t/* Check input params */\n-\tif (p == NULL ||\n-\t\tp->n_pipes_per_subport_enabled == 0)\n+\tif (p == NULL || params == NULL ||\n+\t\tparams->n_pipes_per_subport_enabled == 0)\n \t\treturn -1;\n \n \t/* Save profile */\n \tmemcpy(&subport_profile[n_subport_profiles],\n+\t\tparams,\n+\t\tsizeof(*params));\n+\n+\tmemcpy(&profile_params[n_subport_profiles],\n \t\tp,\n \t\tsizeof(*p));\n \n@@ -103,6 +111,9 @@ tmgr_port_create(const char *name, struct tmgr_port_params *params)\n \tp.mtu = params->mtu;\n \tp.frame_overhead = params->frame_overhead;\n \tp.n_subports_per_port = params->n_subports_per_port;\n+\tp.n_subport_profiles = n_subport_profiles;\n+\tp.subport_profiles = profile_params;\n+\tp.n_max_subport_profiles = TMGR_SUBPORT_PROFILE_MAX;\n \tp.n_pipes_per_subport = TMGR_PIPE_SUBPORT_MAX;\n \n \ts = rte_sched_port_config(&p);\n@@ -126,6 +137,13 @@ tmgr_port_create(const char *name, struct tmgr_port_params *params)\n \t\t\treturn NULL;\n \t\t}\n \n+\t\tstatus = rte_sched_subport_profile_config(s, i, 0);\n+\n+\t\tif (status) {\n+\t\t\trte_sched_port_free(s);\n+\t\t\treturn NULL;\n+\t\t}\n+\n \t\tfor (j = 0; j < subport_profile[0].n_pipes_per_subport_enabled; j++) {\n \t\t\tstatus = rte_sched_pipe_config(\n \t\t\t\ts,\n@@ -182,6 +200,10 @@ tmgr_subport_config(const char *port_name,\n \t\tsubport_id,\n \t\t&subport_profile[subport_profile_id]);\n \n+\tif (!status)\n+\t\tstatus = rte_sched_subport_profile_config(port->s, subport_id,\n+\t\t\t\t\t\t\tsubport_profile_id);\n+\n \treturn status;\n }\n \ndiff --git a/examples/ip_pipeline/tmgr.h b/examples/ip_pipeline/tmgr.h\nindex ee50cf7..b19fb23 100644\n--- a/examples/ip_pipeline/tmgr.h\n+++ b/examples/ip_pipeline/tmgr.h\n@@ -48,7 +48,8 @@ struct tmgr_port_params {\n };\n \n int\n-tmgr_subport_profile_add(struct rte_sched_subport_params *p);\n+tmgr_subport_profile_add(struct rte_sched_subport_profile_params *p,\n+\t\t\t struct rte_sched_subport_params *params);\n \n int\n tmgr_pipe_profile_add(struct rte_sched_pipe_params *p);\n",
    "prefixes": [
        "v2",
        "07/10"
    ]
}