Driver work: ice iavf and i40e in support of E810

Add ice driver (version 1.2.1) and upgrade iavf driver to
version 4.0.1.

The iavf upgrade to 4.0.1 requires upreving the i40e driver
to version 2.14.13 for compatibility.

Story: 2008436
Task: 41398

Signed-off-by: Babak Sarashki <babak.sarashki@windriver.com>
Change-Id: I80c29626360ad4d30798b982909cdba1dbd969e1
This commit is contained in:
Babak Sarashki 2021-02-12 10:25:54 +00:00
parent 3a4fce5ce6
commit 71eeead3cd
17 changed files with 176 additions and 28 deletions

View File

@ -15,6 +15,9 @@ kmod-iavf
# i40e-kmod
kmod-i40e
# ice-kmod
kmod-ice
# ixgbevf-kmod
kmod-ixgbevf

View File

@ -12,6 +12,9 @@ kmod-iavf-rt
# i40e-kmod
kmod-i40e-rt
# ice-kmod
kmod-ice-rt
# ixgbevf-kmod
kmod-ixgbevf-rt

View File

@ -28,6 +28,10 @@ kmod-i40e-rt
kmod-iavf
kmod-iavf-rt
# ice-kmod
kmod-ice
kmod-ice-rt
# ixgbevf-kmod
kmod-ixgbevf
kmod-ixgbevf-rt

View File

@ -2,6 +2,7 @@ kernel-std
kernel-modules/intel-e1000e
kernel-modules/intel-iavf
kernel-modules/intel-i40e
kernel-modules/intel-ice
kernel-modules/intel-ixgbevf
kernel-modules/intel-ixgbe
kernel-modules/intel-igb_uio

View File

@ -3,6 +3,7 @@ kernel-modules/mlnx-ofa_kernel
kernel-modules/intel-e1000e
kernel-modules/intel-iavf
kernel-modules/intel-i40e
kernel-modules/intel-ice
kernel-modules/intel-ixgbevf
kernel-modules/intel-ixgbe
kernel-modules/intel-igb_uio

View File

@ -1,8 +1,9 @@
dpdk-20.05.tar.gz#dpdk-20.05#https://fast.dpdk.org/rel/dpdk-20.05.tar.gz#http##
drbd-8.4.11-1.tar.gz#drbd-8.4.11-1#http://www.linbit.com/downloads/drbd/8.4/drbd-8.4.11-1.tar.gz#http##
e1000e-3.6.0.tar.gz#e1000e-3.6.0#https://sourceforge.net/projects/e1000/files/e1000e%20stable/3.6.0/e1000e-3.6.0.tar.gz#http##
i40e-2.11.29.tar.gz#i40e-2.11.29#https://sourceforge.net/projects/e1000/files/i40e%20stable/2.11.29/i40e-2.11.29.tar.gz/download#http##
iavf-3.9.5.tar.gz#iavf-3.9.5#https://sourceforge.net/projects/e1000/files/iavf%20stable/3.9.5/iavf-3.9.5.tar.gz/download#http##
i40e-2.14.13.tar.gz#i40e-2.14.13#https://sourceforge.net/projects/e1000/files/i40e%20stable/2.14.13/i40e-2.14.13.tar.gz/download#http##
iavf-4.0.1.tar.gz#iavf-4.0.1#https://sourceforge.net/projects/e1000/files/iavf%20stable/4.0.1/iavf-4.0.1.tar.gz/download#http##
ice-1.2.1.tar.gz#ice-1.2.1#https://sourceforge.net/projects/e1000/files/ice%20stable/1.2.1/ice-1.2.1.tar.gz/download#http##
ixgbe-5.6.5.tar.gz#ixgbe-5.6.5#https://sourceforge.net/projects/e1000/files/ixgbe%20stable/5.6.5/ixgbe-5.6.5.tar.gz/download#http##
ixgbevf-4.6.3.tar.gz#ixgbevf-4.6.3#https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/4.6.3/ixgbevf-4.6.3.tar.gz/download#http##
!kernel-rt-4.18.0-147.3.1.rt24.96.el8_1.src.rpm#kernel-rt#https://git.centos.org/rpms/kernel-rt#http_script#327ec52423c67051249291f131ec7f6fff44a828#post-dl-script/kernel-rt.sh

View File

@ -1,6 +1,6 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/i40e-2.11.29.tar.gz"
$STX_BASE/downloads/i40e-2.14.13.tar.gz"
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=58597630f681940c2a20cca75dc96c06ae9be15b

