From 9f51fddb270538e4ad9e6bfc6d1615a3a185e878 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Sun, 5 Nov 2023 19:36:31 -0800 Subject: [PATCH] mlnx-ofa_kernel: Upgrade OFED driver version to 5.9 This upgrades the OFED driver package to the mlnx-ofa_kernel-5.9.tgz located in https://linux.mellanox.com/public/repo/mlnx_ofed/5.9-0.5.6.0/SRPMS/ In addition, removes irq_update_affinity_hint related patch because the fix is already included in the source code. Reason: The required Mellanox drivers must be upgraded to the latest version (5.8+) to support Dell 15G and 16G platforms. Verification: - Build module success for kernel-std/kernel-rt. - Build package success for rdma-core, mstflint and mlnx-tools. - Install onto a StarlingX system with All-in-One lab with network adapters Mellanox's OFED. The network adapters of controllers are Mellanox Technologies MT27800 Family [ConnectX-5]. - Install onto a StarlingX system in labs with network adapters Mellanox's OFED. The network adapters of controllers are [ConnectX-6 DX],[ConnectX-6 LX]. - The physical function interfaces are up and pass packets for rt and std. - create vfs, ensure that the interface can come up and pass packets. - RDMA/Infiniband over Ethernet functionalities of the Mellanox adapters were successfully tested using the Linux RDMA community's perftest package. Story: 2010958 Task: 49055 Change-Id: I824e5e07b597e8b7cc518388a2ab93264b3f0947 Signed-off-by: Jiping Ma --- ...adapt-the-debian-folder-for-starling.patch | 45 +++++---- ...0002-mlnx-ofa_kernel-Add-dev-package.patch | 44 +++++---- .../mlnx-ofa_kernel/debian/meta_data.yaml | 9 +- ... 0001-Enable-mlx5-onboard-udev-name.patch} | 0 ...pci_irq-Use-irq_update_affinity_hint.patch | 59 ------------ ...pci_irq-Use-irq_update_affinity_hint.patch | 91 ------------------- .../mlnx-ofa_kernel/debian/patches/series | 3 +- 7 files changed, 56 insertions(+), 195 deletions(-) rename kernel-modules/mlnx-ofa_kernel/debian/patches/{0002-Enable-mlx5-onboard-udev-name.patch => 0001-Enable-mlx5-onboard-udev-name.patch} (100%) delete mode 100644 kernel-modules/mlnx-ofa_kernel/debian/patches/0001-mlx5-pci_irq-Use-irq_update_affinity_hint.patch delete mode 100644 kernel-modules/mlnx-ofa_kernel/debian/patches/0002-mlx5-pci_irq-Use-irq_update_affinity_hint.patch diff --git a/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0001-mlnx-ofa_kernel-adapt-the-debian-folder-for-starling.patch b/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0001-mlnx-ofa_kernel-adapt-the-debian-folder-for-starling.patch index ed1495a1..46375fd8 100644 --- a/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0001-mlnx-ofa_kernel-adapt-the-debian-folder-for-starling.patch +++ b/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0001-mlnx-ofa_kernel-adapt-the-debian-folder-for-starling.patch @@ -1,4 +1,4 @@ -From 9a9504632c92e954103b7fdd7b59064a94d9ee29 Mon Sep 17 00:00:00 2001 +From 90565225e863d5a8103dd9fc81f88804bdf4c1a0 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Wed, 23 Mar 2022 22:59:40 -0700 Subject: [PATCH] mlnx-ofa_kernel: adapt the debian folder for starlingX @@ -19,16 +19,18 @@ Signed-off-by: Li Zhou prerm files for rt build.] Signed-off-by: Jiping Ma Signed-off-by: Yue Tao +[jm: Adapted the patch for context change] +Signed-off-by: Jiping Ma --- - debian/control | 21 +++------- + debian/control | 19 +++------ debian/extra/mlnx.conf | 19 +++++++++ debian/mlnx-ofed-kernel-modules-rt.postinst | 17 ++++++++ debian/mlnx-ofed-kernel-modules-rt.prerm | 10 +++++ - debian/mlnx-ofed-kernel-utils-rt.postinst | 46 +++++++++++++++++++++ - debian/mlnx-ofed-kernel-utils-rt.postrm | 13 ++++++ - debian/mlnx-ofed-kernel-utils-rt.prerm | 22 ++++++++++ + debian/mlnx-ofed-kernel-utils-rt.postinst | 47 +++++++++++++++++++++ + debian/mlnx-ofed-kernel-utils-rt.postrm | 14 ++++++ + debian/mlnx-ofed-kernel-utils-rt.prerm | 23 ++++++++++ debian/rules | 24 ++++++++--- - 8 files changed, 152 insertions(+), 20 deletions(-) + 8 files changed, 155 insertions(+), 18 deletions(-) create mode 100644 debian/extra/mlnx.conf create mode 100755 debian/mlnx-ofed-kernel-modules-rt.postinst create mode 100755 debian/mlnx-ofed-kernel-modules-rt.prerm @@ -37,7 +39,7 @@ Signed-off-by: Yue Tao create mode 100755 debian/mlnx-ofed-kernel-utils-rt.prerm diff --git a/debian/control b/debian/control -index 2ed05f9..ba886e2 100644 +index 2b00d80..6b59989 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: mlnx-ofed-kernel @@ -49,14 +51,14 @@ index 2ed05f9..ba886e2 100644 Standards-Version: 3.9.2 Homepage: http://www.mellanox.com/page/products_dyn?product_family=26&mtag=linux_sw_drivers -@@ -13,18 +13,9 @@ Depends: ${misc:Depends}, coreutils, pciutils, grep, procps, module-init-tools | +@@ -13,18 +13,11 @@ Depends: ${misc:Depends}, coreutils, pciutils, grep, procps, module-init-tools | Conflicts: mlnx-en-utils Description: Userspace tools to restart and tune mlnx-ofed kernel modules -Package: mlnx-ofed-kernel-dkms -Section: kernel -Architecture: all --Depends: dkms, make, ${misc:Depends}, coreutils, pciutils, grep, procps, module-init-tools | kmod, lsof, mlnx-ofed-kernel-utils, +-Depends: dkms, ${misc:Depends}, mlnx-ofed-kernel-utils, libc6-dev, gcc, -Recommends: linux-headers-arm64 | linux-headers-powerpc | linux-headers-ppc64 | linux-headers-ppc64le | linux-headers-amd64 | linux-headers-generic | linux-headers -Provides: mlnx-rdma-rxe-dkms -Conflicts: mlnx-rdma-rxe-dkms @@ -71,8 +73,8 @@ index 2ed05f9..ba886e2 100644 +Description: ofed kernel modules + This package provides the mlnx-ofed out of tree kernel modules. This package provides the source code for the mlnx-ofed kernel modules. -- . -- This package contains the source to be built with dkms. + . + This package contains the source to be built with dkms. diff --git a/debian/extra/mlnx.conf b/debian/extra/mlnx.conf new file mode 100644 index 0000000..d6ced47 @@ -139,10 +141,10 @@ index 0000000..6f1b1df +#DEBHELPER# diff --git a/debian/mlnx-ofed-kernel-utils-rt.postinst b/debian/mlnx-ofed-kernel-utils-rt.postinst new file mode 100755 -index 0000000..4e7ade8 +index 0000000..279820d --- /dev/null +++ b/debian/mlnx-ofed-kernel-utils-rt.postinst -@@ -0,0 +1,46 @@ +@@ -0,0 +1,47 @@ +#!/bin/bash + +dist=`lsb_release -s -i | tr '[:upper:]' '[:lower:]'` @@ -187,14 +189,15 @@ index 0000000..4e7ade8 +; do + dpkg-maintscript-helper rm_conffile $old_udev 5.4-OFED.5.4.0.4.9 -- "$@" +done ++dpkg-maintscript-helper rm_conffile /etc/infiniband/vf-net-link-name.sh 5.6-OFED.5.6.0.5.6 -- "$@" + +exit 0 diff --git a/debian/mlnx-ofed-kernel-utils-rt.postrm b/debian/mlnx-ofed-kernel-utils-rt.postrm new file mode 100755 -index 0000000..53a9430 +index 0000000..8b8068f --- /dev/null +++ b/debian/mlnx-ofed-kernel-utils-rt.postrm -@@ -0,0 +1,13 @@ +@@ -0,0 +1,14 @@ +#!/bin/sh + +set -e @@ -206,14 +209,15 @@ index 0000000..53a9430 +; do + dpkg-maintscript-helper rm_conffile $old_udev 5.4-OFED.5.4.0.4.9 -- "$@" +done ++dpkg-maintscript-helper rm_conffile /etc/infiniband/vf-net-link-name.sh 5.6-OFED.5.6.0.5.6 -- "$@" + +#DEBHELPER# diff --git a/debian/mlnx-ofed-kernel-utils-rt.prerm b/debian/mlnx-ofed-kernel-utils-rt.prerm new file mode 100755 -index 0000000..27f697b +index 0000000..79e96b5 --- /dev/null +++ b/debian/mlnx-ofed-kernel-utils-rt.prerm -@@ -0,0 +1,22 @@ +@@ -0,0 +1,23 @@ +#!/bin/bash + +dist=`lsb_release -s -i | tr '[:upper:]' '[:lower:]'` @@ -234,10 +238,11 @@ index 0000000..27f697b +; do + dpkg-maintscript-helper rm_conffile $old_udev 5.4-OFED.5.4.0.4.9 -- "$@" +done ++dpkg-maintscript-helper rm_conffile /etc/infiniband/vf-net-link-name.sh 5.6-OFED.5.6.0.5.6 -- "$@" + +exit 0 diff --git a/debian/rules b/debian/rules -index db99d8c..df4c725 100755 +index 7e32e3c..e9b2564 100755 --- a/debian/rules +++ b/debian/rules @@ -17,8 +17,20 @@ @@ -289,7 +294,7 @@ index db99d8c..df4c725 100755 endif mod_dev_dir = /usr/src/ofa_kernel/$(deb_arch)/$(kernelver) -@@ -181,6 +192,9 @@ endif +@@ -179,6 +190,9 @@ endif install -m 0755 source/ofed_scripts/odp_stat.sh debian/$(putils)/usr/sbin install -m 0755 ofed_scripts/mlnx_bf_assign_ct_cores.sh debian/$(putils)/usr/share/mlnx_ofed @@ -300,5 +305,5 @@ index db99d8c..df4c725 100755 -- -2.25.1 +2.42.0 diff --git a/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0002-mlnx-ofa_kernel-Add-dev-package.patch b/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0002-mlnx-ofa_kernel-Add-dev-package.patch index 5e3a5b2f..333326f7 100644 --- a/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0002-mlnx-ofa_kernel-Add-dev-package.patch +++ b/kernel-modules/mlnx-ofa_kernel/debian/deb_patches/0002-mlnx-ofa_kernel-Add-dev-package.patch @@ -1,4 +1,4 @@ -From c1726fb23f90aa99484eb08ff5a0a4e1bf78869f Mon Sep 17 00:00:00 2001 +From f5763f2acdbad9c9cd055ee7c3049356ecf34b29 Mon Sep 17 00:00:00 2001 From: Jiping Ma Date: Sun, 22 May 2022 21:02:25 -0700 Subject: [PATCH] mlnx-ofa_kernel: Add dev package. @@ -9,38 +9,46 @@ Also adds postinst, prerm files for dev package and modify postinst, prerm files for modules package because source files are moved to the dev package. +It will generate mlnx-ofed-kernel-dev and mlnx-ofed-kernel-dev-rt with +adding @KERNEL_TYPE@ suffix, which are used to build other modules that +based on ofed for std and rt building. + +Signed-off-by: Jiping Ma +[jm: Adapted the patch for context change] Signed-off-by: Jiping Ma --- - debian/control | 5 +++++ + debian/control | 7 +++++-- debian/mlnx-ofed-kernel-dev-rt.postinst | 17 +++++++++++++++++ debian/mlnx-ofed-kernel-dev-rt.prerm | 10 ++++++++++ debian/mlnx-ofed-kernel-dev.postinst | 17 +++++++++++++++++ debian/mlnx-ofed-kernel-dev.prerm | 10 ++++++++++ debian/mlnx-ofed-kernel-modules-rt.postinst | 12 ------------ - debian/mlnx-ofed-kernel-modules-rt.prerm | 6 ------ + debian/mlnx-ofed-kernel-modules-rt.prerm | 7 ------- debian/mlnx-ofed-kernel-modules.postinst | 12 ------------ - debian/mlnx-ofed-kernel-modules.prerm | 6 ------ + debian/mlnx-ofed-kernel-modules.prerm | 7 ------- debian/rules | 17 +++++++++-------- - 10 files changed, 68 insertions(+), 44 deletions(-) + 10 files changed, 68 insertions(+), 48 deletions(-) create mode 100755 debian/mlnx-ofed-kernel-dev-rt.postinst create mode 100755 debian/mlnx-ofed-kernel-dev-rt.prerm create mode 100755 debian/mlnx-ofed-kernel-dev.postinst create mode 100755 debian/mlnx-ofed-kernel-dev.prerm diff --git a/debian/control b/debian/control -index 0dd0886..4493135 100644 +index 6b59989..a90c1ff 100644 --- a/debian/control +++ b/debian/control -@@ -18,4 +18,9 @@ Architecture: any +@@ -18,6 +18,9 @@ Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, mlnx-ofed-kernel-utils Description: ofed kernel modules This package provides the mlnx-ofed out of tree kernel modules. + -+Package: mlnx-ofed-kernel-dev ++Package: mlnx-ofed-kernel-dev@KERNEL_TYPE@ +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: ofed kernel modules This package provides the source code for the mlnx-ofed kernel modules. +- . +- This package contains the source to be built with dkms. diff --git a/debian/mlnx-ofed-kernel-dev-rt.postinst b/debian/mlnx-ofed-kernel-dev-rt.postinst new file mode 100755 index 0000000..a67c0c4 @@ -142,10 +150,10 @@ index a67c0c4..3456fe9 100755 exit 0 diff --git a/debian/mlnx-ofed-kernel-modules-rt.prerm b/debian/mlnx-ofed-kernel-modules-rt.prerm -index 6f1b1df..ab105a3 100755 +index 6f1b1df..a2c66fa 100755 --- a/debian/mlnx-ofed-kernel-modules-rt.prerm +++ b/debian/mlnx-ofed-kernel-modules-rt.prerm -@@ -1,10 +1,4 @@ +@@ -1,10 +1,3 @@ #!/bin/sh -set -e @@ -154,7 +162,7 @@ index 6f1b1df..ab105a3 100755 - update-alternatives --remove ofa_kernel_headers \ - /usr/src/ofa_kernel/@ARCH@/@KVER@ -fi - +- #DEBHELPER# diff --git a/debian/mlnx-ofed-kernel-modules.postinst b/debian/mlnx-ofed-kernel-modules.postinst index a67c0c4..3456fe9 100755 @@ -179,10 +187,10 @@ index a67c0c4..3456fe9 100755 exit 0 diff --git a/debian/mlnx-ofed-kernel-modules.prerm b/debian/mlnx-ofed-kernel-modules.prerm -index 6f1b1df..ab105a3 100755 +index 6f1b1df..a2c66fa 100755 --- a/debian/mlnx-ofed-kernel-modules.prerm +++ b/debian/mlnx-ofed-kernel-modules.prerm -@@ -1,10 +1,4 @@ +@@ -1,10 +1,3 @@ #!/bin/sh -set -e @@ -191,17 +199,17 @@ index 6f1b1df..ab105a3 100755 - update-alternatives --remove ofa_kernel_headers \ - /usr/src/ofa_kernel/@ARCH@/@KVER@ -fi - +- #DEBHELPER# diff --git a/debian/rules b/debian/rules -index df4c725..5fee05c 100755 +index e9b2564..c5925e8 100755 --- a/debian/rules +++ b/debian/rules @@ -42,6 +42,7 @@ else pdkms:=$(pname)-modules@KERNEL_TYPE@ endif putils:=$(pname)-utils -+pdev:=$(pname)-dev ++pdev:=$(pname)-dev@KERNEL_TYPE@ pversion := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-.\+/\1/p') prel := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\([^-]\+\)-\(.\+\)/\2/p') @@ -224,7 +232,7 @@ index df4c725..5fee05c 100755 endif # Force DKMS to install our modules. -@@ -215,8 +216,8 @@ ifneq ($(WITH_DKMS),1) +@@ -213,8 +214,8 @@ ifneq ($(WITH_DKMS),1) sed -i \ -e 's/@KVER@/$(kernelver)/' \ -e 's/@ARCH@/$(deb_arch)/' \ @@ -236,5 +244,5 @@ index df4c725..5fee05c 100755 ifneq ($(MLNX_KO_NO_STRIP),1) -- -2.35.1 +2.42.0 diff --git a/kernel-modules/mlnx-ofa_kernel/debian/meta_data.yaml b/kernel-modules/mlnx-ofa_kernel/debian/meta_data.yaml index dd239c9a..9d860212 100644 --- a/kernel-modules/mlnx-ofa_kernel/debian/meta_data.yaml +++ b/kernel-modules/mlnx-ofa_kernel/debian/meta_data.yaml @@ -1,12 +1,11 @@ --- -debver: 5.5 +debver: 5.9 debname: mlnx-ofed-kernel dl_path: - name: mlnx-ofa-kernel-5.5.tgz + name: mlnx-ofa-kernel-5.9.tgz url: "https://linux.mellanox.com/public/repo/mlnx_ofed/\ - 5.5-1.0.3.2/SRPMS/mlnx-ofa_kernel-5.5.tgz" - md5sum: 5b9b3f9aa7c7207291538a1568c793ef - sha256sum: 50674ca9cb2905a0dd2077c782a0fcfe31d64f9e1e1ebdb5e0353a23dd9c36db + 5.9-0.5.6.0/SRPMS/mlnx-ofa_kernel-5.9.tgz" + sha256sum: c25965b336b58116ee8f4ddaf3c858564b00214ab12164a347f2d27d32d79df5 revision: dist: $STX_DIST GITREVCOUNT: diff --git a/kernel-modules/mlnx-ofa_kernel/debian/patches/0002-Enable-mlx5-onboard-udev-name.patch b/kernel-modules/mlnx-ofa_kernel/debian/patches/0001-Enable-mlx5-onboard-udev-name.patch similarity index 100% rename from kernel-modules/mlnx-ofa_kernel/debian/patches/0002-Enable-mlx5-onboard-udev-name.patch rename to kernel-modules/mlnx-ofa_kernel/debian/patches/0001-Enable-mlx5-onboard-udev-name.patch diff --git a/kernel-modules/mlnx-ofa_kernel/debian/patches/0001-mlx5-pci_irq-Use-irq_update_affinity_hint.patch b/kernel-modules/mlnx-ofa_kernel/debian/patches/0001-mlx5-pci_irq-Use-irq_update_affinity_hint.patch deleted file mode 100644 index 6b3d7bf3..00000000 --- a/kernel-modules/mlnx-ofa_kernel/debian/patches/0001-mlx5-pci_irq-Use-irq_update_affinity_hint.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 73bb521a587baf042d5e79aa2ff4b5e973c64a7b Mon Sep 17 00:00:00 2001 -From: Jiping Ma -Date: Tue, 1 Mar 2022 18:42:47 -0800 -Subject: [PATCH] mlx5: pci_irq: Use irq_update_affinity_hint - -The StarlingX kernel was patched to deprecate irq_set_affinity_hint -by cherry-picking the patches at: - https://lore.kernel.org/netdev/20210903152430.244937-1-nitesh@redhat.com/t/#u - -These 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 - -This commit modifies the mlx5 driver so that it uses the -irq_update_affinity_hint function instead of the irq_set_affinity_hint -function. The former only sets the hint, whereas the latter sets both -the hint and the IRQ affinity. - -Please note that this is a divergence from the aforementioned patch -series, which make mlx5 use irq_set_affinity_and_hint, which currently -behaves in the same way as irq_set_affinity_hint. The intent with -diverging from mainline is to allow the user-specified IRQ affinity (via -the irqaffinity= command line argument) take effect for the IRQs -set up by the mlx5 device driver. - -The mlx5 commit in mainline is accessible at: - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7451e9ea8e2055af39afe7ff39a5f68d8ec6b98d - -Signed-off-by: M. Vefa Bicakci -Signed-off-by: Jiping Ma ---- - drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c -index 06ea6fc..dd97f89 100644 ---- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c -+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c -@@ -175,7 +175,7 @@ static void irq_release(struct kref *kref) - * before calling it. This is why there is asymmetry with set_rmap - * which should be called after alloc_irq but before request_irq. - */ -- irq_set_affinity_hint(irq->irqn, NULL); -+ irq_update_affinity_hint(irq->irqn, NULL); - free_cpumask_var(irq->mask); - free_irq(irq->irqn, &irq->nh); - kfree(irq); -@@ -276,7 +276,7 @@ static struct mlx5_irq *irq_request(struct mlx5_irq_pool *pool, int i, - goto err_xa; - } - affinity_copy(irq, affinity, mlx5_irq_table_get(dev)); -- irq_set_affinity_hint(irq->irqn, irq->mask); -+ irq_update_affinity_hint(irq->irqn, irq->mask); - cpu_get(mlx5_irq_table_get(dev), irq->mask); - return irq; - err_xa: --- -2.31.1 - diff --git a/kernel-modules/mlnx-ofa_kernel/debian/patches/0002-mlx5-pci_irq-Use-irq_update_affinity_hint.patch b/kernel-modules/mlnx-ofa_kernel/debian/patches/0002-mlx5-pci_irq-Use-irq_update_affinity_hint.patch deleted file mode 100644 index 67472546..00000000 --- a/kernel-modules/mlnx-ofa_kernel/debian/patches/0002-mlx5-pci_irq-Use-irq_update_affinity_hint.patch +++ /dev/null @@ -1,91 +0,0 @@ -From e5d69db1083481aef4ea64b504c294929c7422d9 Mon Sep 17 00:00:00 2001 -From: "M. Vefa Bicakci" -Date: Fri, 14 Jan 2022 16:26:29 -0500 -Subject: [PATCH] mlx5: pci_irq: Use irq_update_affinity_hint - -This commit applies a patch that modifies the mlx5 driver so that it -uses the irq_update_affinity_hint function instead of the -irq_set_affinity_hint function. The former only sets the hint, whereas -the latter sets both the hint and the IRQ affinity. - -The intent of the patch is to allow the user-specified IRQ affinity (via -the irqaffinity= command line argument) take effect for the IRQs set up -by the mlx5 device driver. - -(Please see the description of the applied patch for more information.) - -Signed-off-by: M. Vefa Bicakci ---- - ...pci_irq-Use-irq_update_affinity_hint.patch | 60 +++++++++++++++++++ - 1 file changed, 60 insertions(+) - create mode 100644 source/backports/1000-mlx5-pci_irq-Use-irq_update_affinity_hint.patch - -diff --git a/source/backports/1000-mlx5-pci_irq-Use-irq_update_affinity_hint.patch b/source/backports/1000-mlx5-pci_irq-Use-irq_update_affinity_hint.patch -new file mode 100644 -index 000000000000..f1122af264eb ---- /dev/null -+++ b/source/backports/1000-mlx5-pci_irq-Use-irq_update_affinity_hint.patch -@@ -0,0 +1,60 @@ -+From 3884feaf05e9b1003ab83ab76fbfdf9a188c4a19 Mon Sep 17 00:00:00 2001 -+From: "M. Vefa Bicakci" -+Date: Fri, 14 Jan 2022 16:26:29 -0500 -+Subject: [PATCH] mlx5: pci_irq: Use irq_update_affinity_hint -+ -+The StarlingX kernel was patched to deprecate irq_set_affinity_hint -+by cherry-picking the patches at: -+ https://lore.kernel.org/netdev/20210903152430.244937-1-nitesh@redhat.com/t/#u -+ -+These 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 -+ -+This commit modifies the mlx5 driver so that it uses the -+irq_update_affinity_hint function instead of the irq_set_affinity_hint -+function. The former only sets the hint, whereas the latter sets both -+the hint and the IRQ affinity. -+ -+Please note that this is a divergence from the aforementioned patch -+series, which make mlx5 use irq_set_affinity_and_hint, which currently -+behaves in the same way as irq_set_affinity_hint. The intent with -+diverging from mainline is to allow the user-specified IRQ affinity (via -+the irqaffinity= command line argument) take effect for the IRQs -+set up by the mlx5 device driver. -+ -+The mlx5 commit in mainline is accessible at: -+ https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7451e9ea8e2055af39afe7ff39a5f68d8ec6b98d -+ -+Signed-off-by: M. Vefa Bicakci -+--- -+ drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 6 +++--- -+ 1 file changed, 3 insertions(+), 3 deletions(-) -+ -+diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c -+index 09d0ce8061f3..db7472d10fb6 100644 -+--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c -++++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c -+@@ -237,8 +237,8 @@ static int set_comp_irq_affinity_hint(struct mlx5_core_dev *mdev, int i) -+ cpumask_set_cpu(cpumask_local_spread(i, mdev->priv.numa_node), -+ irq->mask); -+ if (IS_ENABLED(CONFIG_SMP) && -+- irq_set_affinity_hint(irqn, irq->mask)) -+- mlx5_core_warn(mdev, "irq_set_affinity_hint failed, irq 0x%.4x", -++ irq_update_affinity_hint(irqn, irq->mask)) -++ mlx5_core_warn(mdev, "irq_update_affinity_hint failed, irq 0x%.4x", -+ irqn); -+ -+ return 0; -+@@ -261,7 +261,7 @@ static void clear_comp_irq_affinity_hint(struct mlx5_core_dev *mdev, int i) -+ msix = priv->msix_arr; -+ irqn = msix[vecidx].vector; -+ #endif -+- irq_set_affinity_hint(irqn, NULL); -++ irq_update_affinity_hint(irqn, NULL); -+ free_cpumask_var(irq->mask); -+ } -+ -+-- -+2.29.2 -+ --- -2.29.2 - diff --git a/kernel-modules/mlnx-ofa_kernel/debian/patches/series b/kernel-modules/mlnx-ofa_kernel/debian/patches/series index ef30fbd9..0bc75636 100644 --- a/kernel-modules/mlnx-ofa_kernel/debian/patches/series +++ b/kernel-modules/mlnx-ofa_kernel/debian/patches/series @@ -1,2 +1 @@ -0001-mlx5-pci_irq-Use-irq_update_affinity_hint.patch -0002-Enable-mlx5-onboard-udev-name.patch +0001-Enable-mlx5-onboard-udev-name.patch