get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 5516,
    "url": "http://patches.dpdk.org/api/patches/5516/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1434633528-23329-2-git-send-email-konstantin.ananyev@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": "<1434633528-23329-2-git-send-email-konstantin.ananyev@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1434633528-23329-2-git-send-email-konstantin.ananyev@intel.com",
    "date": "2015-06-18T13:18:44",
    "name": "[dpdk-dev,PATCHv2,1/5] ethdev: add new API to retrieve RX/TX queue information",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "dc5b2152bc62709985cdf8cc952b530be2442521",
    "submitter": {
        "id": 33,
        "url": "http://patches.dpdk.org/api/people/33/?format=api",
        "name": "Ananyev, Konstantin",
        "email": "konstantin.ananyev@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1434633528-23329-2-git-send-email-konstantin.ananyev@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/5516/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/5516/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 CE809C6A4;\n\tThu, 18 Jun 2015 15:19:08 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 5C235C682\n\tfor <dev@dpdk.org>; Thu, 18 Jun 2015 15:19:02 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga102.fm.intel.com with ESMTP; 18 Jun 2015 06:19:00 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 18 Jun 2015 06:19:01 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tt5IDIwjR010622; Thu, 18 Jun 2015 14:18:58 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id t5IDIwsk023390;\n\tThu, 18 Jun 2015 14:18:58 +0100",
            "(from kananye1@localhost)\n\tby sivswdev02.ir.intel.com with  id t5IDIwFm023386;\n\tThu, 18 Jun 2015 14:18:58 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.13,638,1427785200\"; d=\"scan'208\";a=\"713274049\"",
        "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Thu, 18 Jun 2015 14:18:44 +0100",
        "Message-Id": "<1434633528-23329-2-git-send-email-konstantin.ananyev@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1434633528-23329-1-git-send-email-konstantin.ananyev@intel.com>",
        "References": "<1434560084-21237-2-git-send-email-konstantin.ananyev@intel.com>\n\t<1434633528-23329-1-git-send-email-konstantin.ananyev@intel.com>",
        "Subject": "[dpdk-dev] [PATCHv2 1/5] ethdev: add new API to retrieve RX/TX\n\tqueue information",
        "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": "Add the ability for the upper layer to query RX/TX queue information.\n\nAdd new structures:\nstruct rte_eth_rxq_info\nstruct rte_eth_txq_info\n\nnew functions:\nrte_eth_rx_queue_info_get\nrte_eth_tx_queue_info_get\n\ninto rte_etdev API.\n\nLeft extra free space in the queue info structures,\nso extra fields could be added later without ABI breakage.\n\nv2 changes:\n\n- Add formal check for the qinfo input parameter.\n- As suggested rename 'rx_qinfo/tx_qinfo' to 'rxq_info/txq_info'\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 54 ++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 77 ++++++++++++++++++++++++++++++++++++++++++-\n 2 files changed, 130 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex e13fde5..7dfe72a 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -3629,6 +3629,60 @@ rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,\n }\n \n int\n+rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,\n+\tstruct rte_eth_rxq_info *qinfo)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tif (qinfo == NULL)\n+\t\treturn -EINVAL;\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 -EINVAL;\n+\t}\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tif (queue_id >= dev->data->nb_rx_queues) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid RX queue_id=%d\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rxq_info_get, -ENOTSUP);\n+\n+\tmemset(qinfo, 0, sizeof(*qinfo));\n+\tdev->dev_ops->rxq_info_get(dev, queue_id, qinfo);\n+\treturn 0;\n+}\n+\n+int\n+rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,\n+\tstruct rte_eth_txq_info *qinfo)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tif (qinfo == NULL)\n+\t\treturn -EINVAL;\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 -EINVAL;\n+\t}\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tif (queue_id >= dev->data->nb_tx_queues) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid TX queue_id=%d\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->txq_info_get, -ENOTSUP);\n+\n+\tmemset(qinfo, 0, sizeof(*qinfo));\n+\tdev->dev_ops->txq_info_get(dev, queue_id, qinfo);\n+\treturn 0;\n+}\n+\n+int\n rte_eth_dev_set_mc_addr_list(uint8_t port_id,\n \t\t\t     struct ether_addr *mc_addr_set,\n \t\t\t     uint32_t nb_mc_addr)\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 04c192d..5dd4c01 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -942,6 +942,30 @@ struct rte_eth_xstats {\n \tuint64_t value;\n };\n \n+/**\n+ * Ethernet device RX queue information strcuture.\n+ * Used to retieve information about configured queue.\n+ */\n+struct rte_eth_rxq_info {\n+\tstruct rte_mempool *mp;     /**< mempool used by that queue. */\n+\tstruct rte_eth_rxconf conf; /**< queue config parameters. */\n+\tuint8_t scattered_rx;       /**< scattered packets RX supported. */\n+\tuint16_t nb_desc;           /**< configured number of RXDs. */\n+\tuint16_t max_desc;          /**< max allowed number of RXDs. */\n+\tuint16_t min_desc;          /**< min allowed number of RXDs. */\n+} __rte_cache_aligned;\n+\n+/**\n+ * Ethernet device TX queue information strcuture.\n+ * Used to retieve information about configured queue.\n+ */\n+struct rte_eth_txq_info {\n+\tstruct rte_eth_txconf conf; /**< queue config parameters. */\n+\tuint16_t nb_desc;           /**< configured number of TXDs. */\n+\tuint16_t max_desc;          /**< max allowed number of TXDs. */\n+\tuint16_t min_desc;          /**< min allowed number of TXDs. */\n+} __rte_cache_aligned;\n+\n struct rte_eth_dev;\n \n struct rte_eth_dev_callback;\n@@ -1045,6 +1069,12 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,\n typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);\n /**< @Check DD bit of specific RX descriptor */\n \n+typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,\n+\tuint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);\n+\n+typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,\n+\tuint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);\n+\n typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);\n /**< @internal Set MTU. */\n \n@@ -1389,8 +1419,13 @@ struct eth_dev_ops {\n \trss_hash_update_t rss_hash_update;\n \t/** Get current RSS hash configuration. */\n \trss_hash_conf_get_t rss_hash_conf_get;\n-\teth_filter_ctrl_t              filter_ctrl;          /**< common filter control*/\n+\teth_filter_ctrl_t              filter_ctrl;\n+\t/**< common filter control. */\n \teth_set_mc_addr_list_t set_mc_addr_list; /**< set list of mcast addrs */\n+\teth_rxq_info_get_t rxq_info_get;\n+\t/**< retrieve RX queue information. */\n+\teth_txq_info_get_t txq_info_get;\n+\t/**< retrieve TX queue information. */\n };\n \n /**\n@@ -3616,6 +3651,46 @@ int rte_eth_remove_rx_callback(uint8_t port_id, uint16_t queue_id,\n int rte_eth_remove_tx_callback(uint8_t port_id, uint16_t queue_id,\n \t\tstruct rte_eth_rxtx_callback *user_cb);\n \n+/**\n+ * Retrieve information about given port's RX queue.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The RX queue on the Ethernet device for which information\n+ *   will be retrieved.\n+ * @param qinfo\n+ *   A pointer to a structure of type *rte_eth_rxq_info_info* to be filled with\n+ *   the information of the Ethernet device.\n+ *\n+ * @return\n+ *   - 0: Success\n+ *   - -ENOTSUP: routine is not supported by the device PMD.\n+ *   - -EINVAL:  The port_id or the queue_id is out of range.\n+ */\n+int rte_eth_rx_queue_info_get(uint8_t port_id, uint16_t queue_id,\n+\tstruct rte_eth_rxq_info *qinfo);\n+\n+/**\n+ * Retrieve information about given port's TX queue.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The TX queue on the Ethernet device for which information\n+ *   will be retrieved.\n+ * @param qinfo\n+ *   A pointer to a structure of type *rte_eth_txq_info_info* to be filled with\n+ *   the information of the Ethernet device.\n+ *\n+ * @return\n+ *   - 0: Success\n+ *   - -ENOTSUP: routine is not supported by the device PMD.\n+ *   - -EINVAL:  The port_id or the queue_id is out of range.\n+ */\n+int rte_eth_tx_queue_info_get(uint8_t port_id, uint16_t queue_id,\n+\tstruct rte_eth_txq_info *qinfo);\n+\n #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "dpdk-dev",
        "PATCHv2",
        "1/5"
    ]
}