Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/458039/?format=api
{ "id": 458039, "url": "http://patchwork.ozlabs.org/api/patches/458039/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1428092835-16834-10-git-send-email-jeffrey.t.kirsher@intel.com/", "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": "<1428092835-16834-10-git-send-email-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2015-04-03T20:27:00", "name": "[net-next,10/25] fm10k: separate PF only stats so that VF does not display them", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "e4128e1e4a7460a4e1f0017baec042489a982c6d", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@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/1428092835-16834-10-git-send-email-jeffrey.t.kirsher@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/458039/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/458039/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.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" ], "Received": [ "from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137])\n\tby ozlabs.org (Postfix) with ESMTP id 9535D140187\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 4 Apr 2015 07:27:25 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E8941A407C;\n\tFri, 3 Apr 2015 20:27:24 +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 fegNDyRlT9lp; Fri, 3 Apr 2015 20:27:22 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id B7557A40AE;\n\tFri, 3 Apr 2015 20:27:22 +0000 (UTC)", "from whitealder.osuosl.org (whitealder.osuosl.org\n\t[140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 3CBD31C107C\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 3 Apr 2015 20:27:21 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 3A7E392165\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 3 Apr 2015 20:27:21 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id uZT-agE3fdLo for <intel-wired-lan@lists.osuosl.org>;\n\tFri, 3 Apr 2015 20:27:20 +0000 (UTC)", "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1D9E692162\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tFri, 3 Apr 2015 20:27:20 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga102.jf.intel.com with ESMTP; 03 Apr 2015 13:27:20 -0700", "from lwang4-mobl1.amr.corp.intel.com (HELO\n\tjtkirshe-mobl.amr.corp.intel.com) ([10.254.109.203])\n\tby FMSMGA003.fm.intel.com with ESMTP; 03 Apr 2015 13:27:19 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.11,519,1422950400\"; d=\"scan'208\";a=\"476517898\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Fri, 3 Apr 2015 13:27:00 -0700", "Message-Id": "<1428092835-16834-10-git-send-email-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1428092835-16834-1-git-send-email-jeffrey.t.kirsher@intel.com>", "References": "<1428092835-16834-1-git-send-email-jeffrey.t.kirsher@intel.com>", "Subject": "[Intel-wired-lan] [net-next 10/25] fm10k: separate PF only stats so\n\tthat VF does not display them", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "This patch resolves an issue with ethtool stats displaying useless\nvalues on the VF, because some stats simply have no meaning to the VF.\nResolve this by splitting these out into PF_STATS and only showing them\nif we aren't the VF.\n\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\nSigned-off-by: Jacob Keller <jacob.e.keller@intel.com>\nAcked-by: Matthew Vick <matthew.vick@intel.com>\n---\n drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 51 +++++++++++++++++-------\n 1 file changed, 37 insertions(+), 14 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c\nindex cbfaf94..4687f37 100644\n--- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c\n+++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c\n@@ -57,7 +57,7 @@ static const struct fm10k_stats fm10k_gstrings_net_stats[] = {\n \t.stat_offset = offsetof(struct fm10k_intfc, _stat) \\\n }\n \n-static const struct fm10k_stats fm10k_gstrings_stats[] = {\n+static const struct fm10k_stats fm10k_gstrings_global_stats[] = {\n \tFM10K_STAT(\"tx_restart_queue\", restart_queue),\n \tFM10K_STAT(\"tx_busy\", tx_busy),\n \tFM10K_STAT(\"tx_csum_errors\", tx_csum_errors),\n@@ -72,15 +72,6 @@ static const struct fm10k_stats fm10k_gstrings_stats[] = {\n \tFM10K_STAT(\"rx_overrun_pf\", rx_overrun_pf),\n \tFM10K_STAT(\"rx_overrun_vf\", rx_overrun_vf),\n \n-\tFM10K_STAT(\"timeout\", stats.timeout.count),\n-\tFM10K_STAT(\"ur\", stats.ur.count),\n-\tFM10K_STAT(\"ca\", stats.ca.count),\n-\tFM10K_STAT(\"um\", stats.um.count),\n-\tFM10K_STAT(\"xec\", stats.xec.count),\n-\tFM10K_STAT(\"vlan_drop\", stats.vlan_drop.count),\n-\tFM10K_STAT(\"loopback_drop\", stats.loopback_drop.count),\n-\tFM10K_STAT(\"nodesc_drop\", stats.nodesc_drop.count),\n-\n \tFM10K_STAT(\"swapi_status\", hw.swapi.status),\n \tFM10K_STAT(\"mac_rules_used\", hw.swapi.mac.used),\n \tFM10K_STAT(\"mac_rules_avail\", hw.swapi.mac.avail),\n@@ -96,7 +87,19 @@ static const struct fm10k_stats fm10k_gstrings_stats[] = {\n \tFM10K_STAT(\"tx_hwtstamp_timeouts\", tx_hwtstamp_timeouts),\n };\n \n-#define FM10K_GLOBAL_STATS_LEN ARRAY_SIZE(fm10k_gstrings_stats)\n+static const struct fm10k_stats fm10k_gstrings_pf_stats[] = {\n+\tFM10K_STAT(\"timeout\", stats.timeout.count),\n+\tFM10K_STAT(\"ur\", stats.ur.count),\n+\tFM10K_STAT(\"ca\", stats.ca.count),\n+\tFM10K_STAT(\"um\", stats.um.count),\n+\tFM10K_STAT(\"xec\", stats.xec.count),\n+\tFM10K_STAT(\"vlan_drop\", stats.vlan_drop.count),\n+\tFM10K_STAT(\"loopback_drop\", stats.loopback_drop.count),\n+\tFM10K_STAT(\"nodesc_drop\", stats.nodesc_drop.count),\n+};\n+\n+#define FM10K_GLOBAL_STATS_LEN ARRAY_SIZE(fm10k_gstrings_global_stats)\n+#define FM10K_PF_STATS_LEN ARRAY_SIZE(fm10k_gstrings_pf_stats)\n \n #define FM10K_QUEUE_STATS_LEN(_n) \\\n \t( (_n) * 2 * (sizeof(struct fm10k_queue_stats) / sizeof(u64)))\n@@ -133,11 +136,18 @@ static void fm10k_get_strings(struct net_device *dev, u32 stringset, u8 *data)\n \t\t\tp += ETH_GSTRING_LEN;\n \t\t}\n \t\tfor (i = 0; i < FM10K_GLOBAL_STATS_LEN; i++) {\n-\t\t\tmemcpy(p, fm10k_gstrings_stats[i].stat_string,\n+\t\t\tmemcpy(p, fm10k_gstrings_global_stats[i].stat_string,\n \t\t\t ETH_GSTRING_LEN);\n \t\t\tp += ETH_GSTRING_LEN;\n \t\t}\n \n+\t\tif (interface->hw.mac.type != fm10k_mac_vf)\n+\t\t\tfor (i = 0; i < FM10K_PF_STATS_LEN; i++) {\n+\t\t\t\tmemcpy(p, fm10k_gstrings_pf_stats[i].stat_string,\n+\t\t\t\t ETH_GSTRING_LEN);\n+\t\t\t\tp += ETH_GSTRING_LEN;\n+\t\t\t}\n+\n \t\tfor (i = 0; i < interface->hw.mac.max_queues; i++) {\n \t\t\tsprintf(p, \"tx_queue_%u_packets\", i);\n \t\t\tp += ETH_GSTRING_LEN;\n@@ -163,6 +173,10 @@ static int fm10k_get_sset_count(struct net_device *dev, int sset)\n \t\treturn FM10K_TEST_LEN;\n \tcase ETH_SS_STATS:\n \t\tstats_len += FM10K_QUEUE_STATS_LEN(hw->mac.max_queues);\n+\n+\t\tif (hw->mac.type != fm10k_mac_vf)\n+\t\t\tstats_len += FM10K_PF_STATS_LEN;\n+\n \t\treturn stats_len;\n \tdefault:\n \t\treturn -EOPNOTSUPP;\n@@ -188,11 +202,20 @@ static void fm10k_get_ethtool_stats(struct net_device *netdev,\n \t}\n \n \tfor (i = 0; i < FM10K_GLOBAL_STATS_LEN; i++) {\n-\t\tp = (char *)interface + fm10k_gstrings_stats[i].stat_offset;\n-\t\t*(data++) = (fm10k_gstrings_stats[i].sizeof_stat ==\n+\t\tp = (char *)interface +\n+\t\t fm10k_gstrings_global_stats[i].stat_offset;\n+\t\t*(data++) = (fm10k_gstrings_global_stats[i].sizeof_stat ==\n \t\t\tsizeof(u64)) ? *(u64 *)p : *(u32 *)p;\n \t}\n \n+\tif (interface->hw.mac.type != fm10k_mac_vf)\n+\t\tfor (i = 0; i < FM10K_PF_STATS_LEN; i++) {\n+\t\t\tp = (char *)interface +\n+\t\t\t fm10k_gstrings_pf_stats[i].stat_offset;\n+\t\t\t*(data++) = (fm10k_gstrings_pf_stats[i].sizeof_stat ==\n+\t\t\t\t sizeof(u64)) ? *(u64 *)p : *(u32 *)p;\n+\t\t}\n+\n \tfor (i = 0; i < interface->hw.mac.max_queues; i++) {\n \t\tstruct fm10k_ring *ring;\n \t\tu64 *queue_stat;\n", "prefixes": [ "net-next", "10/25" ] }