Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/115682/?format=api
https://patches.dpdk.org/api/patches/115682/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1661899911-13086-18-git-send-email-longli@linuxonhyperv.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": "<1661899911-13086-18-git-send-email-longli@linuxonhyperv.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1661899911-13086-18-git-send-email-longli@linuxonhyperv.com", "date": "2022-08-30T22:51:50", "name": "[v6,17/18] net/mana: add function to report queue stats", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "71de9c54733b631e4261d76e332ff0864e335521", "submitter": { "id": 1784, "url": "https://patches.dpdk.org/api/people/1784/?format=api", "name": "Long Li", "email": "longli@linuxonhyperv.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1661899911-13086-18-git-send-email-longli@linuxonhyperv.com/mbox/", "series": [ { "id": 24471, "url": "https://patches.dpdk.org/api/series/24471/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24471", "date": "2022-08-30T22:51:33", "name": "Introduce Microsoft Azure Network Adatper (MANA) PMD", "version": 6, "mbox": "https://patches.dpdk.org/series/24471/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/115682/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/115682/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 248C5A00C5;\n\tWed, 31 Aug 2022 00:53:39 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AD32842BC0;\n\tWed, 31 Aug 2022 00:52:14 +0200 (CEST)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id DA34A42B8D\n for <dev@dpdk.org>; Wed, 31 Aug 2022 00:52:08 +0200 (CEST)", "by linux.microsoft.com (Postfix, from userid 1004)\n id 4D9662045E25; Tue, 30 Aug 2022 15:52:08 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 4D9662045E25", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com;\n s=default; t=1661899928;\n bh=R/D7AXZWM9GpdyTYvFyhfYRkXt1qbmKhAZtVs3GG4xc=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From;\n b=pkt6RH03gNUXVjeX+3KE5CTFH7YAlikaU5uRdEB6FrRlgLLP83O+xE3tg34lFp63m\n m3+VJhhMZ39PQ+T2e8BWhZRjbclqHxCpln/C45EEzimy+Lwe3lBZQIVynxPFS4u6xU\n eU4HQjnE5ktvWSmSM3aZbMkK2Fv8h/7Iqbli9ojE=", "From": "longli@linuxonhyperv.com", "To": "Ferruh Yigit <ferruh.yigit@xilinx.com>", "Cc": "dev@dpdk.org, Ajay Sharma <sharmaajay@microsoft.com>,\n Stephen Hemminger <sthemmin@microsoft.com>, Long Li <longli@microsoft.com>", "Subject": "[Patch v6 17/18] net/mana: add function to report queue stats", "Date": "Tue, 30 Aug 2022 15:51:50 -0700", "Message-Id": "<1661899911-13086-18-git-send-email-longli@linuxonhyperv.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1661899911-13086-1-git-send-email-longli@linuxonhyperv.com>", "References": "<1661899911-13086-1-git-send-email-longli@linuxonhyperv.com>", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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>", "Reply-To": "longli@microsoft.com", "Errors-To": "dev-bounces@dpdk.org" }, "content": "From: Long Li <longli@microsoft.com>\n\nReport packet statistics.\n\nSigned-off-by: Long Li <longli@microsoft.com>\n---\nChange log:\nv5:\nFixed calculation of stats packets/bytes/errors by adding them over the queue stats.\n\n doc/guides/nics/features/mana.ini | 2 +\n drivers/net/mana/mana.c | 77 +++++++++++++++++++++++++++++++\n 2 files changed, 79 insertions(+)", "diff": "diff --git a/doc/guides/nics/features/mana.ini b/doc/guides/nics/features/mana.ini\nindex 7922816d66..b2729aba3a 100644\n--- a/doc/guides/nics/features/mana.ini\n+++ b/doc/guides/nics/features/mana.ini\n@@ -4,6 +4,7 @@\n ; Refer to default.ini for the full list of available PMD features.\n ;\n [Features]\n+Basic stats = Y\n Free Tx mbuf on demand = Y\n Link status = P\n Linux = Y\n@@ -14,5 +15,6 @@ Queue start/stop = Y\n Removal event = Y\n RSS hash = Y\n Speed capabilities = P\n+Stats per queue = Y\n Usage doc = Y\n x86-64 = Y\ndiff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c\nindex eb37f359db..bb8ef652bf 100644\n--- a/drivers/net/mana/mana.c\n+++ b/drivers/net/mana/mana.c\n@@ -508,6 +508,79 @@ static int mana_dev_link_update(struct rte_eth_dev *dev,\n \treturn rte_eth_linkstatus_set(dev, &link);\n }\n \n+static int mana_dev_stats_get(struct rte_eth_dev *dev,\n+\t\t\t struct rte_eth_stats *stats)\n+{\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tstruct mana_txq *txq = dev->data->tx_queues[i];\n+\n+\t\tif (!txq)\n+\t\t\tcontinue;\n+\n+\t\tstats->opackets = txq->stats.packets;\n+\t\tstats->obytes = txq->stats.bytes;\n+\t\tstats->oerrors = txq->stats.errors;\n+\n+\t\tif (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {\n+\t\t\tstats->q_opackets[i] = txq->stats.packets;\n+\t\t\tstats->q_obytes[i] = txq->stats.bytes;\n+\t\t}\n+\t}\n+\n+\tstats->rx_nombuf = 0;\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tstruct mana_rxq *rxq = dev->data->rx_queues[i];\n+\n+\t\tif (!rxq)\n+\t\t\tcontinue;\n+\n+\t\tstats->ipackets = rxq->stats.packets;\n+\t\tstats->ibytes = rxq->stats.bytes;\n+\t\tstats->ierrors = rxq->stats.errors;\n+\n+\t\t/* There is no good way to get stats->imissed, not setting it */\n+\n+\t\tif (i < RTE_ETHDEV_QUEUE_STAT_CNTRS) {\n+\t\t\tstats->q_ipackets[i] = rxq->stats.packets;\n+\t\t\tstats->q_ibytes[i] = rxq->stats.bytes;\n+\t\t}\n+\n+\t\tstats->rx_nombuf += rxq->stats.nombuf;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+static int\n+mana_dev_stats_reset(struct rte_eth_dev *dev __rte_unused)\n+{\n+\tunsigned int i;\n+\n+\tPMD_INIT_FUNC_TRACE();\n+\n+\tfor (i = 0; i < dev->data->nb_tx_queues; i++) {\n+\t\tstruct mana_txq *txq = dev->data->tx_queues[i];\n+\n+\t\tif (!txq)\n+\t\t\tcontinue;\n+\n+\t\tmemset(&txq->stats, 0, sizeof(txq->stats));\n+\t}\n+\n+\tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n+\t\tstruct mana_rxq *rxq = dev->data->rx_queues[i];\n+\n+\t\tif (!rxq)\n+\t\t\tcontinue;\n+\n+\t\tmemset(&rxq->stats, 0, sizeof(rxq->stats));\n+\t}\n+\n+\treturn 0;\n+}\n+\n const struct eth_dev_ops mana_dev_ops = {\n \t.dev_configure\t\t= mana_dev_configure,\n \t.dev_start\t\t= mana_dev_start,\n@@ -524,9 +597,13 @@ const struct eth_dev_ops mana_dev_ops = {\n \t.rx_queue_setup\t\t= mana_dev_rx_queue_setup,\n \t.rx_queue_release\t= mana_dev_rx_queue_release,\n \t.link_update\t\t= mana_dev_link_update,\n+\t.stats_get\t\t= mana_dev_stats_get,\n+\t.stats_reset\t\t= mana_dev_stats_reset,\n };\n \n const struct eth_dev_ops mana_dev_sec_ops = {\n+\t.stats_get = mana_dev_stats_get,\n+\t.stats_reset = mana_dev_stats_reset,\n \t.dev_infos_get = mana_dev_info_get,\n };\n \n", "prefixes": [ "v6", "17/18" ] }{ "id": 115682, "url": "