111 lines
3.8 KiB
Diff
111 lines
3.8 KiB
Diff
|
|
From 068c38ad88ccb09e5e966d4db5cedab0e02b3b95 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
||
|
|
Date: Wed, 26 Oct 2022 15:22:27 +0200
|
||
|
|
Subject: [PATCH] Remove the obsolte u64_stats_fetch_*_irq users
|
||
|
|
|
||
|
|
Conflict:NA
|
||
|
|
Reference:https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=068c38ad88ccb09e5e966d4db5ce
|
||
|
|
dab0e02b3b95
|
||
|
|
---
|
||
|
|
src/i40e_ethtool_stats.h | 8 ++++----
|
||
|
|
src/i40e_main.c | 16 ++++++++--------
|
||
|
|
2 files changed, 12 insertions(+), 12 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/src/i40e_ethtool_stats.h b/src/i40e_ethtool_stats.h
|
||
|
|
index 0851064..e93acfe 100644
|
||
|
|
--- a/src/i40e_ethtool_stats.h
|
||
|
|
+++ b/src/i40e_ethtool_stats.h
|
||
|
|
@@ -190,10 +190,10 @@ i40e_add_queue_stats(u64 **data, struct i40e_ring *ring)
|
||
|
|
*/
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
do {
|
||
|
|
- start = !ring ? 0 : u64_stats_fetch_begin_irq(&ring->syncp);
|
||
|
|
+ start = !ring ? 0 : u64_stats_fetch_begin(&ring->syncp);
|
||
|
|
for (i = 0; i < size; i++)
|
||
|
|
i40e_add_one_ethtool_stat(&(*data)[i], ring, &stats[i]);
|
||
|
|
- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
|
||
|
|
+ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
|
||
|
|
#else
|
||
|
|
for (i = 0; i < size; i++)
|
||
|
|
i40e_add_one_ethtool_stat(&(*data)[i], ring, &stats[i]);
|
||
|
|
@@ -237,14 +237,14 @@ i40e_add_rx_queue_xdp_stats(u64 **data, struct i40e_ring *rx_ring)
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
do {
|
||
|
|
start = !rx_ring ? 0 :
|
||
|
|
- u64_stats_fetch_begin_irq(&rx_ring->syncp);
|
||
|
|
+ u64_stats_fetch_begin(&rx_ring->syncp);
|
||
|
|
#endif
|
||
|
|
for (i = 0; i < xdp_size; i++) {
|
||
|
|
i40e_add_one_ethtool_stat(&(*data)[i], rx_ring,
|
||
|
|
&xdp_stats[i]);
|
||
|
|
}
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
- } while (rx_ring && u64_stats_fetch_retry_irq(&rx_ring->syncp, start));
|
||
|
|
+ } while (rx_ring && u64_stats_fetch_retry(&rx_ring->syncp, start));
|
||
|
|
#endif
|
||
|
|
|
||
|
|
/* Once we successfully copy the stats in, update the data pointer */
|
||
|
|
diff --git a/src/i40e_main.c b/src/i40e_main.c
|
||
|
|
index ed4271e..170f033 100644
|
||
|
|
--- a/src/i40e_main.c
|
||
|
|
+++ b/src/i40e_main.c
|
||
|
|
@@ -482,10 +482,10 @@ static void i40e_get_netdev_stats_struct_tx(struct i40e_ring *ring,
|
||
|
|
unsigned int start;
|
||
|
|
|
||
|
|
do {
|
||
|
|
- start = u64_stats_fetch_begin_irq(&ring->syncp);
|
||
|
|
+ start = u64_stats_fetch_begin(&ring->syncp);
|
||
|
|
packets = ring->stats.packets;
|
||
|
|
bytes = ring->stats.bytes;
|
||
|
|
- } while (u64_stats_fetch_retry_irq(&ring->syncp, start));
|
||
|
|
+ } while (u64_stats_fetch_retry(&ring->syncp, start));
|
||
|
|
|
||
|
|
stats->tx_packets += packets;
|
||
|
|
stats->tx_bytes += bytes;
|
||
|
|
@@ -541,10 +541,10 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct(
|
||
|
|
rx_ring = &tx_ring[1];
|
||
|
|
|
||
|
|
do {
|
||
|
|
- start = u64_stats_fetch_begin_irq(&rx_ring->syncp);
|
||
|
|
+ start = u64_stats_fetch_begin(&rx_ring->syncp);
|
||
|
|
packets = rx_ring->stats.packets;
|
||
|
|
bytes = rx_ring->stats.bytes;
|
||
|
|
- } while (u64_stats_fetch_retry_irq(&rx_ring->syncp, start));
|
||
|
|
+ } while (u64_stats_fetch_retry(&rx_ring->syncp, start));
|
||
|
|
|
||
|
|
stats->rx_packets += packets;
|
||
|
|
stats->rx_bytes += bytes;
|
||
|
|
@@ -1011,12 +1011,12 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
|
||
|
|
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
do {
|
||
|
|
- start = u64_stats_fetch_begin_irq(&p->syncp);
|
||
|
|
+ start = u64_stats_fetch_begin(&p->syncp);
|
||
|
|
#endif
|
||
|
|
packets = p->stats.packets;
|
||
|
|
bytes = p->stats.bytes;
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
|
||
|
|
+ } while (u64_stats_fetch_retry(&p->syncp, start));
|
||
|
|
#endif
|
||
|
|
tx_b += bytes;
|
||
|
|
tx_p += packets;
|
||
|
|
@@ -1030,12 +1030,12 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
|
||
|
|
p = &p[1];
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
do {
|
||
|
|
- start = u64_stats_fetch_begin_irq(&p->syncp);
|
||
|
|
+ start = u64_stats_fetch_begin(&p->syncp);
|
||
|
|
#endif
|
||
|
|
packets = p->stats.packets;
|
||
|
|
bytes = p->stats.bytes;
|
||
|
|
#ifdef HAVE_NDO_GET_STATS64
|
||
|
|
- } while (u64_stats_fetch_retry_irq(&p->syncp, start));
|
||
|
|
+ } while (u64_stats_fetch_retry(&p->syncp, start));
|
||
|
|
#endif
|
||
|
|
rx_b += bytes;
|
||
|
|
rx_p += packets;
|
||
|
|
--
|
||
|
|
2.23.0
|
||
|
|
|