get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48394,
    "url": "https://patches.dpdk.org/api/patches/48394/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1543470882-145287-1-git-send-email-nikhil.rao@intel.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": "<1543470882-145287-1-git-send-email-nikhil.rao@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1543470882-145287-1-git-send-email-nikhil.rao@intel.com",
    "date": "2018-11-29T05:54:42",
    "name": "ethdev: support double precision RED queue weight",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "9811084137003a8a9ca60a5d6678542951bce6f0",
    "submitter": {
        "id": 528,
        "url": "https://patches.dpdk.org/api/people/528/?format=api",
        "name": "Rao, Nikhil",
        "email": "nikhil.rao@intel.com"
    },
    "delegate": {
        "id": 10018,
        "url": "https://patches.dpdk.org/api/users/10018/?format=api",
        "username": "cristian_dumitrescu",
        "first_name": "Cristian",
        "last_name": "Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1543470882-145287-1-git-send-email-nikhil.rao@intel.com/mbox/",
    "series": [
        {
            "id": 2602,
            "url": "https://patches.dpdk.org/api/series/2602/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=2602",
            "date": "2018-11-29T05:54:42",
            "name": "ethdev: support double precision RED queue weight",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/2602/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/48394/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/48394/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 3AEFB1B3B7;\n\tThu, 29 Nov 2018 06:56:16 +0100 (CET)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id 2C6281B3B3\n\tfor <dev@dpdk.org>; Thu, 29 Nov 2018 06:56:14 +0100 (CET)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Nov 2018 21:56:13 -0800",
            "from unknown (HELO broadwell-dev-4.localdomain) ([10.224.122.193])\n\tby fmsmga008.fm.intel.com with ESMTP; 28 Nov 2018 21:56:12 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.56,293,1539673200\"; d=\"scan'208\";a=\"97449113\"",
        "From": "Nikhil Rao <nikhil.rao@intel.com>",
        "To": "cristian.dumitrescu@intel.com,\n\tjasvinder.singh@intel.com",
        "Cc": "dev@dpdk.org,\n\tNikhil Rao <nikhil.rao@intel.com>",
        "Date": "Thu, 29 Nov 2018 11:24:42 +0530",
        "Message-Id": "<1543470882-145287-1-git-send-email-nikhil.rao@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Subject": "[dpdk-dev] [PATCH] ethdev: support double precision RED queue weight",
        "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": "RED queue weight is currently specified as a negated log of 2.\n\nAdd support for RED queue weight to be specified in double precision\nand TM capability flags for double precision and negated log2\nRED queue weight support.\n\nSigned-off-by: Nikhil Rao <nikhil.rao@intel.com>\n---\n lib/librte_ethdev/rte_tm.h               | 41 ++++++++++++++++++++++++++++++--\n drivers/net/softnic/rte_eth_softnic_tm.c |  7 ++++--\n 2 files changed, 44 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/lib/librte_ethdev/rte_tm.h b/lib/librte_ethdev/rte_tm.h\nindex 646ef38..b13454d 100644\n--- a/lib/librte_ethdev/rte_tm.h\n+++ b/lib/librte_ethdev/rte_tm.h\n@@ -393,6 +393,22 @@ struct rte_tm_capabilities {\n \t */\n \tint cman_wred_byte_mode_supported;\n \n+\t/** Double precision RED queue weight support. When non-zero, this\n+\t * this parameter indicates that RED queue weight in double precision\n+\t * format is supported.\n+\t * @see struct rte_tm_red_params::wq_is_log2\n+\t * @see struct rte_tm_red_params::wq_dp\n+\t */\n+\tint cman_wred_wq_dp_supported;\n+\n+\t/** Negated log2 RED queue weight support. When non-zero, this\n+\t * parameter indicates that RED queue weight in negated log2 format\n+\t * is supported.\n+\t * @see struct rte_tm_red_params::wq_is_log2\n+\t * @see struct rte_tm_red_params::wq_log2\n+\t */\n+\tint cman_wred_wq_log2_supported;\n+\n \t/** Head drop algorithm support. When non-zero, this parameter\n \t * indicates that there is at least one leaf node that supports the head\n \t * drop algorithm, which might not be true for all the leaf nodes.\n@@ -841,8 +857,27 @@ struct rte_tm_red_params {\n \t */\n \tuint16_t maxp_inv;\n \n-\t/** Negated log2 of queue weight (wq), i.e. wq = 1 / (2 ^ wq_log2) */\n-\tuint16_t wq_log2;\n+\t/** When non-zero, RED queue weight (wq) is negated log2 of queue\n+\t * weight\n+\t *\n+\t * @see struct rte_tm_capabilities::cman_wred_wq_dp_supported\n+\t * @see struct rte_tm_capabilities::cman_wred_wq_log2_supported\n+\t */\n+\tint wq_is_log2;\n+\n+\tunion {\n+\t\t/** Double precision queue weight\n+\t\t *\n+\t\t * @see struct rte_tm_capabilities::cman_wred_wq_dp_supported\n+\t\t */\n+\t\tdouble wq_dp;\n+\t\t/** Negated log2 of queue weight (wq),\n+\t\t * i.e. wq = 1 / (2 ^ wq_log2)\n+\t\t *\n+\t\t * @see struct rte_tm_capabilities::cman_wred_wq_log2_supported\n+\t\t */\n+\t\tuint16_t wq_log2;\n+\t};\n };\n \n /**\n@@ -858,6 +893,8 @@ struct rte_tm_red_params {\n  *\n  * @see struct rte_tm_capabilities::cman_wred_packet_mode_supported\n  * @see struct rte_tm_capabilities::cman_wred_byte_mode_supported\n+ * @see struct rte_tm_capabilities::cman_wred_wq_dp_supported\n+ * @see struct rte_tm_capabilities::cman_wred_wq_log2_supported\n  */\n struct rte_tm_wred_params {\n \t/** One set of RED parameters per packet color */\ndiff --git a/drivers/net/softnic/rte_eth_softnic_tm.c b/drivers/net/softnic/rte_eth_softnic_tm.c\nindex baaafbe..e96ea8e 100644\n--- a/drivers/net/softnic/rte_eth_softnic_tm.c\n+++ b/drivers/net/softnic/rte_eth_softnic_tm.c\n@@ -469,7 +469,8 @@ struct softnic_tmgr_port *\n \t.cman_wred_context_shared_n_max = 0,\n \t.cman_wred_context_shared_n_nodes_per_context_max = 0,\n \t.cman_wred_context_shared_n_contexts_per_node_max = 0,\n-\n+\t.cman_wred_wq_dp_supported = 0,\n+\t.cman_wred_wq_log2_supported = WRED_SUPPORTED,\n \t.mark_vlan_dei_supported = {0, 0, 0},\n \t.mark_ip_ecn_tcp_supported = {0, 0, 0},\n \t.mark_ip_ecn_sctp_supported = {0, 0, 0},\n@@ -1243,8 +1244,10 @@ struct softnic_tmgr_port *\n \tfor (color = RTE_TM_GREEN; color < RTE_TM_COLORS; color++) {\n \t\tuint32_t min_th = profile->red_params[color].min_th;\n \t\tuint32_t max_th = profile->red_params[color].max_th;\n+\t\tint wq_is_log2 = profile->red_params[color].wq_is_log2;\n \n-\t\tif (min_th > max_th ||\n+\t\tif (wq_is_log2 == 0 ||\n+\t\t\tmin_th > max_th ||\n \t\t\tmax_th == 0 ||\n \t\t\tmin_th > UINT16_MAX ||\n \t\t\tmax_th > UINT16_MAX)\n",
    "prefixes": []
}