View File

@ -8,7 +8,7 @@
%define kmod_name i40e
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 2.11.29
Version: 2.14.13
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -1,7 +1,7 @@
From bb6e79b7b5231372af923c2961b4898f8ca6e6dc Mon Sep 17 00:00:00 2001
From 647a8819680fb79b0416d0883096e49cc746db0e Mon Sep 17 00:00:00 2001
From: Steven Webster <steven.webster@windriver.com>
Date: Thu, 25 Jun 2020 11:23:05 -0400
Subject: [PATCH 1/1] From b8c666367cd98a2b0033c043f6f206abd8e238a6 Mon Sep 17
Subject: [PATCH] From b8c666367cd98a2b0033c043f6f206abd8e238a6 Mon Sep 17
00:00:00 2001 Message-Id:
<b8c666367cd98a2b0033c043f6f206abd8e238a6.1572295393.git.Jim.Somerville@windriver.com>
From: Vadim Suraev <vsuraev@northforgeinc.com> Date: Mon, 8 Feb 2016 15:57:30
@ -14,16 +14,17 @@ Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: eric zhang <eric.zhang@windriver.com>
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Steven Webster <Steven.Webster@windriver.com>
Signed-off-by: Babak Sarashki <babak.sarashki@windriver.com>
---
src/i40e_virtchnl_pf.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++
src/virtchnl.h | 1 +
2 files changed, 79 insertions(+)
diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index 7e19a50..278b5fd 100644
index b7325d0..0542c92 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -2689,6 +2689,81 @@ err_out:
@@ -3198,6 +3198,81 @@ err_out:
aq_ret);
}
@ -105,7 +106,7 @@ index 7e19a50..278b5fd 100644
/**
* i40e_vc_config_queues_msg
* @vf: pointer to the VF info
@@ -4415,6 +4490,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
@@ -5065,6 +5140,9 @@ int i40e_vc_process_vf_msg(struct i40e_pf *pf, s16 vf_id, u32 v_opcode,
case VIRTCHNL_OP_REQUEST_QUEUES:
ret = i40e_vc_request_queues_msg(vf, msg);
break;
@ -116,15 +117,15 @@ index 7e19a50..278b5fd 100644
case VIRTCHNL_OP_ENABLE_CHANNELS:
ret = i40e_vc_add_qch_msg(vf, msg);
diff --git a/src/virtchnl.h b/src/virtchnl.h
index c1b1ab3..2e84c9b 100644
index 4db8bf4..b72f679 100644
--- a/src/virtchnl.h
+++ b/src/virtchnl.h
@@ -128,6 +128,7 @@ enum virtchnl_ops {
VIRTCHNL_OP_DISABLE_CHANNELS = 31,
VIRTCHNL_OP_ADD_CLOUD_FILTER = 32,
VIRTCHNL_OP_DEL_CLOUD_FILTER = 33,
@@ -132,6 +132,7 @@ enum virtchnl_ops {
/* opcodes 39, 40, 41, 42 and 43 are reserved */
/* opcode 44 is reserved */
/* opcode 45, 46, 47, 48 and 49 are reserved */
+ VIRTCHNL_OP_GET_LINK_STAT = 0x101,
/* opcodes 34, 35, 36, 37 and 38 are reserved */
VIRTCHNL_OP_MAX,
};
--

View File

