Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/847161/?format=api
{ "id": 847161, "url": "http://patchwork.ozlabs.org/api/patches/847161/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171211183715.21524.56950.stgit@localhost6.localdomain6/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20171211183715.21524.56950.stgit@localhost6.localdomain6>", "list_archive_url": null, "date": "2017-12-11T18:37:15", "name": "[6/9] ixgbevf: add counters for Rx page allocations", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "032468a6e54f085a1b68c2af01a3223ad9264a07", "submitter": { "id": 1670, "url": "http://patchwork.ozlabs.org/api/people/1670/?format=api", "name": "Tantilov, Emil S", "email": "emil.s.tantilov@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171211183715.21524.56950.stgit@localhost6.localdomain6/mbox/", "series": [ { "id": 17925, "url": "http://patchwork.ozlabs.org/api/series/17925/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=17925", "date": "2017-12-11T18:36:44", "name": "ixgbevf: update Rx/Tx code path for build_skb", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/17925/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/847161/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/847161/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ywWmR2DzNz9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Dec 2017 05:33:11 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 94D058727F;\n\tMon, 11 Dec 2017 18:33:09 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id qo36ojFdLTwX; Mon, 11 Dec 2017 18:33:07 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B80F687290;\n\tMon, 11 Dec 2017 18:33:07 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 18E091BFA4B\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:06 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 1541D8820E\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:06 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id kW84YiI7245G for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:05 +0000 (UTC)", "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 46C29881EB\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 11 Dec 2017 18:33:05 +0000 (UTC)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Dec 2017 10:33:04 -0800", "from estantil-desk3.jf.intel.com (HELO localhost6.localdomain6)\n\t([134.134.177.96])\n\tby orsmga007.jf.intel.com with ESMTP; 11 Dec 2017 10:33:04 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.45,392,1508828400\"; d=\"scan'208\";a=\"1890925\"", "From": "Emil Tantilov <emil.s.tantilov@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Mon, 11 Dec 2017 10:37:15 -0800", "Message-ID": "<20171211183715.21524.56950.stgit@localhost6.localdomain6>", "In-Reply-To": "<20171211183537.21524.10133.stgit@localhost6.localdomain6>", "References": "<20171211183537.21524.10133.stgit@localhost6.localdomain6>", "User-Agent": "StGit/0.17.1-17-ge4e0", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 6/9] ixgbevf: add counters for Rx page\n\tallocations", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "We already had placehloders for failed page and buffer allocations.\nAdded alloc_rx_page and made sure the stats are properly updated and\nexposed in ethtool.\n\nSigned-off-by: Emil Tantilov <emil.s.tantilov@intel.com>\n---\n drivers/net/ethernet/intel/ixgbevf/ethtool.c | 3 +++\n drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 6 ++++-\n drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 23 ++++++++++++++++-----\n 3 files changed, 25 insertions(+), 7 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbevf/ethtool.c b/drivers/net/ethernet/intel/ixgbevf/ethtool.c\nindex ff9d05f..4400e49 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ethtool.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ethtool.c\n@@ -75,6 +75,9 @@ struct ixgbe_stats {\n \tIXGBEVF_STAT(\"tx_timeout_count\", tx_timeout_count),\n \tIXGBEVF_NETDEV_STAT(multicast),\n \tIXGBEVF_STAT(\"rx_csum_offload_errors\", hw_csum_rx_error),\n+\tIXGBEVF_STAT(\"alloc_rx_page\", alloc_rx_page),\n+\tIXGBEVF_STAT(\"alloc_rx_page_failed\", alloc_rx_page_failed),\n+\tIXGBEVF_STAT(\"alloc_rx_buff_failed\", alloc_rx_buff_failed),\n };\n \n #define IXGBEVF_QUEUE_STATS_LEN ( \\\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\nindex c70a789..f695242 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n@@ -84,6 +84,7 @@ struct ixgbevf_tx_queue_stats {\n struct ixgbevf_rx_queue_stats {\n \tu64 alloc_rx_page_failed;\n \tu64 alloc_rx_buff_failed;\n+\tu64 alloc_rx_page;\n \tu64 csum_err;\n };\n \n@@ -295,8 +296,9 @@ struct ixgbevf_adapter {\n \tu64 hw_csum_rx_error;\n \tu64 hw_rx_no_dma_resources;\n \tint num_msix_vectors;\n-\tu32 alloc_rx_page_failed;\n-\tu32 alloc_rx_buff_failed;\n+\tu64 alloc_rx_page_failed;\n+\tu64 alloc_rx_buff_failed;\n+\tu64 alloc_rx_page;\n \n \tstruct msix_entry *msix_entries;\n \ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex ae2402d..350afec 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -604,7 +604,7 @@ static bool ixgbevf_alloc_mapped_page(struct ixgbevf_ring *rx_ring,\n \tif (dma_mapping_error(rx_ring->dev, dma)) {\n \t\t__free_page(page);\n \n-\t\trx_ring->rx_stats.alloc_rx_buff_failed++;\n+\t\trx_ring->rx_stats.alloc_rx_page_failed++;\n \t\treturn false;\n \t}\n \n@@ -612,6 +612,7 @@ static bool ixgbevf_alloc_mapped_page(struct ixgbevf_ring *rx_ring,\n \tbi->page = page;\n \tbi->page_offset = 0;\n \tbi->pagecnt_bias = 1;\n+\trx_ring->rx_stats.alloc_rx_page++;\n \n \treturn true;\n }\n@@ -963,8 +964,10 @@ static int ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,\n \t\tskb = ixgbevf_fetch_rx_buffer(rx_ring, rx_desc, skb);\n \n \t\t/* exit if we failed to retrieve a buffer */\n-\t\tif (!skb)\n+\t\tif (!skb) {\n+\t\t\trx_ring->rx_stats.alloc_rx_buff_failed++;\n \t\t\tbreak;\n+\t\t}\n \n \t\tcleaned_count++;\n \n@@ -2749,6 +2752,8 @@ static int ixgbevf_sw_init(struct ixgbevf_adapter *adapter)\n void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)\n {\n \tstruct ixgbe_hw *hw = &adapter->hw;\n+\tu64 alloc_rx_page_failed = 0, alloc_rx_buff_failed = 0;\n+\tu64 alloc_rx_page = 0, hw_csum_rx_error = 0;\n \tint i;\n \n \tif (test_bit(__IXGBEVF_DOWN, &adapter->state) ||\n@@ -2769,10 +2774,18 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)\n \t\t\t\tadapter->stats.vfmprc);\n \n \tfor (i = 0; i < adapter->num_rx_queues; i++) {\n-\t\tadapter->hw_csum_rx_error +=\n-\t\t\tadapter->rx_ring[i]->hw_csum_rx_error;\n-\t\tadapter->rx_ring[i]->hw_csum_rx_error = 0;\n+\t\tstruct ixgbevf_ring *rx_ring = adapter->rx_ring[i];\n+\n+\t\thw_csum_rx_error += rx_ring->rx_stats.csum_err;\n+\t\talloc_rx_page_failed += rx_ring->rx_stats.alloc_rx_page_failed;\n+\t\talloc_rx_buff_failed += rx_ring->rx_stats.alloc_rx_buff_failed;\n+\t\talloc_rx_page += rx_ring->rx_stats.alloc_rx_page;\n \t}\n+\n+\tadapter->hw_csum_rx_error = hw_csum_rx_error;\n+\tadapter->alloc_rx_page_failed = alloc_rx_page_failed;\n+\tadapter->alloc_rx_buff_failed = alloc_rx_buff_failed;\n+\tadapter->alloc_rx_page = alloc_rx_page;\n }\n \n /**\n", "prefixes": [ "6/9" ] }