Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/98398/?format=api
https://patches.dpdk.org/api/patches/98398/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210909024531.10009-1-chenqiming_huawei@163.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": "<20210909024531.10009-1-chenqiming_huawei@163.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210909024531.10009-1-chenqiming_huawei@163.com", "date": "2021-09-09T02:45:31", "name": "[v3] net/pcap: improve rx statistics", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "182818856c76a8bad601f935880a069a717e1fdd", "submitter": { "id": 2338, "url": "https://patches.dpdk.org/api/people/2338/?format=api", "name": "Qiming Chen", "email": "chenqiming_huawei@163.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210909024531.10009-1-chenqiming_huawei@163.com/mbox/", "series": [ { "id": 18776, "url": "https://patches.dpdk.org/api/series/18776/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=18776", "date": "2021-09-09T02:45:31", "name": "[v3] net/pcap: improve rx statistics", "version": 3, "mbox": "https://patches.dpdk.org/series/18776/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/98398/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/98398/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 E1CA6A0547;\n\tThu, 9 Sep 2021 04:46:23 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6CE7B410F5;\n\tThu, 9 Sep 2021 04:46:23 +0200 (CEST)", "from mail-m972.mail.163.com (mail-m972.mail.163.com [123.126.97.2])\n by mails.dpdk.org (Postfix) with ESMTP id EAB69410DA\n for <dev@dpdk.org>; Thu, 9 Sep 2021 04:46:21 +0200 (CEST)", "from localhost.localdomain (unknown [124.160.214.74])\n by smtp2 (Coremail) with SMTP id GtxpCgA3YfF0dTlhhyCeSA--.18S2;\n Thu, 09 Sep 2021 10:46:18 +0800 (CST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=vTd2m\n r//sQ3JFyryfpUTJWbGYtyUV+8grAbMtQsxRRI=; b=VyIJVLr6tdAizooy3aD61\n aa+XmIn4aFc51+2bddlDU8JSb4KV1ibVz2JdzmWYHDoa7j6r9wpprSn6qVwLj7HX\n 59b/FQ9GJ+Vh5xk0xnriNIzlKaNxmjyKoHu+QqsGmXhELcZUx5qvXLwXdRqlAUmy\n jwdvWhadaVlNSignkdrcO8=", "From": "Qiming Chen <chenqiming_huawei@163.com>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com,\n\tQiming Chen <chenqiming_huawei@163.com>", "Date": "Thu, 9 Sep 2021 10:45:31 +0800", "Message-Id": "<20210909024531.10009-1-chenqiming_huawei@163.com>", "X-Mailer": "git-send-email 2.30.1.windows.1", "In-Reply-To": "<20210826032354.1146-1-chenqiming_huawei@163.com>", "References": "<20210826032354.1146-1-chenqiming_huawei@163.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-CM-TRANSID": "GtxpCgA3YfF0dTlhhyCeSA--.18S2", "X-Coremail-Antispam": "1Uf129KBjvJXoWxGw1rWF1DCF1kWw1kAr43KFg_yoW5Xw48pF\n ZxKa47t347XrZrGwnrGFWrZr1DG3yxtr47WrZ7G34Fkas8K34YgryUKFWjvF92kayDC3W3\n Aws8GFWDGa4UGFUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07j5GYdUUUUU=", "X-Originating-IP": "[124.160.214.74]", "X-CM-SenderInfo": "xfkh01xlpl0w5bkxt4lhl6il2tof0z/xtbBZxoJoFet31yuRQAAsG", "Subject": "[dpdk-dev] [PATCH v3] net/pcap: improve rx statistics", "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>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "In the receiving direction, if alloc mbuf or jumbo process failed, there\nis no err_pkts count, which makes it difficult to locate the problem.\nBecause alloc mbuf failed, the rx_nombuf field is counted.\n\nSigned-off-by: Qiming Chen <chenqiming_huawei@163.com>\n---\nv2:\n Clear coding style issues.\nv3:\n 1) Send direction does not release mbuf.\n 2) Failed to alloc mbuf is counted to the rx_nombuf field.\n---\n drivers/net/pcap/pcap_ethdev.c | 12 +++++++++---\n 1 file changed, 9 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/pcap/pcap_ethdev.c b/drivers/net/pcap/pcap_ethdev.c\nindex a8774b7a43..64b0dbf0e4 100644\n--- a/drivers/net/pcap/pcap_ethdev.c\n+++ b/drivers/net/pcap/pcap_ethdev.c\n@@ -297,8 +297,10 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\tbreak;\n \n \t\tmbuf = rte_pktmbuf_alloc(pcap_q->mb_pool);\n-\t\tif (unlikely(mbuf == NULL))\n-\t\t\tbreak;\n+\t\tif (unlikely(mbuf == NULL)) {\n+\t\t\tpcap_q->rx_stat.err_pkts++;\n+\t\t\tcontinue;\n+\t\t}\n \n \t\tif (header.caplen <= rte_pktmbuf_tailroom(mbuf)) {\n \t\t\t/* pcap packet will fit in the mbuf, can copy it */\n@@ -311,6 +313,7 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)\n \t\t\t\t\t\t mbuf,\n \t\t\t\t\t\t packet,\n \t\t\t\t\t\t header.caplen) == -1)) {\n+\t\t\t\tpcap_q->rx_stat.err_pkts++;\n \t\t\t\trte_pktmbuf_free(mbuf);\n \t\t\t\tbreak;\n \t\t\t}\n@@ -742,7 +745,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n {\n \tunsigned int i;\n \tunsigned long rx_packets_total = 0, rx_bytes_total = 0;\n-\tunsigned long rx_missed_total = 0;\n+\tunsigned long rx_missed_total = 0, rx_nombuf = 0;\n \tunsigned long tx_packets_total = 0, tx_bytes_total = 0;\n \tunsigned long tx_packets_err_total = 0;\n \tconst struct pmd_internals *internal = dev->data->dev_private;\n@@ -751,6 +754,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \t\t\ti < dev->data->nb_rx_queues; i++) {\n \t\tstats->q_ipackets[i] = internal->rx_queue[i].rx_stat.pkts;\n \t\tstats->q_ibytes[i] = internal->rx_queue[i].rx_stat.bytes;\n+\t\trx_nombuf += internal->rx_queue[i].rx_stat.err_pkts;\n \t\trx_packets_total += stats->q_ipackets[i];\n \t\trx_bytes_total += stats->q_ibytes[i];\n \t\trx_missed_total += queue_missed_stat_get(dev, i);\n@@ -771,6 +775,7 @@ eth_stats_get(struct rte_eth_dev *dev, struct rte_eth_stats *stats)\n \tstats->opackets = tx_packets_total;\n \tstats->obytes = tx_bytes_total;\n \tstats->oerrors = tx_packets_err_total;\n+\tstats->rx_nombuf = rx_nombuf;\n \n \treturn 0;\n }\n@@ -784,6 +789,7 @@ eth_stats_reset(struct rte_eth_dev *dev)\n \tfor (i = 0; i < dev->data->nb_rx_queues; i++) {\n \t\tinternal->rx_queue[i].rx_stat.pkts = 0;\n \t\tinternal->rx_queue[i].rx_stat.bytes = 0;\n+\t\tinternal->rx_queue[i].rx_stat.err_pkts = 0;\n \t\tqueue_missed_stat_reset(dev, i);\n \t}\n \n", "prefixes": [ "v3" ] }{ "id": 98398, "url": "