@ -1,10 +1,7 @@
From 40b257ecf5d36abf14a4ef98fc2e44dba7100fea Mon Sep 17 00:00:00 2001
Message-Id: <40b257ecf5d36abf14a4ef98fc2e44dba7100fea.1572295393.git.Jim.Somerville@windriver.com>
In-Reply-To: <b8c666367cd98a2b0033c043f6f206abd8e238a6.1572295393.git.Jim.Somerville@windriver.com>
References: <b8c666367cd98a2b0033c043f6f206abd8e238a6.1572295393.git.Jim.Somerville@windriver.com>
From d25056d46d4b5406131274e79243ad7f18242039 Mon Sep 17 00:00:00 2001
From: Jim Somerville <Jim.Somerville@windriver.com>
Date: Mon, 26 Mar 2018 11:03:47 -0400
Subject: [PATCH 2/2] i40e add more debug info for VFs still in reset
Subject: [PATCH 1/2] i40e add more debug info for VFs still in reset
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
@ -12,10 +9,10 @@ Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c
index 21b4606..dfb9568 100644
index b07c9a0..50b1dbd 100644
--- a/src/i40e_virtchnl_pf.c
+++ b/src/i40e_virtchnl_pf.c
@@ -4363,8 +4363,8 @@ static int i40e_set_vf_mac(struct i40e_vf *vf, struct i40e_vsi *vsi,
@@ -5031,8 +5031,8 @@ static int i40e_set_vf_mac(struct i40e_vf *vf, struct i40e_vsi *vsi,
msleep(20);
}
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -26,7 +23,7 @@ index 21b4606..dfb9568 100644
ret = -EAGAIN;
goto error_param;
}
@@ -4522,8 +4522,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
@@ -5164,8 +5164,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
vf = &pf->vf[vf_id];
vsi = pf->vsi[vf->lan_vsi_idx];
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -37,7 +34,7 @@ index 21b4606..dfb9568 100644
ret = -EAGAIN;
goto error_pvid;
}
@@ -4678,8 +4678,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate)
@@ -5348,8 +5348,8 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int max_tx_rate)
vf = &pf->vf[vf_id];
vsi = pf->vsi[vf->lan_vsi_idx];
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -48,7 +45,7 @@ index 21b4606..dfb9568 100644
ret = -EAGAIN;
goto error;
}
@@ -4881,8 +4881,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)
@@ -5547,8 +5547,8 @@ int i40e_ndo_set_vf_spoofchk(struct net_device *netdev, int vf_id, bool enable)
vf = &(pf->vf[vf_id]);
if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states)) {
@ -60,5 +57,5 @@ index 21b4606..dfb9568 100644
goto out;
}
--
1.8.3.1
2.29.2

View File

@ -1,6 +1,6 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/iavf-3.9.5.tar.gz"
$STX_BASE/downloads/iavf-4.0.1.tar.gz"
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=58597630f681940c2a20cca75dc96c06ae9be15b

View File

@ -8,7 +8,7 @@
%define kmod_name iavf
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 3.9.5
Version: 4.0.1
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPLv2

View File

@ -0,0 +1,9 @@
COPY_LIST=" \
$PKG_BASE/files/* \
$STX_BASE/downloads/ice-1.2.1.tar.gz"
OPT_DEP_LIST_FOR_BUILD_TYPE[std]=$GIT_BASE/kernel-std
OPT_DEP_LIST_FOR_BUILD_TYPE[rt]=$GIT_BASE/kernel-rt
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-std]=b34c955b48fb99542644e4fe8ae4d49cb2f8bb28
BASE_SRCREV_FOR_PATH[$GIT_BASE/kernel-rt]=b34c955b48fb99542644e4fe8ae4d49cb2f8bb28
PKG_BASE_SRCREV=e51acfabf349d27780a3663bfa76887116b1bfee
TIS_PATCH_VER=PKG_GITREVCOUNT+OTHER_GITREVCOUNT

View File

