diff --git a/debian_iso_image.inc b/debian_iso_image.inc index ab871a8a..5bc93d92 100644 --- a/debian_iso_image.inc +++ b/debian_iso_image.inc @@ -9,18 +9,24 @@ i40e i40e-rt i40e-cvl-2.54 i40e-cvl-2.54-rt +i40e-cvl-4.10 +i40e-cvl-4.10-rt #intel-iavf iavf iavf-rt iavf-cvl-2.54 iavf-cvl-2.54-rt +iavf-cvl-4.10 +iavf-cvl-4.10-rt #intel-ice ice ice-rt ice-cvl-2.54 ice-cvl-2.54-rt +ice-cvl-4.10 +ice-cvl-4.10-rt #intel-igb_uio igb-uio diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 4a0fb1cf..21a0c2db 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -2,10 +2,13 @@ kernel-std kernel-modules/bnxt_en kernel-modules/intel-i40e kernel-modules/intel-i40e-cvl-2.54 +kernel-modules/intel-i40e-cvl-4.10 kernel-modules/intel-iavf kernel-modules/intel-iavf-cvl-2.54 +kernel-modules/intel-iavf-cvl-4.10 kernel-modules/intel-ice kernel-modules/intel-ice-cvl-2.54 +kernel-modules/intel-ice-cvl-4.10 kernel-modules/intel-igb_uio kernel-modules/intel-opae-fpga kernel-modules/intel-qv diff --git a/debian_pkg_dirs_rt b/debian_pkg_dirs_rt index b297470b..318a7d30 100644 --- a/debian_pkg_dirs_rt +++ b/debian_pkg_dirs_rt @@ -2,10 +2,13 @@ kernel-rt kernel-modules/bnxt_en kernel-modules/intel-i40e kernel-modules/intel-i40e-cvl-2.54 +kernel-modules/intel-i40e-cvl-4.10 kernel-modules/intel-iavf kernel-modules/intel-iavf-cvl-2.54 +kernel-modules/intel-iavf-cvl-4.10 kernel-modules/intel-ice kernel-modules/intel-ice-cvl-2.54 +kernel-modules/intel-ice-cvl-4.10 kernel-modules/intel-igb_uio kernel-modules/intel-opae-fpga kernel-modules/intel-qv diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/changelog b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/changelog new file mode 100644 index 00000000..2e1f78cd --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/changelog @@ -0,0 +1,6 @@ +i40e-cvl-4.10 (2.21.12-1) unstable; urgency=medium + + * Update iavf driver to 4.6.1, and that dictates the upgrade of the i40e + driver. We select the version 2.21.12-1 that comes from bundle 27.7. + + -- Jiping Ma Sat, 28 Jan 2023 10:29:23 +0800 diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/control b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/control new file mode 100644 index 00000000..f77cc064 --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/control @@ -0,0 +1,21 @@ +Source: i40e-cvl-4.10 +Section: net +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERNEL_TYPE@-amd64, linux@KERNEL_TYPE@-kbuild-5.10, linux@KERNEL_TYPE@-keys-5.10 +Standards-Version: 4.5.1 +Rules-Requires-Root: no + +Package: i40e-cvl-4.10@KERNEL_TYPE@ +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, i40e-cvl-4.10-common +Description: This package provides the i40e kernel module(s). + This package provides the i40e kernel module(s) built + for the Linux kernel using the amd64 processors. + +Package: i40e-cvl-4.10-common +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This package provides the common files of i40e kernel module(s). + This package provides the common files of i40e kernel module(s) built + for the Linux kernel-std and kernel-rt using the amd64 processors. diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/copyright b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/copyright new file mode 100644 index 00000000..de2a3867 --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/copyright @@ -0,0 +1,49 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Upstream-Name: i40e +Upstream-Contact: Intel Corporation +Source: https://sourceforge.net/projects/e1000/files/i40e%20stable/2.21.12/i40e-2.21.12.tar.gz/download +Files: * +Copyright: (c) 2014 - 2023 Intel Corporation. +License: GPL-2 + +Files: debian/deb_folder/patches/* +Copyright: (c) 2023 Wind River Systems, Inc. + others +License: GPL-2 + + This program is free software; you can redistribute it and/or modify it under + the terms and conditions of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + This program is distributed in the hope it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 51 Franklin + St - Fifth Floor, Boston, MA 02110-1301 USA. + + The full GNU General Public License is included in this distribution in the + file called "COPYING". + + On Debian-based systems the full text of the GNU General Public License + version 2 license can be found in `/usr/share/common-licenses/GPL-2'. + +Files: debian/* except debian/deb_folder/patches/* +Copyright: (c) 2023 Wind River Systems, Inc. +License: Apache-2.0 + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. The ASF licenses this + file to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/extra/i40e.conf b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/extra/i40e.conf new file mode 100644 index 00000000..d772f16c --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/extra/i40e.conf @@ -0,0 +1 @@ +i40e diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e-Enable-getting-link-status-from-VF.patch b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e-Enable-getting-link-status-from-VF.patch new file mode 100644 index 00000000..ed5dfd08 --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e-Enable-getting-link-status-from-VF.patch @@ -0,0 +1,131 @@ +From de86a2f22230d3193ba08afe02b5bdfe75575089 Mon Sep 17 00:00:00 2001 +From: Vadim Suraev +Date: Mon, 8 Feb 2016 15:57:30 -0500 +Subject: [PATCH] i40e: Enable getting link status from VF + +Add handling of custom OP code sent from the PMD VF to get link status via the +virtual channel interface. + +Signed-off-by: Allain Legacy +Signed-off-by: eric zhang +Signed-off-by: Jim Somerville +Signed-off-by: Steven Webster +Signed-off-by: Babak Sarashki +[mvb: Refresh patch for i40e v2.6.11] +Signed-off-by: M. Vefa Bicakci +--- + 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 5ec2a78b937d..11190fb94c29 100644 +--- a/src/i40e_virtchnl_pf.c ++++ b/src/i40e_virtchnl_pf.c +@@ -3249,6 +3249,81 @@ err_out: + aq_ret); + } + ++struct i40e_eth_link { ++ uint16_t link_speed; /**< ETH_LINK_SPEED_[10, 100, 1000, 10000] */ ++ uint16_t link_duplex; /**< ETH_LINK_[HALF_DUPLEX, FULL_DUPLEX] */ ++ uint8_t link_status : 1; /**< 1 -> link up, 0 -> link down */ ++}__attribute__((aligned(8))); ++ ++#define ETH_LINK_SPEED_AUTONEG 0 /**< Auto-negotiate link speed. */ ++#define ETH_LINK_SPEED_10 10 /**< 10 megabits/second. */ ++#define ETH_LINK_SPEED_100 100 /**< 100 megabits/second. */ ++#define ETH_LINK_SPEED_1000 1000 /**< 1 gigabits/second. */ ++#define ETH_LINK_SPEED_10000 10000 /**< 10 gigabits/second. */ ++#define ETH_LINK_SPEED_10G 10000 /**< alias of 10 gigabits/second. */ ++#define ETH_LINK_SPEED_20G 20000 /**< 20 gigabits/second. */ ++#define ETH_LINK_SPEED_40G 40000 /**< 40 gigabits/second. */ ++ ++#define ETH_LINK_AUTONEG_DUPLEX 0 /**< Auto-negotiate duplex. */ ++#define ETH_LINK_HALF_DUPLEX 1 /**< Half-duplex connection. */ ++#define ETH_LINK_FULL_DUPLEX 2 /**< Full-duplex connection. */ ++ ++static void ++i40e_vc_get_link_status(struct i40e_vf *vf) ++{ ++ struct i40e_pf *pf = vf->pf; ++ struct i40e_hw *hw; ++ i40e_status aq_ret = I40E_SUCCESS; ++ i40e_status status; ++ struct i40e_eth_link eth_link; ++ bool new_link; ++ ++ if (!test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states) || ++ !test_bit(I40E_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps)) { ++ aq_ret = I40E_ERR_PARAM; ++ goto error_param; ++ } ++ hw = &pf->hw; ++ ++ /* set this to force the get_link_status call to refresh state */ ++ pf->hw.phy.get_link_info = true; ++ ++ status = i40e_get_link_status(&pf->hw, &new_link); ++ if (status != I40E_SUCCESS) { ++ dev_dbg(&pf->pdev->dev, "couldn't get link state, status: %d\n", ++ status); ++ aq_ret = I40E_ERR_INVALID_LINK_SETTINGS; ++ goto error_param; ++ } ++ ++ /* Update link status first to acquire latest link change */ ++ eth_link.link_status = new_link ? 1 : 0; ++ ++ switch(hw->phy.link_info.link_speed) { ++ case I40E_LINK_SPEED_40GB: ++ eth_link.link_speed = ETH_LINK_SPEED_40G; ++ break; ++ case I40E_LINK_SPEED_10GB: ++ eth_link.link_speed = ETH_LINK_SPEED_10G; ++ break; ++ case I40E_LINK_SPEED_1GB: ++ eth_link.link_speed = ETH_LINK_SPEED_1000; ++ break; ++ case I40E_LINK_SPEED_100MB: ++ eth_link.link_speed = ETH_LINK_SPEED_100; ++ break; ++ default: ++ eth_link.link_speed = ETH_LINK_SPEED_AUTONEG; ++ break; ++ } ++ eth_link.link_duplex = ETH_LINK_FULL_DUPLEX;/* always */ ++ ++error_param: ++ i40e_vc_send_msg_to_vf(vf, VIRTCHNL_OP_GET_LINK_STAT, ++ aq_ret, (uint8_t *)ð_link, ++ sizeof(eth_link)); ++} ++ + /** + * i40e_vc_config_queues_msg + * @vf: pointer to the VF info +@@ -5331,6 +5406,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; ++ case VIRTCHNL_OP_GET_LINK_STAT: ++ i40e_vc_get_link_status(vf); ++ break; + #ifdef __TC_MQPRIO_MODE_MAX + case VIRTCHNL_OP_ENABLE_CHANNELS: + ret = i40e_vc_add_qch_msg(vf, msg); +diff --git a/src/virtchnl.h b/src/virtchnl.h +index e72daf5130de..07f6d8a88db9 100644 +--- a/src/virtchnl.h ++++ b/src/virtchnl.h +@@ -150,6 +150,7 @@ enum virtchnl_ops { + VIRTCHNL_OP_ENABLE_QUEUES_V2 = 107, + VIRTCHNL_OP_DISABLE_QUEUES_V2 = 108, + VIRTCHNL_OP_MAP_QUEUE_VECTOR = 111, ++ VIRTCHNL_OP_GET_LINK_STAT = 0x101, + VIRTCHNL_OP_MAX, + }; + +-- +2.29.2 + diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e-add-more-debug-info-for-VFs-still-in-reset.patch b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e-add-more-debug-info-for-VFs-still-in-reset.patch new file mode 100644 index 00000000..22b6d50a --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e-add-more-debug-info-for-VFs-still-in-reset.patch @@ -0,0 +1,63 @@ +From a6a16444cbb50ce98c3cdf8ad5dff5e6ef1f66c1 Mon Sep 17 00:00:00 2001 +From: Jim Somerville +Date: Mon, 26 Mar 2018 11:03:47 -0400 +Subject: [PATCH] i40e add more debug info for VFs still in reset + +Signed-off-by: Jim Somerville +[mvb: Refresh patch for i40e v2.6.11] +Signed-off-by: M. Vefa Bicakci +--- + src/i40e_virtchnl_pf.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/i40e_virtchnl_pf.c b/src/i40e_virtchnl_pf.c +index 11190fb94c29..2de803d3463e 100644 +--- a/src/i40e_virtchnl_pf.c ++++ b/src/i40e_virtchnl_pf.c +@@ -5525,8 +5525,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)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf->vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf->vf_id); + ret = -EAGAIN; + goto error_param; + } +@@ -5663,8 +5663,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)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto error_pvid; + } +@@ -5856,8 +5856,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)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto error; + } +@@ -6062,8 +6062,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)) { +- dev_err(&pf->pdev->dev, "VF %d still in reset. Try again.\n", +- vf_id); ++ dev_err(&pf->pdev->dev, "%s: VF %d still in reset. Try again.\n", ++ __func__, vf_id); + ret = -EAGAIN; + goto out; + } +-- +2.29.2 + diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e_main-Use-irq_update_affinity_hint.patch b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e_main-Use-irq_update_affinity_hint.patch new file mode 100644 index 00000000..bba782c6 --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/i40e_main-Use-irq_update_affinity_hint.patch @@ -0,0 +1,61 @@ +From 2ae84a0ff5b9d12aac1394965ff21d636fc3162b Mon Sep 17 00:00:00 2001 +From: "M. Vefa Bicakci" +Date: Fri, 14 Jan 2022 17:25:25 -0500 +Subject: [PATCH] i40e_main: Use irq_update_affinity_hint + +This commit makes i40e_main use irq_update_affinity_hint instead of +irq_set_affinity_hint to set the CPU affinity hints. This is done +because the latter function sets the IRQ CPU affinities, whereas the +former does not, and this allows the use of the default IRQ affinity CPU +mask provided via the irqaffinity= kernel command line option. + +This commit essentially replicates the i40e patch in the following +patch series: + https://lore.kernel.org/netdev/20210903152430.244937-1-nitesh@redhat.com/t/#u + +The i40e patch has been mainlined as of this writing: + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d34c54d1739c2cdf2e4437b74e6da269147f4987 + +Signed-off-by: M. Vefa Bicakci +--- + src/i40e_main.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/i40e_main.c b/src/i40e_main.c +index 874644bc0c1a..0bb06d3172b7 100644 +--- a/src/i40e_main.c ++++ b/src/i40e_main.c +@@ -4761,10 +4761,10 @@ int i40e_vsi_request_irq_msix(struct i40e_vsi *vsi, char *basename) + * + * get_cpu_mask returns a static constant mask with + * a permanent lifetime so it's ok to pass to +- * irq_set_affinity_hint without making a copy. ++ * irq_update_affinity_hint without making a copy. + */ + cpu = cpumask_local_spread(q_vector->v_idx, -1); +- irq_set_affinity_hint(irq_num, get_cpu_mask(cpu)); ++ irq_update_affinity_hint(irq_num, get_cpu_mask(cpu)); + #endif /* HAVE_IRQ_AFFINITY_HINT */ + } + +@@ -4779,7 +4779,7 @@ free_queue_irqs: + irq_set_affinity_notifier(irq_num, NULL); + #endif + #ifdef HAVE_IRQ_AFFINITY_HINT +- irq_set_affinity_hint(irq_num, NULL); ++ irq_update_affinity_hint(irq_num, NULL); + #endif + free_irq(irq_num, &vsi->q_vectors[vector]); + } +@@ -5594,7 +5594,7 @@ static void i40e_vsi_free_irq(struct i40e_vsi *vsi) + #endif + #ifdef HAVE_IRQ_AFFINITY_HINT + /* remove our suggested affinity mask for this IRQ */ +- irq_set_affinity_hint(irq_num, NULL); ++ irq_update_affinity_hint(irq_num, NULL); + #endif + synchronize_irq(irq_num); + free_irq(irq_num, vsi->q_vectors[i]); +-- +2.29.2 + diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/series b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/series new file mode 100644 index 00000000..c3db5990 --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/patches/series @@ -0,0 +1,3 @@ +i40e-Enable-getting-link-status-from-VF.patch +i40e-add-more-debug-info-for-VFs-still-in-reset.patch +i40e_main-Use-irq_update_affinity_hint.patch diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/rules b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/rules new file mode 100755 index 00000000..d84ef16e --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/rules @@ -0,0 +1,50 @@ +#!/usr/bin/make -f +# + +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +%: + dh $@ + +WITH_MOD_SIGN ?= 1 + +kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64) +export KSRC=/usr/src/$(kheaders_name) +kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g') +kmod_name=i40e +version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p') + +bundle_version=cvl-4.10 +ifeq ($(WITH_MOD_SIGN),1) +pkg_name=i40e-$(bundle_version)@KERNEL_TYPE@ +endif +pkg_common_name=i40e-$(bundle_version)-common + +_sysconfdir=/etc +_defaultdocdir=/usr/share/doc +_mandir=/usr/share/man + +ifeq ($(WITH_MOD_SIGN),1) +_keydir ?= /usr/src/kernels/$(kversion)/ +privkey ?= $(_keydir)/signing_key.pem +pubkey ?= $(_keydir)/signing_key.x509 +endif + +override_dh_auto_install: + dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/ + dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/$(kmod_name)-$(version)/ + +override_dh_strip: + dh_strip + find debian -name '*.ko' | xargs strip -g +ifeq ($(WITH_MOD_SIGN),1) + @echo "Sign the modules!" + /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ + ./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/$(kmod_name).ko +endif + +override_dh_auto_build: + dh_auto_build -D ./src diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/source/format b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/kernel-modules/intel-i40e-cvl-4.10/debian/meta_data.yaml b/kernel-modules/intel-i40e-cvl-4.10/debian/meta_data.yaml new file mode 100644 index 00000000..0287e97a --- /dev/null +++ b/kernel-modules/intel-i40e-cvl-4.10/debian/meta_data.yaml @@ -0,0 +1,11 @@ +--- +debver: 2.21.12 +debname: i40e-cvl-4.10 +dl_path: + name: i40e-2.21.12.tar.gz + url: "https://sourceforge.net/projects/e1000/files/i40e%20stable/\ + 2.21.12/i40e-2.21.12.tar.gz/download" + sha256sum: db59d21f5af7c0bebf361d61c8debce3021ac40e10133bec24e7e95987ea0678 +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/changelog b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/changelog new file mode 100644 index 00000000..dc0474f8 --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/changelog @@ -0,0 +1,6 @@ +iavf-cvl-4.10 (4.6.1-1) unstable; urgency=medium + + * Update ICE driver to 1.10.1.2, and that dictates the upgrade of the iavf + driver. We select the version 4.6.1 that comes from bundle 27.7. + + -- Jiping Ma Sat, 28 Jan 2023 15:30:48 +0800 diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/control b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/control new file mode 100644 index 00000000..158b6ec2 --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/control @@ -0,0 +1,21 @@ +Source: iavf-cvl-4.10 +Section: net +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERNEL_TYPE@-amd64, linux@KERNEL_TYPE@-kbuild-5.10, linux@KERNEL_TYPE@-keys-5.10 +Standards-Version: 4.5.1 +Rules-Requires-Root: no + +Package: iavf-cvl-4.10@KERNEL_TYPE@ +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, iavf-cvl-4.10-common +Description: This package provides the iavf kernel module(s). + This package provides the iavf kernel module(s) built + for the Linux kernel using the amd64 processors. + +Package: iavf-cvl-4.10-common +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This package provides the common files of iavf kernel module(s). + This package provides the common files of iavf kernel module(s) built + for the Linux kernel-std and kernel-rt using the amd64 processors. diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/copyright b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/copyright new file mode 100644 index 00000000..796ac035 --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/copyright @@ -0,0 +1,49 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Upstream-Name: iavf +Upstream-Contact: Intel Corporation +Source: https://sourceforge.net/projects/e1000/files/iavf%20stable/4.6.1/iavf-4.6.1.tar.gz/download +Files: * +Copyright: (c) 2018 - 2023 Intel Corporation. +License: GPL-2 + +Files: debian/deb_folder/patches/* +Copyright: (c) 2023 Wind River Systems, Inc. +License: GPL-2 + + This program is free software; you can redistribute it and/or modify it under + the terms and conditions of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + This program is distributed in the hope it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 51 Franklin + St - Fifth Floor, Boston, MA 02110-1301 USA. + + The full GNU General Public License is included in this distribution in the + file called "COPYING". + + On Debian-based systems the full text of the GNU General Public License + version 2 license can be found in `/usr/share/common-licenses/GPL-2'. + +Files: debian/* except debian/deb_folder/patches/* +Copyright: (c) 2023 Wind River Systems, Inc. +License: Apache-2.0 + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. The ASF licenses this + file to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/extra/iavf.conf b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/extra/iavf.conf new file mode 100644 index 00000000..54c14c83 --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/extra/iavf.conf @@ -0,0 +1 @@ +iavf diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch new file mode 100644 index 00000000..3b30bcbc --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch @@ -0,0 +1,42 @@ +From 9c8a4be36cf93039931c01970943420b787d37bc Mon Sep 17 00:00:00 2001 +From: Li Zhou +Date: Thu, 7 Apr 2022 11:42:47 +0800 +Subject: [PATCH] intel-iavf: pass linux common header to check_aux_bus + +For debian, there are two header pkgs, e.g. linux-headers-5.10.0-6-amd64 +and linux-headers-5.10.0-6-common. linux-headers-5.10.0-6-amd64 is +enough before check_aux_bus is added. But check_aux_bus need files +in linux-headers-5.10.0-6-common. So pass linux-headers-5.10.0-6-common +path as the KSRC for check_aux_bus when KSRC_COMMON is exported in +debian rules. + +Signed-off-by: Li Zhou +[jpm: Refresh patch for iavf v4.5.3)] +Signed-off-by: Jiping Ma +--- + src/common.mk | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/common.mk b/src/common.mk +index 0b2ad05..a0b65d6 100644 +--- a/src/common.mk ++++ b/src/common.mk +@@ -410,9 +410,14 @@ export INSTALL_MOD_DIR ?= updates/drivers/net/ethernet/intel/${DRIVER} + # If the check_aux_bus script exists, then this driver depends on the + # auxiliary module. Run the script to determine if we need to include + # auxiliary files with this build. ++ifeq (${KSRC_COMMON},) ++KSRC_AUX := ${KSRC} ++else ++KSRC_AUX := ${KSRC_COMMON} ++endif + CHECK_AUX_BUS ?= ../scripts/check_aux_bus + ifneq ($(call test_file,${CHECK_AUX_BUS}),) +-NEED_AUX_BUS := $(shell ${CHECK_AUX_BUS} --ksrc="${KSRC}" --build-kernel="${BUILD_KERNEL}" >/dev/null 2>&1; echo $$?) ++NEED_AUX_BUS := $(shell ${CHECK_AUX_BUS} --ksrc="${KSRC_AUX}" --build-kernel="${BUILD_KERNEL}" >/dev/null 2>&1; echo $$?) + endif # check_aux_bus exists + + # The out-of-tree auxiliary module we ship should be moved into this +-- +2.30.2 + diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/iavf_main-Use-irq_update_affinity_hint.patch b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/iavf_main-Use-irq_update_affinity_hint.patch new file mode 100644 index 00000000..1aeb65ad --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/iavf_main-Use-irq_update_affinity_hint.patch @@ -0,0 +1,61 @@ +From 1b24525e2971c01eafe7ac0f950dfb3a012035cf Mon Sep 17 00:00:00 2001 +From: "M. Vefa Bicakci" +Date: Fri, 14 Jan 2022 17:39:52 -0500 +Subject: [PATCH] iavf_main: Use irq_update_affinity_hint + +This commit makes iavf_main use irq_update_affinity_hint instead of +irq_set_affinity_hint to set the CPU affinity hints. This is done +because the latter function sets the IRQ CPU affinities, whereas the +former does not, and this allows the use of the default IRQ affinity CPU +mask provided via the irqaffinity= kernel command line option. + +This commit essentially replicates the iavf patch in the following +patch series: + https://lore.kernel.org/netdev/20210903152430.244937-1-nitesh@redhat.com/t/#u + +The iavf patch has been mainlined as of this writing: + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f9744f4ed539f2e847d7ed41993b243e3ba5cff + +Signed-off-by: M. Vefa Bicakci +--- + src/iavf_main.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/iavf_main.c b/src/iavf_main.c +index 8af856576e34..65bf4e939ea3 100644 +--- a/src/iavf_main.c ++++ b/src/iavf_main.c +@@ -435,10 +435,10 @@ iavf_request_traffic_irqs(struct iavf_adapter *adapter, char *basename) + #ifdef HAVE_IRQ_AFFINITY_HINT + /* Spread the IRQ affinity hints across online CPUs. Note that + * get_cpu_mask returns a mask with a permanent lifetime so +- * it's safe to use as a hint for irq_set_affinity_hint. ++ * it's safe to use as a hint for irq_update_affinity_hint. + */ + cpu = cpumask_local_spread(q_vector->v_idx, -1); +- irq_set_affinity_hint(irq_num, get_cpu_mask(cpu)); ++ irq_update_affinity_hint(irq_num, get_cpu_mask(cpu)); + #endif /* HAVE_IRQ_AFFINITY_HINT */ + } + +@@ -452,7 +452,7 @@ free_queue_irqs: + irq_set_affinity_notifier(irq_num, NULL); + #endif + #ifdef HAVE_IRQ_AFFINITY_HINT +- irq_set_affinity_hint(irq_num, NULL); ++ irq_update_affinity_hint(irq_num, NULL); + #endif + free_irq(irq_num, &adapter->q_vectors[vector]); + } +@@ -508,7 +508,7 @@ static void iavf_free_traffic_irqs(struct iavf_adapter *adapter) + irq_set_affinity_notifier(irq_num, NULL); + #endif + #ifdef HAVE_IRQ_AFFINITY_HINT +- irq_set_affinity_hint(irq_num, NULL); ++ irq_update_affinity_hint(irq_num, NULL); + #endif + free_irq(irq_num, &adapter->q_vectors[vector]); + } +-- +2.29.2 + diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/series b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/series new file mode 100644 index 00000000..1c85005a --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/patches/series @@ -0,0 +1,2 @@ +iavf_main-Use-irq_update_affinity_hint.patch +0001-intel-iavf-pass-linux-common-header-to-check_aux_bus.patch diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/rules b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/rules new file mode 100755 index 00000000..14fbe892 --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/rules @@ -0,0 +1,52 @@ +#!/usr/bin/make -f +# + +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +%: + dh $@ + +WITH_MOD_SIGN ?= 1 + +kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64) +kheaders_common=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep common) +export KSRC=/usr/src/$(kheaders_name) +export KSRC_COMMON=/usr/src/$(kheaders_common) +kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g') +kmod_name=iavf +version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p') +bundle_version=cvl-4.10 + +ifeq ($(WITH_MOD_SIGN),1) +pkg_name=iavf-$(bundle_version)@KERNEL_TYPE@ +endif +pkg_common_name=iavf-$(bundle_version)-common + +_sysconfdir=/etc +_defaultdocdir=/usr/share/doc +_mandir=/usr/share/man + +ifeq ($(WITH_MOD_SIGN),1) +_keydir ?= /usr/src/kernels/$(kversion)/ +privkey ?= $(_keydir)/signing_key.pem +pubkey ?= $(_keydir)/signing_key.x509 +endif + +override_dh_auto_install: + dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/ + dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/$(kmod_name)-$(version)/ + +override_dh_strip: + dh_strip + find debian -name '*.ko' | xargs strip -g +ifeq ($(WITH_MOD_SIGN),1) + @echo "Sign the modules!" + /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ + ./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/$(kmod_name).ko +endif + +override_dh_auto_build: + dh_auto_build -D ./src diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/source/format b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/kernel-modules/intel-iavf-cvl-4.10/debian/meta_data.yaml b/kernel-modules/intel-iavf-cvl-4.10/debian/meta_data.yaml new file mode 100644 index 00000000..e7a37d71 --- /dev/null +++ b/kernel-modules/intel-iavf-cvl-4.10/debian/meta_data.yaml @@ -0,0 +1,11 @@ +--- +debver: 4.6.1 +debname: iavf-cvl-4.10 +dl_path: + name: iavf-4.6.1.tar.gz + url: "https://sourceforge.net/projects/e1000/files/iavf%20stable/\ + 4.6.1/iavf-4.6.1.tar.gz/download" + sha256sum: 03374f4277d6a09bdfdfbe3df4908c5cb9221160b2d9f816856dba2b048ca6f9 +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/changelog b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/changelog new file mode 100644 index 00000000..4417f665 --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +ice-cvl-4.10 (1.10.1.2-1) unstable; urgency=medium + + * Update ICE driver to 1.10.1.2 to support Silicom STS NICs which comes from bundle 27.7. + + -- Jiping Ma Sat, 28 Jan 2023 14:32:03 +0800 diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/control b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/control new file mode 100644 index 00000000..f41cddd1 --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/control @@ -0,0 +1,23 @@ +Source: ice-cvl-4.10 +Section: net +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), linux@KERNEL_TYPE@-headers-5.10.0-6@KERNEL_TYPE@-amd64, linux@KERNEL_TYPE@-kbuild-5.10, linux@KERNEL_TYPE@-keys-5.10, unzip +Standards-Version: 4.5.1 +Rules-Requires-Root: no + +Package: ice-cvl-4.10@KERNEL_TYPE@ +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, ice-cvl-4.10-common +Description: This package provides the ice kernel module(s). + This package provides the ice kernel module(s) built + for the Linux kernel using the amd64 processors. + This package contains the Intel(R) Ethernet Connection E800 Series Linux Driver. + +Package: ice-cvl-4.10-common +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This package provides the common files of ice kernel module(s). + This package provides the common files of ice kernel module(s) built + for the Linux kernel-std and kernel-rt using the amd64 processors. + This package contains the Intel(R) Ethernet Connection E800 Series Linux Driver. diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/copyright b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/copyright new file mode 100644 index 00000000..90f40dfc --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/copyright @@ -0,0 +1,95 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Upstream-Name: ice +Upstream-Contact: Intel Corporation +Source: https://sourceforge.net/projects/e1000/files/ice%20stable/1.10.1.2/ice-1.10.1.2.tar.gz/download +Files: * +Copyright: (c) 2017 - 2023 Intel Corporation. +License: GPL-2 + +Files: debian/deb_folder/patches/* +Copyright: (c) 2023 Wind River Systems, Inc. +License: GPL-2 + + This program is free software; you can redistribute it and/or modify it under + the terms and conditions of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + This program is distributed in the hope it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along with + this program; if not, write to the Free Software Foundation, Inc., 51 Franklin + St - Fifth Floor, Boston, MA 02110-1301 USA. + + The full GNU General Public License is included in this distribution in the + file called "COPYING". + + On Debian-based systems the full text of the GNU General Public License + version 2 license can be found in `/usr/share/common-licenses/GPL-2'. + +Files: ice_comms*.pkg +Copyright: (c) 2020 - 2022 Intel Corporation. +License: Limited patent license + + Redistribution. Redistribution and use in binary form, without + modification, are permitted solely operating in conjunction with Intel + authorized products, provided that the following conditions are met: + + * Redistributions must reproduce the above copyright notice and the + following disclaimer in the documentation and/or other materials + provided with the distribution. + * Neither the name of Intel Corporation nor the names of its suppliers + may be used to endorse or promote products derived from this software + without specific prior written permission. + * No reverse engineering, decompilation, or disassembly of this software + is permitted. + + Limited patent license. Intel Corporation grants a world-wide, + royalty-free, non-exclusive license under patents it now or hereafter + owns or controls to make, have made, use, import, offer to sell and + sell ("Utilize") this software, but solely to the extent that any + such patent is necessary to Utilize the software alone, or in + combination with an operating system licensed under an approved Open + Source license as listed by the Open Source Initiative at + http://opensource.org/licenses. The patent license shall not apply to + any other combinations which include this software. No hardware per + se is licensed hereunder. + + DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, + BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. +Comment: From Sean Lion of Intel Corporation on Tuesday, January 25, 2022 3:53 PM + To confirm, we would very much like to offer the DDP profiles as a part + of Starling X. There is no additional licensing nor signatures necessary + to host the driver in an open source hub. No signatures required as long + as the licensing terms are acceptable. + +Files: debian/* except debian/deb_folder/patches/* +Copyright: (c) 2023 Wind River Systems, Inc. +License: Apache-2.0 + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. The ASF licenses this + file to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/extra/ice.conf b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/extra/ice.conf new file mode 100644 index 00000000..690ff753 --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/extra/ice.conf @@ -0,0 +1 @@ +ice diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch new file mode 100644 index 00000000..f97759b4 --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch @@ -0,0 +1,72 @@ +From db14529d26cd3de42e6b838cd09eac0a66390756 Mon Sep 17 00:00:00 2001 +From: "M. Vefa Bicakci" +Date: Fri, 14 Jan 2022 17:50:39 -0500 +Subject: [PATCH 1/3] ice_main, ice_lib: Use irq_update_affinity_hint + +This commit makes the ice device driver use the irq_update_affinity_hint +function instead of the irq_set_affinity_hint function. This is done +because the latter function sets the IRQ CPU affinities, whereas the +former does not, and this allows the use of the default IRQ affinity CPU +mask provided via the irqaffinity= kernel command line option. + +Please note that this patch was not cherry-picked from an upstream +commit. The changes have been inspired by the i40e and iavf device +driver patches in the following patch series: + https://lore.kernel.org/netdev/20210903152430.244937-1-nitesh@redhat.com/t/#u + +The aforementioned patches have been mainlined as of this writing with +the following merge commit by Linus Torvalds: + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=147cc5838c0f5c76e908b816e924ca378e0d4735 + +And the i40e and iavf patches are accessible at: + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d34c54d1739c2cdf2e4437b74e6da269147f4987 + https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0f9744f4ed539f2e847d7ed41993b243e3ba5cff + +Signed-off-by: M. Vefa Bicakci +[jm: Adapted the patch for context changes.] +Signed-off-by: Jiping Ma +--- + src/ice_lib.c | 2 +- + src/ice_main.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/ice_lib.c b/src/ice_lib.c +index 5d99a4c..82d183b 100644 +--- a/src/ice_lib.c ++++ b/src/ice_lib.c +@@ -3113,7 +3113,7 @@ void ice_vsi_free_irq(struct ice_vsi *vsi) + irq_set_affinity_notifier(irq_num, NULL); + + /* clear the affinity_mask in the IRQ descriptor */ +- irq_set_affinity_hint(irq_num, NULL); ++ irq_update_affinity_hint(irq_num, NULL); + synchronize_irq(irq_num); + devm_free_irq(ice_pf_to_dev(pf), irq_num, vsi->q_vectors[i]); + } +diff --git a/src/ice_main.c b/src/ice_main.c +index 9df9e85..79588a8 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -3475,8 +3475,8 @@ int ice_vsi_req_single_irq_msix(struct ice_vsi *vsi, char *basename, + irq_set_affinity_notifier(irq_num, affinity_notify); + } + +- /* assign the mask for this irq */ +- irq_set_affinity_hint(irq_num, &q_vector->affinity_mask); ++ /* assign the affinity hint for this irq */ ++ irq_update_affinity_hint(irq_num, &q_vector->affinity_mask); + + return 0; + } +@@ -3517,7 +3517,7 @@ free_q_irqs: + irq_num = ice_get_irq_num(pf, base + vector); + if (!IS_ENABLED(CONFIG_RFS_ACCEL)) + irq_set_affinity_notifier(irq_num, NULL); +- irq_set_affinity_hint(irq_num, NULL); ++ irq_update_affinity_hint(irq_num, NULL); + devm_free_irq(dev, irq_num, &vsi->q_vectors[vector]); + } + return err; +-- +2.39.0 + diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch new file mode 100644 index 00000000..51c7f2cc --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch @@ -0,0 +1,42 @@ +From 2d98d8a0cccb76f6e71ff4c509eb4ceb694370e5 Mon Sep 17 00:00:00 2001 +From: Li Zhou +Date: Thu, 7 Apr 2022 11:42:47 +0800 +Subject: [PATCH 2/3] intel-ice: pass linux common header to check_aux_bus + +For debian, there are two header pkgs, e.g. linux-headers-5.10.0-6-amd64 +and linux-headers-5.10.0-6-common. linux-headers-5.10.0-6-amd64 is +enough before check_aux_bus is added. But check_aux_bus need files +in linux-headers-5.10.0-6-common. So pass linux-headers-5.10.0-6-common +path as the KSRC for check_aux_bus when KSRC_COMMON is exported in +debian rules. + +Signed-off-by: Li Zhou +[jpm: Refresh patch for new ice] +Signed-off-by: Jiping Ma +--- + src/common.mk | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/common.mk b/src/common.mk +index 208dda7..ade3f29 100644 +--- a/src/common.mk ++++ b/src/common.mk +@@ -420,9 +420,14 @@ export INSTALL_MOD_DIR ?= updates/drivers/net/ethernet/intel/${DRIVER} + # If the check_aux_bus script exists, then this driver depends on the + # auxiliary module. Run the script to determine if we need to include + # auxiliary files with this build. ++ifeq (${KSRC_COMMON},) ++KSRC_AUX := ${KSRC} ++else ++KSRC_AUX := ${KSRC_COMMON} ++endif + CHECK_AUX_BUS ?= ../scripts/check_aux_bus + ifneq ($(call test_file,${CHECK_AUX_BUS}),) +-NEED_AUX_BUS := $(shell ${CHECK_AUX_BUS} --ksrc="${KSRC}" --build-kernel="${BUILD_KERNEL}" >/dev/null 2>&1; echo $$?) ++NEED_AUX_BUS := $(shell ${CHECK_AUX_BUS} --ksrc="${KSRC_AUX}" --build-kernel="${BUILD_KERNEL}" >/dev/null 2>&1; echo $$?) + endif # check_aux_bus exists + + # The out-of-tree auxiliary module we ship should be moved into this +-- +2.39.0 + diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0003-rename-the-ddp-file-to-avoid-conflict.patch b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0003-rename-the-ddp-file-to-avoid-conflict.patch new file mode 100644 index 00000000..a3ecf0e0 --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/0003-rename-the-ddp-file-to-avoid-conflict.patch @@ -0,0 +1,29 @@ +From e0b6411ddcc2d3060a0703d3b33dd59b9d3d64e8 Mon Sep 17 00:00:00 2001 +From: Jackie Huang +Date: Fri, 20 May 2022 03:23:25 -0400 +Subject: [PATCH 3/3] rename the ddp file to avoid conflict + +Rename the ddp file to avoid conflict with the one +provided by linux-firmware. + +Signed-off-by: Jiping Ma +--- + src/ice_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ice_main.c b/src/ice_main.c +index 79588a8..eeef56e 100644 +--- a/src/ice_main.c ++++ b/src/ice_main.c +@@ -47,7 +47,7 @@ static const char ice_copyright[] = "Copyright (C) 2018-2021, Intel Corporation. + #else /* UTS_UBUNTU_RELEASE_ABI */ + #define ICE_DDP_PKG_PATH "intel/ice/ddp/" + #endif /* UTS_UBUNTU_RELEASE_ABI */ +-#define ICE_DDP_PKG_FILE ICE_DDP_PKG_PATH "ice.pkg" ++#define ICE_DDP_PKG_FILE ICE_DDP_PKG_PATH "1.10.1.2-ice.pkg" + + MODULE_AUTHOR("Intel Corporation, "); + MODULE_DESCRIPTION(DRV_SUMMARY); +-- +2.39.0 + diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/series b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/series new file mode 100644 index 00000000..c850121a --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/patches/series @@ -0,0 +1,3 @@ +0001-ice_main-ice_lib-Use-irq_update_affinity_hint.patch +0002-intel-ice-pass-linux-common-header-to-check_aux_bus.patch +0003-rename-the-ddp-file-to-avoid-conflict.patch diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/rules b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/rules new file mode 100755 index 00000000..24c15ace --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/rules @@ -0,0 +1,57 @@ +#!/usr/bin/make -f +# + +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +%: + dh $@ + +WITH_MOD_SIGN ?= 1 + +kheaders_name=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep amd64) +kheaders_common=$(shell ls /usr/src | grep linux@KERNEL_TYPE@-headers | grep common) +export KSRC=/usr/src/$(kheaders_name) +export KSRC_COMMON=/usr/src/$(kheaders_common) +kversion=$(shell echo $(kheaders_name) | sed 's/linux@KERNEL_TYPE@-headers-//g') +kmod_name=ice +bundle_version=cvl-4.10 +version=$(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p') +pkg_name=ice-$(bundle_version)@KERNEL_TYPE@ +pkg_common_name=ice-$(bundle_version)-common + +_sysconfdir=/etc +_defaultdocdir=/usr/share/doc +_mandir=/usr/share/man + +ifeq ($(WITH_MOD_SIGN),1) +_keydir ?= /usr/src/kernels/$(kversion)/ +privkey ?= $(_keydir)/signing_key.pem +pubkey ?= $(_keydir)/signing_key.x509 +endif + +override_dh_auto_install: + dh_install src/$(kmod_name).ko /lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/ + dh_install -p$(pkg_common_name) pci.updates $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) README $(_defaultdocdir)/kmod-$(kmod_name)-$(version)/ + dh_install -p$(pkg_common_name) $(kmod_name).7 $(_mandir)/man7/$(kmod_name)-$(version)/ + # Install both the OS default regular DDP fw and the COMMS version + dh_installdirs -p$(pkg_common_name) /lib/firmware/updates/intel/$(kmod_name)-$(version)/ddp/ + install -m 644 ddp/README debian/$(pkg_common_name)/lib/firmware/updates/intel/$(kmod_name)-$(version)/ddp/ + install -m 644 ddp/LICENSE debian/$(pkg_common_name)/lib/firmware/updates/intel/$(kmod_name)-$(version)/ddp/ + install -m 644 ddp/ice-*.pkg debian/$(pkg_common_name)/lib/firmware/updates/intel/$(kmod_name)-$(version)/ddp/ + # Make the regular DDP fw be the default one to load + dh_installdirs -p$(pkg_common_name) /lib/firmware/intel/$(kmod_name)/ddp/ + ln -frs debian/$(pkg_common_name)/lib/firmware/updates/intel/$(kmod_name)-$(version)/ddp/ice-*.pkg debian/$(pkg_common_name)/lib/firmware/intel/$(kmod_name)/ddp/$(version)-ice.pkg + +override_dh_strip: + dh_strip + find debian -name '*.ko' | xargs strip -g +ifeq ($(WITH_MOD_SIGN),1) + @echo "Sign the modules!" + /usr/lib/linux@KERNEL_TYPE@-kbuild-*/scripts/sign-file sha256 $(privkey) $(pubkey) \ + ./debian/$(pkg_name)/lib/modules/$(kversion)/extra/$(kmod_name)-$(bundle_version)/$(kmod_name).ko +endif + +override_dh_auto_build: + dh_auto_build -D ./src diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/source/format b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/kernel-modules/intel-ice-cvl-4.10/debian/meta_data.yaml b/kernel-modules/intel-ice-cvl-4.10/debian/meta_data.yaml new file mode 100644 index 00000000..f2bdf85f --- /dev/null +++ b/kernel-modules/intel-ice-cvl-4.10/debian/meta_data.yaml @@ -0,0 +1,11 @@ +--- +debver: 1.10.1.2 +debname: ice-cvl-4.10 +dl_path: + name: ice-1.10.1.2.tar.gz + url: "https://sourceforge.net/projects/e1000/files/ice%20stable/\ + 1.10.1.2/ice-1.10.1.2.tar.gz" + sha256sum: 62e6f02a9d6fe3546f83f178dbf50d7a9ddf6816549176a926fb1b846afd013b +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true