Commit 85aac107 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

pkgdep/git: Add patch for ICE to address changes in recent (6.3) kernels



6.3 kernel builds are available now for fedora37.

Change-Id: I36b3cda64a7fda66949f01eca9b01f4b0d80cf44
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18516


Reviewed-by: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
parent bd2dff22
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -345,6 +345,13 @@ function install_ice() {
		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1
	fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-devlink-info-driver.patch"

	if ge "$kernel_ver" 6.3.0; then
		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1 \
			 < "$rootdir/test/common/config/pkgdep/patches/ice/0001-devlink-set-features.patch"
		patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1 \
			 < "$rootdir/test/common/config/pkgdep/patches/ice/0001-stats-fetch_*_irq.patch"
	fi

	(
		cd "$GIT_REPOS/ice-$ICE_VERSION/src"
		sudo make -j"$(nproc)" install
+22 −0
Original line number Diff line number Diff line
devlink_set_features() was completely removed in 6.3, see:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fb8421a94c5613fee86e192bab0892ecb1d56e4c
---
 src/kcompat_std_defs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/kcompat_std_defs.h b/src/kcompat_std_defs.h
index 00f3e4d..eea3b0b 100644
--- a/src/kcompat_std_defs.h
+++ b/src/kcompat_std_defs.h
@@ -372,4 +372,9 @@
 #undef HAVE_NDO_GET_DEVLINK_PORT
 #endif /* 6.2.0 */
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(6,3,0))
+#else
+#undef HAVE_DEVLINK_SET_FEATURES
+#endif
+
 #endif /* _KCOMPAT_STD_DEFS_H_ */
-- 
+26 −0
Original line number Diff line number Diff line
u64_stats_fetch_*_irq() variants were recently removed and are not
available anymore in fedora's 6.3 builds. See:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=068c38ad88ccb09e5e966d4db5cedab0e02b3b95
---
 src/ice_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ice_main.c b/src/ice_main.c
index 7bdd417..88b11fc 100644
--- a/src/ice_main.c
+++ b/src/ice_main.c
@@ -8555,10 +8555,10 @@ ice_fetch_u64_stats_per_ring(struct ice_ring_stats *ring_stat, u64 *pkts,
 	if (!ring_stat)
 		return;
 	do {
-		start = u64_stats_fetch_begin_irq(&ring_stat->syncp);
+		start = u64_stats_fetch_begin(&ring_stat->syncp);
 		*pkts = ring_stat->stats.pkts;
 		*bytes = ring_stat->stats.bytes;
-	} while (u64_stats_fetch_retry_irq(&ring_stat->syncp, start));
+	} while (u64_stats_fetch_retry(&ring_stat->syncp, start));
 }
 
 /**
--