Skip to content

Commit

Permalink
linux, linux-rt: Added out of tree Intel ice driver Support
Browse files Browse the repository at this point in the history
Change-Id: I8a51db927a76c70a00e1ef71dec236b620a2d25a
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/12356
Tested-by: Srivatsa S. Bhat <[email protected]>
Reviewed-by: Srivatsa S. Bhat <[email protected]>
  • Loading branch information
jaankit authored and Srivatsa S. Bhat committed Feb 18, 2021
1 parent b93d0fb commit c31e4f9
Show file tree
Hide file tree
Showing 4 changed files with 108 additions and 5 deletions.
4 changes: 1 addition & 3 deletions SPECS/linux/config-rt
Original file line number Diff line number Diff line change
Expand Up @@ -2415,7 +2415,7 @@ CONFIG_IXGBE_DCB=y
CONFIG_IXGBEVF=m
# CONFIG_I40E is not set
# CONFIG_I40EVF is not set
CONFIG_ICE=m
# CONFIG_ICE is not set
CONFIG_FM10K=m
# CONFIG_IGC is not set
CONFIG_JME=m
Expand Down Expand Up @@ -5744,8 +5744,6 @@ CONFIG_SBITMAP=y
# CONFIG_STRING_SELFTEST is not set
# end of Library routines

CONFIG_PLDMFW=y

#
# Kernel hacking
#
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From 49215085c6144fec9f84d0f12a1b7ed26d362a45 Mon Sep 17 00:00:00 2001
From: Ankit Jain <[email protected]>
Date: Mon, 1 Feb 2021 13:45:41 +0000
Subject: [PATCH] Use PTP_SYS_OFFSET_EXTENDED_IOCTL support

Signed-off-by: Ankit Jain <[email protected]>
---
src/kcompat.h | 22 ----------------------
1 file changed, 22 deletions(-)

diff --git a/src/kcompat.h b/src/kcompat.h
index a27dc2b..f25f388 100644
--- a/src/kcompat.h
+++ b/src/kcompat.h
@@ -3144,29 +3144,7 @@ _kc_dev_change_flags(struct net_device *netdev, unsigned int flags,

#define dev_change_flags _kc_dev_change_flags
#endif /* !(RHEL_RELEASE_CODE && RHEL > RHEL(8,0)) */
-#if (RHEL_RELEASE_CODE && \
- (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(7,7) && \
- RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(8,0)) || \
- (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,1)))
#define HAVE_PTP_SYS_OFFSET_EXTENDED_IOCTL
-#else /* RHEL >= 7.7 && RHEL < 8.0 || RHEL >= 8.1 */
-struct ptp_system_timestamp {
- struct timespec64 pre_ts;
- struct timespec64 post_ts;
-};
-
-static inline void
-ptp_read_system_prets(struct ptp_system_timestamp __always_unused *sts)
-{
- ;
-}
-
-static inline void
-ptp_read_system_postts(struct ptp_system_timestamp __always_unused *sts)
-{
- ;
-}
-#endif /* !(RHEL >= 7.7 && RHEL != 8.0) */
#if (RHEL_RELEASE_CODE && (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,1)))
#define HAVE_NDO_BRIDGE_SETLINK_EXTACK
#endif /* RHEL 8.1 */
--
2.23.1

31 changes: 30 additions & 1 deletion SPECS/linux/linux-rt.spec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Name: linux-rt
Version: 5.10.4
# Keep rt_version matched up with localversion.patch
%define rt_version rt22
Release: 6%{?kat_build:.kat}%{?dist}
Release: 7%{?kat_build:.kat}%{?dist}
License: GPLv2
URL: http://www.kernel.org/
Group: System Environment/Kernel
Expand All @@ -43,6 +43,9 @@ Source6: https://sourceforge.net/projects/e1000/files/i40e%20stable/%{i40e_versi
%define iavf_version 4.0.2
Source7: https://sourceforge.net/projects/e1000/files/iavf%20stable/%{iavf_version}/iavf-%{iavf_version}.tar.gz
%define sha1 iavf=a53cb104a3b04cbfbec417f7cadda6fddf51b266
%define ice_version 1.3.2
Source8: https://sourceforge.net/projects/e1000/files/ice%20stable/%{ice_version}/ice-%{ice_version}.tar.gz
%define sha1 ice=19507794824da33827756389ac8018aa84e9c427
%if 0%{?fips}
%define fips_canister_version 4.0.1-5.10.4-5-secure
Source16: fips-canister-%{fips_canister_version}.tar.bz2
Expand Down Expand Up @@ -368,6 +371,9 @@ Patch1500: i40e-xdp-remove-XDP_QUERY_PROG-and-XDP_QUERY_PROG_HW-XDP-.patch
Patch1501: i40e-Fix-minor-compilation-error.patch
Patch1502: 0001-Add-support-for-gettimex64-interface.patch

