Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8703/?format=api
http://patches.dpdk.org/api/patches/8703/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1446728189-24418-1-git-send-email-harry.van.haaren@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": "<1446728189-24418-1-git-send-email-harry.van.haaren@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1446728189-24418-1-git-send-email-harry.van.haaren@intel.com", "date": "2015-11-05T12:56:29", "name": "[dpdk-dev,v2] i40e: fix resetting of stats", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d15956fc407f80a88830bee0a74910410c445801", "submitter": { "id": 317, "url": "http://patches.dpdk.org/api/people/317/?format=api", "name": "Van Haaren, Harry", "email": "harry.van.haaren@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1446728189-24418-1-git-send-email-harry.van.haaren@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/8703/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/8703/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 E7C24378E;\n\tThu, 5 Nov 2015 13:56:35 +0100 (CET)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id BEE07DE6\n\tfor <dev@dpdk.org>; Thu, 5 Nov 2015 13:56:33 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga101.fm.intel.com with ESMTP; 05 Nov 2015 04:56:32 -0800", "from sie-lab-212-222.ir.intel.com (HELO\n\tsilpixa00366884.ir.intel.com) ([10.237.212.222])\n\tby orsmga002.jf.intel.com with ESMTP; 05 Nov 2015 04:56:31 -0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,247,1444719600\"; d=\"scan'208\";a=\"843240245\"", "From": "Harry van Haaren <harry.van.haaren@intel.com>", "To": "dev@dpdk.org", "Date": "Thu, 5 Nov 2015 12:56:29 +0000", "Message-Id": "<1446728189-24418-1-git-send-email-harry.van.haaren@intel.com>", "X-Mailer": "git-send-email 1.9.1", "In-Reply-To": "<1446727941-17018-1-git-send-email-harry.van.haaren@intel.com>", "References": "<1446727941-17018-1-git-send-email-harry.van.haaren@intel.com>", "Cc": "Harry van Haaren <harry.van.haaren@gmail.com>", "Subject": "[dpdk-dev] [PATCH v2] i40e: fix resetting of stats", "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": "This patch fixes a bug where only some of the statistics were being reset\nwhen calling rte_eth_stats_reset() or rte_eth_xstats_reset().\n\nThis patch marks the VSI to update its offset, causing the stats be look\nlike they are reset.\n\nFixes: 9aace75fc82e (\"i40e: fix statistics\")\n\nSigned-off-by: Harry van Haaren <harry.van.haaren@gmail.com>\n---\n\nv2: Remove commented code\n\n drivers/net/i40e/i40e_ethdev.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex a39bd28..7e18ba7 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -2129,14 +2129,14 @@ i40e_dev_xstats_reset(struct rte_eth_dev *dev)\n {\n \tstruct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);\n \tstruct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n-\tstruct i40e_hw_port_stats *hw_stats = &pf->stats;\n \n-\t/* The hw registers are cleared on read */\n+\t/* Mark PF and VSI stats to update the offset, aka \"reset\" */\n \tpf->offset_loaded = false;\n-\ti40e_read_stats_registers(pf, hw);\n+\tif (pf->main_vsi)\n+\t\tpf->main_vsi->offset_loaded = false;\n \n-\t/* reset software counters */\n-\tmemset(hw_stats, 0, sizeof(*hw_stats));\n+\t/* read the stats, reading current register values into offset */\n+\ti40e_read_stats_registers(pf, hw);\n }\n \n static int\n", "prefixes": [ "dpdk-dev", "v2" ] }{ "id": 8703, "url": "