All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH v6 0/2] fix ethtool statistics patches
Date: Fri,  4 Mar 2016 15:37:46 -0800	[thread overview]
Message-ID: <1457134668-19142-1-git-send-email-jacob.e.keller@intel.com> (raw)

This series fixes the ethtool patches on Jeff's next-queue. First, I
fixed a bug in the fm10k ethtool stat helpers which had assumed the
allocated memory was already zeroed. The new code assumes it is not, and
always rights 0s. In addition, I fixed Bruce's comment about the
newline. Since I had to change the first patch, I rebased them both
against the top of Jeff's queue and merged some of the code. The first
patch in this series now handles the per-queue stats, while the second
patch does the work to remove the incorrect support for
debug-statistics.

The first patch is a direct replacement for 1256b40cb7b4 ("fm10k: add
helper functions to set strings and data for ethtool stats", 2016-03-04)

The second patch is a direct replacement for 2d6c14d75442 ("fm10k:
cleanup fm10k stats and remove debug-statistics", 2016-03-04)

The interdiff between the previous version of these patches and the
current version of the patches (to help with review) is:

diff --git c/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c w/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
index 3941b80ab2d2..a41a35082ddb 100644
--- c/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
+++ w/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c
@@ -130,7 +130,6 @@ static const struct fm10k_stats fm10k_gstrings_queue_stats[] = {
 				FM10K_NETDEV_STATS_LEN + \
 				FM10K_MBX_STATS_LEN)
 
-
 static const char fm10k_gstrings_test[][ETH_GSTRING_LEN] = {
 	"Mailbox test (on/offline)"
 };
@@ -246,9 +245,10 @@ static void fm10k_add_ethtool_stats(u64 **data, void *pointer,
 	unsigned int i;
 	char *p;
 
-	/* simply skip forward if we were not given a valid pointer */
 	if (!pointer) {
-		*data += size;
+		/* memory is not zero allocated so we have to clear it */
+		for (i = 0; i < size; i++)
+			*((*data)++) = 0;
 		return;
 	}
 
Jacob Keller (2):
  fm10k: add helper functions to set strings and data for ethtool stats
  fm10k: remove remove debug-statistics support

 drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 259 +++++++++--------------
 1 file changed, 100 insertions(+), 159 deletions(-)

-- 
2.7.1.429.g45cd78e


             reply	other threads:[~2016-03-04 23:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 23:37 Jacob Keller [this message]
2016-03-04 23:37 ` [Intel-wired-lan] [PATCH v6 1/2] fm10k: add helper functions to set strings and data for ethtool stats Jacob Keller
2016-03-30 22:51   ` Singh, Krishneil K
2016-03-04 23:37 ` [Intel-wired-lan] [PATCH v6 2/2] fm10k: remove remove debug-statistics support Jacob Keller
2016-03-30 22:50   ` Singh, Krishneil K
2016-03-04 23:38 ` [Intel-wired-lan] [PATCH v6 0/2] fix ethtool statistics patches Keller, Jacob E

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457134668-19142-1-git-send-email-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.