#Patches for ice driver
Patch1510: 0001-Use-PTP_SYS_OFFSET_EXTENDED_IOCTL-support.patch

BuildArch: x86_64

BuildRequires: bc
Expand Down Expand Up @@ -416,6 +422,7 @@ The Linux package contains the Linux kernel doc files
%setup -D -b 3 -n linux-%{version}
%setup -D -b 6 -n linux-%{version}
%setup -D -b 7 -n linux-%{version}
%setup -D -b 8 -n linux-%{version}
%endif
%if 0%{?fips}
%setup -D -b 16 -n linux-%{version}
Expand Down Expand Up @@ -732,6 +739,11 @@ pushd ../i40e-%{i40e_version}
%patch1502 -p1
popd

#Patches for ice driver
pushd ../ice-%{ice_version}
%patch1510 -p1
popd

%build
make mrproper

Expand Down Expand Up @@ -777,6 +789,13 @@ pushd ../iavf-%{iavf_version}
make -C src KSRC=$bldroot clean
make -C src KSRC=$bldroot %{?_smp_mflags}
popd

# build ice module
bldroot=`pwd`
pushd ../ice-%{ice_version}
make -C src KSRC=$bldroot clean
make -C src KSRC=$bldroot %{?_smp_mflags}
popd
%endif

%define __modules_install_post \
Expand Down Expand Up @@ -825,6 +844,12 @@ pushd ../iavf-%{iavf_version}
make -C src KSRC=$bldroot INSTALL_MOD_PATH=%{buildroot} INSTALL_MOD_DIR=extra MANDIR=%{_mandir} modules_install mandocs_install
popd

# install ice module
bldroot=`pwd`
pushd ../ice-%{ice_version}
make -C src KSRC=$bldroot INSTALL_MOD_PATH=%{buildroot} INSTALL_MOD_DIR=extra MANDIR=%{_mandir} modules_install mandocs_install
popd

# Verify for build-id match
# We observe different IDs sometimes
# TODO: debug it
Expand Down Expand Up @@ -897,6 +922,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
/lib/modules/%{uname_r}/*
%exclude /lib/modules/%{uname_r}/build
/etc/modprobe.d/iavf.conf
# ICE driver firmware files are packaged in linux-firmware
%exclude /lib/firmware/updates/intel/ice

%files docs
%defattr(-,root,root)
Expand All @@ -909,6 +936,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
%{_usrsrc}/%{name}-headers-%{uname_r}

%changelog
* Wed Feb 17 2021 Ankit Jain <[email protected]> 5.10.4-7
- Added latest out of tree version of Intel ice driver
* Wed Feb 17 2021 Vikash Bansal <[email protected]> 5.10.4-6
- Added support for RT RUNTIME GREED
* Mon Feb 15 2021 Keerthana K <[email protected]> 5.10.4-5
Expand Down
31 changes: 30 additions & 1 deletion SPECS/linux/linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
Summary: Kernel
Name: linux
Version: 5.10.4
Release: 10%{?kat_build:.kat}%{?dist}
Release: 11%{?kat_build:.kat}%{?dist}
License: GPLv2
URL: http://www.kernel.org/
Group: System Environment/Kernel
Expand Down Expand Up @@ -52,6 +52,9 @@ Source10: https://sourceforge.net/projects/e1000/files/i40e%20stable/%{i40
Source11: https://sourceforge.net/projects/e1000/files/iavf%20stable/%{iavf_version}/iavf-%{iavf_version}.tar.gz
%define sha1 iavf=a53cb104a3b04cbfbec417f7cadda6fddf51b266
Source12: ena-Use-new-API-interface-after-napi_hash_del-.patch
%define ice_version 1.3.2
Source13: https://sourceforge.net/projects/e1000/files/ice%20stable/%{ice_version}/ice-%{ice_version}.tar.gz
%define sha1 ice=19507794824da33827756389ac8018aa84e9c427
%if 0%{?fips}
%define fips_canister_version 4.0.1-5.10.4-5-secure
Source16: fips-canister-%{fips_canister_version}.tar.bz2
Expand Down Expand Up @@ -128,6 +131,9 @@ Patch1500: i40e-xdp-remove-XDP_QUERY_PROG-and-XDP_QUERY_PROG_HW-XDP-.patch
Patch1501: i40e-Fix-minor-compilation-error.patch
Patch1502: 0001-Add-support-for-gettimex64-interface.patch

#Patches for ice driver
Patch1510: 0001-Use-PTP_SYS_OFFSET_EXTENDED_IOCTL-support.patch

BuildRequires: bc
BuildRequires: kmod-devel
BuildRequires: glib-devel
Expand Down Expand Up @@ -237,6 +243,7 @@ Python programming language to use the interface to manipulate perf events.
%setup -D -b 5 -n linux-%{version}
%setup -D -b 10 -n linux-%{version}
%setup -D -b 11 -n linux-%{version}
%setup -D -b 13 -n linux-%{version}
%endif

%if 0%{?fips}
Expand Down Expand Up @@ -304,6 +311,11 @@ pushd ../i40e-%{i40e_version}
%patch1502 -p1
popd

#Patches for ice driver
pushd ../ice-%{ice_version}
%patch1510 -p1
popd

%endif

%build
Expand Down Expand Up @@ -367,6 +379,13 @@ pushd ../iavf-%{iavf_version}
make -C src KSRC=$bldroot clean
make -C src KSRC=$bldroot %{?_smp_mflags}
popd

# build ice module
bldroot=`pwd`
pushd ../ice-%{ice_version}
make -C src KSRC=$bldroot clean
make -C src KSRC=$bldroot %{?_smp_mflags}
popd
%endif

%define __modules_install_post \
Expand Down Expand Up @@ -428,6 +447,12 @@ pushd ../iavf-%{iavf_version}
make -C src KSRC=$bldroot INSTALL_MOD_PATH=%{buildroot} INSTALL_MOD_DIR=extra MANDIR=%{_mandir} modules_install mandocs_install
popd

# install ice module
bldroot=`pwd`
pushd ../ice-%{ice_version}
make -C src KSRC=$bldroot INSTALL_MOD_PATH=%{buildroot} INSTALL_MOD_DIR=extra MANDIR=%{_mandir} modules_install mandocs_install
popd

# Verify for build-id match
# We observe different IDs sometimes
# TODO: debug it
Expand Down Expand Up @@ -544,6 +569,8 @@ getent group sgx_prv >/dev/null || groupadd -r sgx_prv
%exclude /lib/modules/%{uname_r}/kernel/arch/x86/oprofile/
%exclude /lib/modules/%{uname_r}/extra/intel_sgx.ko.xz
/etc/modprobe.d/iavf.conf
# ICE driver firmware files are packaged in linux-firmware
%exclude /lib/firmware/updates/intel/ice
%endif

%files docs
Expand Down Expand Up @@ -615,6 +642,8 @@ getent group sgx_prv >/dev/null || groupadd -r sgx_prv
%{python3_sitelib}/*

%changelog
* Wed Feb 17 2021 Ankit Jain <[email protected]> 5.10.4-11
- Added latest out of tree version of Intel ice driver
* Tue Feb 16 2021 Alexey Makhalov <[email protected]> 5.10.4-10
- Fix perf compilation issue with gcc-10.2.0 for aarch64
* Mon Feb 15 2021 Keerthana K <[email protected]> 5.10.4-9
Expand Down

0 comments on commit c31e4f9

Please sign in to comment.