Show a patch.

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

{
    "id": 74603,
    "url": "https://patches.dpdk.org/api/patches/74603/",
    "web_url": "https://patches.dpdk.org/patch/74603/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/",
        "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"
    },
    "msgid": "<1595399890-27300-3-git-send-email-tangchengchang@huawei.com>",
    "date": "2020-07-22T06:38:09",
    "name": "[RFC,v2,2/3] net/hns3: add support for query of rx/tx queue info",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "c800730e59c4bdddf0b744d770ea856f73314c7e",
    "submitter": {
        "id": 1792,
        "url": "https://patches.dpdk.org/api/people/1792/",
        "name": "Chengchang Tang",
        "email": "tangchengchang@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/74603/mbox/",
    "series": [
        {
            "id": 11227,
            "url": "https://patches.dpdk.org/api/series/11227/",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=11227",
            "date": "2020-07-22T06:38:08",
            "name": "add rx buffer size for rte_eth_rxq_info",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/11227/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/74603/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/74603/checks/",
    "tags": {},
    "headers": {
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "X-Mailman-Version": "2.1.15",
        "CC": "<linuxarm@huawei.com>, <thomas@monjalon.net>, <arybchenko@solarflare.com>,\n <ferruh.yigit@intel.com>",
        "Precedence": "list",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "List-Post": "<mailto:dev@dpdk.org>",
        "MIME-Version": "1.0",
        "References": "<1592894934-57856-1-git-send-email-tangchengchang@huawei.com>\n <1595399890-27300-1-git-send-email-tangchengchang@huawei.com>",
        "X-BeenThere": "dev@dpdk.org",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Subject": "[dpdk-dev] [RFC v2 2/3] net/hns3: add support for query of rx/tx\n\tqueue info",
        "Content-Type": "text/plain",
        "From": "Chengchang Tang <tangchengchang@huawei.com>",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 88B72A0526;\n\tWed, 22 Jul 2020 08:40:40 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4F55A1C02E;\n\tWed, 22 Jul 2020 08:40:19 +0200 (CEST)",
            "from huawei.com (szxga06-in.huawei.com [45.249.212.32])\n by dpdk.org (Postfix) with ESMTP id A5BA01BFF9\n for <dev@dpdk.org>; Wed, 22 Jul 2020 08:40:13 +0200 (CEST)",
            "from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.58])\n by Forcepoint Email with ESMTP id CF17EB5286189AF4D176;\n Wed, 22 Jul 2020 14:40:08 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id\n 14.3.487.0; Wed, 22 Jul 2020 14:39:58 +0800"
        ],
        "X-Originating-IP": "[10.69.192.56]",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "X-Mailer": "git-send-email 2.7.4",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-CFilter-Loop": "Reflected",
        "Message-ID": "<1595399890-27300-3-git-send-email-tangchengchang@huawei.com>",
        "Date": "Wed, 22 Jul 2020 14:38:09 +0800",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "To": "<dev@dpdk.org>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "In-Reply-To": "<1595399890-27300-1-git-send-email-tangchengchang@huawei.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Return-Path": "<dev-bounces@dpdk.org>"
    },
    "content": "From: Huisong Li <lihuisong@huawei.com>\n\nThis patch adds support for query of rx/tx queue info for hns3. And the\nnew field rx_buf_size in rte_eth_rxq_info is also filled.\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Chengchang Tang <xavier.huwei@huawei.com>\nReviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>\n---\n drivers/net/hns3/hns3_ethdev.c    |  2 ++\n drivers/net/hns3/hns3_ethdev_vf.c |  2 ++\n drivers/net/hns3/hns3_rxtx.c      | 48 +++++++++++++++++++++++++++++++++++++++\n drivers/net/hns3/hns3_rxtx.h      |  4 ++++\n 4 files changed, 56 insertions(+)\n\n--\n2.7.4",
    "diff": "diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c\nindex 81e7730..c6a16f3 100644\n--- a/drivers/net/hns3/hns3_ethdev.c\n+++ b/drivers/net/hns3/hns3_ethdev.c\n@@ -5413,6 +5413,8 @@ static const struct eth_dev_ops hns3_eth_dev_ops = {\n \t.tx_queue_release       = hns3_dev_tx_queue_release,\n \t.rx_queue_intr_enable   = hns3_dev_rx_queue_intr_enable,\n \t.rx_queue_intr_disable  = hns3_dev_rx_queue_intr_disable,\n+\t.rxq_info_get           = hns3_rxq_info_get,\n+\t.txq_info_get           = hns3_txq_info_get,\n \t.dev_configure          = hns3_dev_configure,\n \t.flow_ctrl_get          = hns3_flow_ctrl_get,\n \t.flow_ctrl_set          = hns3_flow_ctrl_set,\ndiff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c\nindex 1d2941f..73f89e3 100644\n--- a/drivers/net/hns3/hns3_ethdev_vf.c\n+++ b/drivers/net/hns3/hns3_ethdev_vf.c\n@@ -2473,6 +2473,8 @@ static const struct eth_dev_ops hns3vf_eth_dev_ops = {\n \t.tx_queue_release   = hns3_dev_tx_queue_release,\n \t.rx_queue_intr_enable   = hns3_dev_rx_queue_intr_enable,\n \t.rx_queue_intr_disable  = hns3_dev_rx_queue_intr_disable,\n+\t.rxq_info_get           = hns3_rxq_info_get,\n+\t.txq_info_get           = hns3_txq_info_get,\n \t.dev_configure      = hns3vf_dev_configure,\n \t.mac_addr_add       = hns3vf_add_mac_addr,\n \t.mac_addr_remove    = hns3vf_remove_mac_addr,\ndiff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c\nindex c0f7981..5a7fb7d 100644\n--- a/drivers/net/hns3/hns3_rxtx.c\n+++ b/drivers/net/hns3/hns3_rxtx.c\n@@ -2814,3 +2814,51 @@ void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev)\n \t\teth_dev->tx_pkt_prepare = hns3_dummy_rxtx_burst;\n \t}\n }\n+\n+void\n+hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,\n+\t\t  struct rte_eth_rxq_info *qinfo)\n+{\n+\tstruct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct hns3_rx_queue *rxq = dev->data->rx_queues[queue_id];\n+\n+\tif (rxq == NULL) {\n+\t\thns3_err(hw, \"queue pointer of rx queue_id (%u) is NULL.\",\n+\t\t\t queue_id);\n+\t\treturn;\n+\t}\n+\n+\tqinfo->mp = rxq->mb_pool;\n+\tqinfo->nb_desc = rxq->nb_rx_desc;\n+\tqinfo->scattered_rx = dev->data->scattered_rx;\n+\t/*\n+\t * Report the hw rx buffer length which may be smaller than the mbuf\n+\t * date room size to user. This value affects the number of packets\n+\t * when receive a jumbo frame in scatter mode.\n+\t */\n+\tqinfo->rx_buf_size = rxq->rx_buf_len;\n+\n+\t/* If no descriptors available, packets are always dropped. */\n+\tqinfo->conf.rx_drop_en = 1;\n+\tqinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads;\n+\tqinfo->conf.rx_free_thresh = rxq->rx_free_thresh;\n+\tqinfo->conf.rx_deferred_start = rxq->rx_deferred_start;\n+}\n+\n+void\n+hns3_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,\n+\t\t  struct rte_eth_txq_info *qinfo)\n+{\n+\tstruct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct hns3_tx_queue *txq = dev->data->tx_queues[queue_id];\n+\n+\tif (txq == NULL) {\n+\t\thns3_err(hw, \"queue pointer of tx queue_id (%u) is NULL.\",\n+\t\t\t queue_id);\n+\t\treturn;\n+\t}\n+\n+\tqinfo->nb_desc = txq->nb_tx_desc;\n+\tqinfo->conf.offloads = dev->data->dev_conf.txmode.offloads;\n+\tqinfo->conf.tx_deferred_start = txq->tx_deferred_start;\n+}\ndiff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h\nindex 0d20a27..7a97a37 100644\n--- a/drivers/net/hns3/hns3_rxtx.h\n+++ b/drivers/net/hns3/hns3_rxtx.h\n@@ -403,4 +403,8 @@ int hns3_config_gro(struct hns3_hw *hw, bool en);\n int hns3_restore_gro_conf(struct hns3_hw *hw);\n void hns3_update_all_queues_pvid_state(struct hns3_hw *hw);\n\n+void hns3_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,\n+\t\t       struct rte_eth_rxq_info *qinfo);\n+void hns3_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,\n+\t\t       struct rte_eth_txq_info *qinfo);\n #endif /* _HNS3_RXTX_H_ */\n",
    "prefixes": [
        "RFC",
        "v2",
        "2/3"
    ]
}