!26 fix build error beacuse of kernel api changes

From: @yangl777 
Reviewed-by: @sunsuwan 
Signed-off-by: @sunsuwan
This commit is contained in:
openeuler-ci-bot 2023-07-18 11:19:24 +00:00 committed by Gitee
commit ccebee4b4a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 100 additions and 1 deletions

View File

@ -0,0 +1,91 @@
From 068c38ad88ccb09e5e966d4db5cedab0e02b3b95 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Wed, 26 Oct 2022 15:22:14 +0200
Subject: net: Remove the obsolte u64_stats_fetch_*_irq() users (drivers).
Now that the 32bit UP oddity is gone and 32bit uses always a sequence
count, there is no need for the fetch_irq() variants anymore.
Convert to the regular interface.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
src/iavf_ethtool_stats.h | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/iavf_ethtool_stats.h b/src/iavf_ethtool_stats.h
index 2c658aa..2733c0e 100644
--- a/src/iavf_ethtool_stats.h
+++ b/src/iavf_ethtool_stats.h
@@ -228,7 +228,7 @@ enum iavf_chnl_stat_type {
* @stat_type: stat_type could be TX/TX/VECTOR
*
* Queue statistics must be copied while protected by
- * u64_stats_fetch_begin_irq, so we can't directly use iavf_add_ethtool_stats.
+ * u64_stats_fetch_begin, so we can't directly use iavf_add_ethtool_stats.
* Assumes that queue stats are defined in iavf_gstrings_queue_stats. If the
* ring pointer is null, zero out the queue stat values and update the data
* pointer. Otherwise safely copy the stats from the ring into the supplied
@@ -273,12 +273,12 @@ iavf_add_queue_stats_chnl(u64 **data, struct iavf_ring *ring,
/* To avoid invalid statistics values, ensure that we keep retrying
* the copy until we get a consistent value according to
- * u64_stats_fetch_retry_irq. But first, make sure our ring is
+ * u64_stats_fetch_retry. But first, make sure our ring is
* non-null before attempting to access its syncp.
*/
#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);
#endif
for (i = 0; i < size; i++) {
void *ptr = ring;
@@ -289,7 +289,7 @@ iavf_add_queue_stats_chnl(u64 **data, struct iavf_ring *ring,
&stats[i]);
}
#ifdef HAVE_NDO_GET_STATS64
- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
+ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
#endif
/* Once we successfully copy the stats in, update the data pointer */
@@ -302,7 +302,7 @@ iavf_add_queue_stats_chnl(u64 **data, struct iavf_ring *ring,
* @ring: the ring to copy
*
* Queue statistics must be copied while protected by
- * u64_stats_fetch_begin_irq, so we can't directly use iavf_add_ethtool_stats.
+ * u64_stats_fetch_begin, so we can't directly use iavf_add_ethtool_stats.
* Assumes that queue stats are defined in iavf_gstrings_queue_stats. If the
* ring pointer is null, zero out the queue stat values and update the data
* pointer. Otherwise safely copy the stats from the ring into the supplied
@@ -322,19 +322,19 @@ iavf_add_queue_stats(u64 **data, struct iavf_ring *ring)
/* To avoid invalid statistics values, ensure that we keep retrying
* the copy until we get a consistent value according to
- * u64_stats_fetch_retry_irq. But first, make sure our ring is
+ * u64_stats_fetch_retry. But first, make sure our ring is
* non-null before attempting to access its syncp.
*/
#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);
#endif
for (i = 0; i < size; i++) {
iavf_add_one_ethtool_stat(&(*data)[i], ring,
&stats[i]);
}
#ifdef HAVE_NDO_GET_STATS64
- } while (ring && u64_stats_fetch_retry_irq(&ring->syncp, start));
+ } while (ring && u64_stats_fetch_retry(&ring->syncp, start));
#endif
/* Once we successfully copy the stats in, update the data pointer */
--
2.33.0

View File

@ -9,7 +9,7 @@
Name: iavf Name: iavf
Summary: Intel(R) Ethernet Adaptive Virtual Function Driver Summary: Intel(R) Ethernet Adaptive Virtual Function Driver
Version: 4.7.0 Version: 4.7.0
Release: 1 Release: 2
Vendor: Intel Corporation Vendor: Intel Corporation
License: GPL-2.0 License: GPL-2.0
URL: http://support.intel.com URL: http://support.intel.com
@ -19,6 +19,8 @@ Requires: kernel, findutils, gawk, bash, hwdata
BuildRequires: kernel-devel hwdata uname-build-checks gcc BuildRequires: kernel-devel hwdata uname-build-checks gcc
Patch0: backport-fix-build-error-with-Linux-6.4.patch
%description %description
This package contains the Intel(R) Ethernet Adaptive Virtual Function Driver. This package contains the Intel(R) Ethernet Adaptive Virtual Function Driver.
@ -396,6 +398,12 @@ else
fi fi
%changelog %changelog
* Tue Jul 18 2023 yanglu <yanglu72@h-partners.com> - 4.7.0-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error beacuse of kernel api changes
* Wed Feb 01 2023 yanglu <yanglu72@h-partners.com> - 4.7.0-1 * Wed Feb 01 2023 yanglu <yanglu72@h-partners.com> - 4.7.0-1
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA