* [Intel-wired-lan] [net v2] i40e: fix unsigned stat widths
[not found] <202112090744.QwfPrzIW-lkp@intel.com>
@ 2021-12-09 1:56 ` Joe Damato
2022-01-06 3:29 ` G, GurucharanX
0 siblings, 1 reply; 2+ messages in thread
From: Joe Damato @ 2021-12-09 1:56 UTC (permalink / raw)
To: intel-wired-lan
Change i40e_update_vsi_stats and struct i40e_vsi to use u64 fields to match
the width of the stats counters in struct i40e_rx_queue_stats.
Update debugfs code to use the correct format specifier for u64.
Signed-off-by: Joe Damato <jdamato@fastly.com>
Reported-by: kernel test robot <lkp@intel.com>
---
v1 -> v2: make tx_restart and tx_busy also u64, and fix format specifiers in
debugfs code
drivers/net/ethernet/intel/i40e/i40e.h | 8 ++++----
drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 2 +-
drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 4d939af..9a4c410 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -848,12 +848,12 @@ struct i40e_vsi {
struct rtnl_link_stats64 net_stats_offsets;
struct i40e_eth_stats eth_stats;
struct i40e_eth_stats eth_stats_offsets;
- u32 tx_restart;
- u32 tx_busy;
+ u64 tx_restart;
+ u64 tx_busy;
u64 tx_linearize;
u64 tx_force_wb;
- u32 rx_buf_failed;
- u32 rx_page_failed;
+ u64 rx_buf_failed;
+ u64 rx_page_failed;
/* These are containers of ring pointers, allocated at run-time */
struct i40e_ring **rx_rings;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index 291e61a..c2c09dc 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -240,7 +240,7 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
(unsigned long int)vsi->net_stats_offsets.rx_compressed,
(unsigned long int)vsi->net_stats_offsets.tx_compressed);
dev_info(&pf->pdev->dev,
- " tx_restart = %d, tx_busy = %d, rx_buf_failed = %d, rx_page_failed = %d\n",
+ " tx_restart = %llu, tx_busy = %llu, rx_buf_failed = %llu, rx_page_failed = %llu\n",
vsi->tx_restart, vsi->tx_busy,
vsi->rx_buf_failed, vsi->rx_page_failed);
rcu_read_lock();
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e118cf9..3352328 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -754,9 +754,9 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
struct rtnl_link_stats64 *ns; /* netdev stats */
struct i40e_eth_stats *oes;
struct i40e_eth_stats *es; /* device's eth stats */
- u32 tx_restart, tx_busy;
+ u64 tx_restart, tx_busy;
struct i40e_ring *p;
- u32 rx_page, rx_buf;
+ u64 rx_page, rx_buf;
u64 bytes, packets;
unsigned int start;
u64 tx_linearize;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-wired-lan] [net v2] i40e: fix unsigned stat widths
2021-12-09 1:56 ` [Intel-wired-lan] [net v2] i40e: fix unsigned stat widths Joe Damato
@ 2022-01-06 3:29 ` G, GurucharanX
0 siblings, 0 replies; 2+ messages in thread
From: G, GurucharanX @ 2022-01-06 3:29 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Joe Damato <jdamato@fastly.com>
> Sent: Thursday, December 9, 2021 7:27 AM
> To: netdev at vger.kernel.org
> Cc: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; intel-wired-lan at lists.osuosl.org;
> kuba at kernel.org; davem at davemloft.net; Joe Damato <jdamato@fastly.com>
> Subject: [net v2] i40e: fix unsigned stat widths
>
> Change i40e_update_vsi_stats and struct i40e_vsi to use u64 fields to match
> the width of the stats counters in struct i40e_rx_queue_stats.
>
> Update debugfs code to use the correct format specifier for u64.
>
> Signed-off-by: Joe Damato <jdamato@fastly.com>
> Reported-by: kernel test robot <lkp@intel.com>
> ---
> v1 -> v2: make tx_restart and tx_busy also u64, and fix format specifiers in
> debugfs code
>
> drivers/net/ethernet/intel/i40e/i40e.h | 8 ++++----
> drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 2 +-
> drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-06 3:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202112090744.QwfPrzIW-lkp@intel.com>
2021-12-09 1:56 ` [Intel-wired-lan] [net v2] i40e: fix unsigned stat widths Joe Damato
2022-01-06 3:29 ` G, GurucharanX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox