pgkdep/git: Patch ice driver under ubuntu1804

This is needed for the older kernel builds which include the following
change:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7240b60c98d6

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I8ac86885028d663b776ae8de6d9fb500ed997523
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9808
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Monica Kenguva <monica.kenguva@intel.com>
This commit is contained in:
Michal Berger 2021-10-08 13:47:11 +02:00 committed by Tomasz Zawadzki
parent 711a4a70e5
commit 3bcff0b2e4
2 changed files with 35 additions and 0 deletions

View File

@ -483,6 +483,12 @@ function install_ice() {
rm -rf "$GIT_REPOS/ice-$ICE_VERSION"
curl -L -o- "$ICE_DRIVER" | tar -C "$GIT_REPOS" -xzf -
if [[ $OSID == ubuntu && $OSVERSION == 18.04 ]]; then
if ge "$(< /proc/sys/kernel/osrelease)" 4.15.0-159; then
patch --dir="$GIT_REPOS/ice-$ICE_VERSION" -p1
fi < "$rootdir/test/common/config/pkgdep/patches/ice/0001-undef-skb-frag-off.patch"
fi
(
cd "$GIT_REPOS/ice-$ICE_VERSION/src"
sudo make -j"$(nproc)" install

View File

@ -0,0 +1,29 @@
Current versions of the ice driver redifine skb_frag_off*() on older kernels
(< 5.4.0). Unfortunately, ubuntu1804 kernel builds, 4.15, include this change
hence gcc complains with:
kcompat_impl.h:46:28: error: redefinition of skb_frag_off
This patch is meant to be used on a particular version of ubuntu to make sure
the driver can be built against the shipped kernel.
Details:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7240b60c98d6
---
src/kcompat_impl.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/kcompat_impl.h b/src/kcompat_impl.h
index 10d268c..715ce2a 100644
--- a/src/kcompat_impl.h
+++ b/src/kcompat_impl.h
@@ -42,6 +42,7 @@ static inline void net_prefetch(void *p)
* Implementing the wrappers directly for older kernels which still have the
* old implementation of skb_frag_t is trivial.
*/
+#undef NEED_SKB_FRAG_OFF_ACCESSORS
#ifdef NEED_SKB_FRAG_OFF_ACCESSORS
static inline unsigned int skb_frag_off(const skb_frag_t *frag)
{
--