All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, michael.chan@broadcom.com,
	saeedm@nvidia.com, leon@kernel.org, ecree.xilinx@gmail.com,
	habetsm.xilinx@gmail.com, f.fainelli@gmail.com, andrew@lunn.ch,
	mkubecek@suse.cz, ariela@nvidia.com,
	Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next 1/6] ethtool: move ethtool_stats_init
Date: Tue, 13 Apr 2021 20:44:49 -0700	[thread overview]
Message-ID: <20210414034454.1970967-2-kuba@kernel.org> (raw)
In-Reply-To: <20210414034454.1970967-1-kuba@kernel.org>

We'll need it for FEC stats as well.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 include/linux/ethtool.h | 6 ++++++
 net/ethtool/pause.c     | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 9f6f323af59a..069100b252bd 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -244,6 +244,12 @@ bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
 
 #define ETHTOOL_STAT_NOT_SET	(~0ULL)
 
+static inline void ethtool_stats_init(u64 *stats, unsigned int n)
+{
+	while (n--)
+		stats[n] = ETHTOOL_STAT_NOT_SET;
+}
+
 /**
  * struct ethtool_pause_stats - statistics for IEEE 802.3x pause frames
  * @tx_pause_frames: transmitted pause frame count. Reported to user space
diff --git a/net/ethtool/pause.c b/net/ethtool/pause.c
index d4ac02718b72..9009f412151e 100644
--- a/net/ethtool/pause.c
+++ b/net/ethtool/pause.c
@@ -21,12 +21,6 @@ const struct nla_policy ethnl_pause_get_policy[] = {
 		NLA_POLICY_NESTED(ethnl_header_policy_stats),
 };
 
-static void ethtool_stats_init(u64 *stats, unsigned int n)
-{
-	while (n--)
-		stats[n] = ETHTOOL_STAT_NOT_SET;
-}
-
 static int pause_prepare_data(const struct ethnl_req_info *req_base,
 			      struct ethnl_reply_data *reply_base,
 			      struct genl_info *info)
-- 
2.30.2


  reply	other threads:[~2021-04-14  3:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  3:44 [PATCH net-next 0/6] ethtool: add standard FEC statistics Jakub Kicinski
2021-04-14  3:44 ` Jakub Kicinski [this message]
2021-04-14  3:44 ` [PATCH net-next 2/6] ethtool: fec_prepare_data() - jump to error handling Jakub Kicinski
2021-04-14  3:44 ` [PATCH net-next 3/6] ethtool: add FEC statistics Jakub Kicinski
2021-04-15  6:25   ` Saeed Mahameed
2021-04-15 15:21     ` Jakub Kicinski
2021-04-15 22:33       ` Saeed Mahameed
2021-04-14  3:44 ` [PATCH net-next 4/6] bnxt: implement ethtool::get_fec_stats Jakub Kicinski
2021-04-15 20:58   ` Michael Chan
2021-04-14  3:44 ` [PATCH net-next 5/6] sfc: ef10: " Jakub Kicinski
2021-04-19 12:39   ` Edward Cree
2021-04-14  3:44 ` [PATCH net-next 6/6] mlx5: " Jakub Kicinski
2021-04-15  6:37   ` Saeed Mahameed

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=20210414034454.1970967-2-kuba@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=ariela@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=f.fainelli@gmail.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=leon@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@nvidia.com \
    /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.