@ -0,0 +1,125 @@
%if "%{?_tis_build_type}" == "rt"
%define bt_ext -rt
%else
%undefine bt_ext
%endif
%define kmod_name ice
Name: %{kmod_name}-kmod%{?bt_ext}
Version: 1.2.1
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Group: System Environment/Kernel
License: GPL-2.0
Summary: Intel(R) Ethernet Connection E800 Series Linux Driver
URL: http://support.intel.com
BuildRequires: kernel%{?bt_ext}-devel
Requires: kernel%{?bt_ext}-devel, findutils, gawk, bash
%define kernel_module_package_buildreqs kernel%{?bt_ext}-devel
Source0: %{kmod_name}-%{version}.tar.gz
Source11: modules-load.conf
%define kversion %(rpm -q kernel%{?bt_ext}-devel | sort --version-sort | tail -1 | sed 's/kernel%{?bt_ext}-devel-//')
%define find() %(for f in %*; do if [ -e $f ]; then echo $f; break; fi; done)
%package -n kmod-ice%{?bt_ext}
Summary: Intel(R) Ethernet Connection E800 Series Linux Driver
Group: System Environment/Kernel
%global _use_internal_dependency_generator 0
Provides: kernel-modules >= %{kversion}
Provides: ice-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
Requires(post): /usr/sbin/depmod
Requires(postun): /usr/sbin/depmod
%define debug_package %{nil}
%description -n kmod-ice%{?bt_ext}
This package provides the Intel(R) Ethernet Connection E800 Series Linux Driver,
ice, built for the Linux kernel using the %{_target_cpu} family of processors.
%prep
%autosetup -p 1 -n %{kmod_name}-%{version}
%build
pushd src >/dev/null
%{__make} KSRC=%{_usrsrc}/kernels/%{kversion}
popd >/dev/null
%install
%{__install} -d %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
%{__install} src/%{kmod_name}.ko %{buildroot}/lib/modules/%{kversion}/extra/%{kmod_name}/
%{__install} -d %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
%{__install} COPYING %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
%{__install} pci.updates %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
%{__install} README %{buildroot}%{_defaultdocdir}/kmod-%{kmod_name}-%{version}/
%{__install} -d %{buildroot}%{_mandir}/man7/
%{__install} %{kmod_name}.7 %{buildroot}%{_mandir}/man7/
%{__install} -d %{buildroot}%{_sysconfdir}/modules-load.d
%{__install} -m 644 %{SOURCE11} %{buildroot}%{_sysconfdir}/modules-load.d/ice.conf
%{__install} -d %{buildroot}/lib/firmware/updates/intel/ice/ddp/
%{__install} ddp/README %{buildroot}/lib/firmware/updates/intel/ice/ddp/README
%{__install} ddp/LICENSE %{buildroot}/lib/firmware/updates/intel/ice/ddp/LICENSE
%{__install} ddp/ice-*.pkg %{buildroot}/lib/firmware/updates/intel/ice/ddp/
mkdir -p %{buildroot}//lib/firmware/intel/ice/ddp/
ln -frs %{buildroot}/lib/firmware/updates/intel/ice/ddp/ice-*.pkg %{buildroot}//lib/firmware/intel/ice/ddp/ice.pkg
# Strip the modules(s).
find %{buildroot} -type f -name \*.ko -exec %{__strip} --strip-debug \{\} \;
# Always Sign the modules(s).
# If the module signing keys are not defined, define them here.
%{!?privkey: %define privkey /usr/src/kernels/%{kversion}/signing_key.pem}
%{!?pubkey: %define pubkey /usr/src/kernels/%{kversion}/signing_key.x509}
for module in $(find %{buildroot} -type f -name \*.ko);
do /usr/src/kernels/%{kversion}/scripts/sign-file \
sha256 %{privkey} %{pubkey} $module;
done
%clean
rm -rf %{buildroot}
%files -n kmod-ice%{?bt_ext}
%defattr(644,root,root,755)
/lib/modules/%{kversion}/
/lib/firmware/updates/intel/ice/ddp/*
/lib/firmware/intel/ice/ddp/ice.pkg
%{_sysconfdir}/modules-load.d/ice.conf
%doc /usr/share/doc/kmod-ice-%{version}/
%doc /usr/share/man/man7/
# Disable the building of the debug package(s).
%define debug_package %{nil}
%post -n kmod-ice%{?bt_ext}
echo "Working. This may take some time ..."
if [ -e "/boot/System.map-%{kversion}" ]; then
/usr/sbin/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || :
fi
echo "Done."
%preun -n kmod-ice%{?bt_ext}
rm -rf /usr/local/share/%{name}
%postun -n kmod-ice%{?bt_ext}
uname -r | grep BOOT || /sbin/depmod -a > /dev/null 2>&1 || true
echo "Updating initramfs with dracut..."
if dracut --force ; then
echo "Successfully updated initramfs."
else
echo "Failed to update initramfs."
echo "You must update your initramfs image for changes to take place."
exit -1
fi
%description
This package provides the ice kernel module(s) built
for the Linux kernel using the %{_target_cpu} family of processors.
This package contains the Intel(R) Ethernet Connection E800 Series Linux Driver.

View File

@ -0,0 +1 @@
ice

View File

@ -74,6 +74,7 @@ CONFIG_INTEL_IOMMU_DEFAULT_ON=y
# CONFIG_MLX4_CORE is not set
# CONFIG_MLX5_EN is not set
# CONFIG_MLX5_CORE is not set
# CONFIG_ICE is not set
# TPM built-in driver
CONFIG_TCG_TPM=m

View File

@ -73,6 +73,7 @@ CONFIG_INTEL_IOMMU_DEFAULT_ON=y
# CONFIG_IXGB is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
# CONFIG_ICE is not set
# TPM built-in driver
CONFIG_TCG_TPM=m