get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 7137,
    "url": "https://patches.dpdk.org/api/patches/7137/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1443074591-19803-6-git-send-email-jingjing.wu@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": "<1443074591-19803-6-git-send-email-jingjing.wu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1443074591-19803-6-git-send-email-jingjing.wu@intel.com",
    "date": "2015-09-24T06:03:08",
    "name": "[dpdk-dev,5/8] ethdev: new API to get dcb related information",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "67b57914098a17363381e8a8b7de4c7657d8c915",
    "submitter": {
        "id": 47,
        "url": "https://patches.dpdk.org/api/people/47/?format=api",
        "name": "Jingjing Wu",
        "email": "jingjing.wu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1443074591-19803-6-git-send-email-jingjing.wu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/7137/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/7137/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 7F9368E80;\n\tThu, 24 Sep 2015 08:03:35 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 7DB298E83\n\tfor <dev@dpdk.org>; Thu, 24 Sep 2015 08:03:32 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP; 23 Sep 2015 23:03:31 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 23 Sep 2015 23:03:31 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t8O63SdT019545;\n\tThu, 24 Sep 2015 14:03:28 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t8O63OAg019872; Thu, 24 Sep 2015 14:03:26 +0800",
            "(from wujingji@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8O63O8c019868; \n\tThu, 24 Sep 2015 14:03:24 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.17,579,1437462000\"; d=\"scan'208\";a=\"775864073\"",
        "From": "Jingjing Wu <jingjing.wu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 24 Sep 2015 14:03:08 +0800",
        "Message-Id": "<1443074591-19803-6-git-send-email-jingjing.wu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1443074591-19803-1-git-send-email-jingjing.wu@intel.com>",
        "References": "<1443074591-19803-1-git-send-email-jingjing.wu@intel.com>",
        "Cc": "yulong.pei@intel.com",
        "Subject": "[dpdk-dev] [PATCH 5/8] ethdev: new API to get dcb related\n\tinformation",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/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 one new API to get dcb related info.\n  rte_eth_dev_get_dcb_info\n\nSigned-off-by: Jingjing Wu <jingjing.wu@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 18 ++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 50 +++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 68 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex f4bbca6..44a2d55 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -3371,3 +3371,21 @@ rte_eth_dev_set_eeprom(uint8_t port_id, struct rte_dev_eeprom_info *info)\n \tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->set_eeprom, -ENOTSUP);\n \treturn (*dev->dev_ops->set_eeprom)(dev, info);\n }\n+\n+void\n+rte_eth_dev_get_dcb_info(uint8_t port_id,\n+\t\t\t     struct rte_eth_dcb_info *dcb_info)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tif (!rte_eth_dev_is_valid_port(port_id)) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\treturn;\n+\t}\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tmemset(dcb_info, 0, sizeof(struct rte_eth_dcb_info));\n+\n+\tFUNC_PTR_OR_RET(*dev->dev_ops->get_dcb_info);\n+\t(*dev->dev_ops->get_dcb_info)(dev, dcb_info);\n+}\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 0aa00a6..e6b7271 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -962,6 +962,38 @@ struct rte_eth_xstats {\n \tuint64_t value;\n };\n \n+#define ETH_DCB_NUM_TCS    8\n+#define ETH_MAX_VMDQ_POOL  64\n+\n+/**\n+ * A structure used to get the information of queue and\n+ * TC mapping on both TX and RX paths.\n+ */\n+struct rte_eth_dcb_tc_queue_mapping {\n+\t/** rx queues assigned to tc per Pool */\n+\tstruct {\n+\t\tuint8_t base;\n+\t\tuint8_t nb_queue;\n+\t} tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];\n+\t/** rx queues assigned to tc per Pool */\n+\tstruct {\n+\t\tuint8_t base;\n+\t\tuint8_t nb_queue;\n+\t} tc_txq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];\n+};\n+\n+/**\n+ * A structure used to get the information of DCB.\n+ * It includes TC UP mapping and queue TC mapping.\n+ */\n+struct rte_eth_dcb_info {\n+\tuint8_t nb_tcs;        /**< number of TCs */\n+\tuint8_t prio_tc[ETH_DCB_NUM_USER_PRIORITIES]; /**< Priority to tc */\n+\tuint8_t tc_bws[ETH_DCB_NUM_TCS]; /**< TX BW percentage for each TC */\n+\t/** rx queues assigned to tc */\n+\tstruct rte_eth_dcb_tc_queue_mapping tc_queue;\n+};\n+\n struct rte_eth_dev;\n \n struct rte_eth_dev_callback;\n@@ -1354,6 +1386,10 @@ typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,\n \t\t\t\t void *arg);\n /**< @internal Take operations to assigned filter type on an Ethernet device */\n \n+typedef void (*eth_get_dcb_info)(struct rte_eth_dev *dev,\n+\t\t\t\t struct rte_eth_dcb_info *dcb_info);\n+/**< @internal Get dcb information on an Ethernet device */\n+\n /**\n  * @internal A structure containing the functions exported by an Ethernet driver.\n  */\n@@ -1476,6 +1512,9 @@ struct eth_dev_ops {\n \teth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;\n \t/** Read the IEEE1588/802.1AS TX timestamp. */\n \teth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;\n+\n+\t/** Get DCB information */\n+\teth_get_dcb_info get_dcb_info;\n };\n \n /**\n@@ -3701,6 +3740,17 @@ int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type,\n \t\t\tenum rte_filter_op filter_op, void *arg);\n \n /**\n+ * Get DCB information on an Ethernet device.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param dcb_info\n+ *   dcb information.\n+ */\n+void rte_eth_dev_get_dcb_info(uint8_t port_id,\n+\t\t\t     struct rte_eth_dcb_info *dcb_info);\n+\n+/**\n  * Add a callback to be called on packet RX on a given port and queue.\n  *\n  * This API configures a function to be called for each burst of\n",
    "prefixes": [
        "dpdk-dev",
        "5/8"
    ]
}