patch 'kernel/freebsd: fix module build on FreeBSD 14' has been queued to stable release 21.11.7

Kevin Traynor ktraynor at redhat.com
Tue Mar 5 16:33:41 CET 2024


Hi,

FYI, your patch has been queued to stable release 21.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/11/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7f994fccfe7f81d6ac04efc86c3816d76f1f7cfb

Thanks.

Kevin

---
>From 7f994fccfe7f81d6ac04efc86c3816d76f1f7cfb Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Tue, 19 Dec 2023 11:29:59 +0000
Subject: [PATCH] kernel/freebsd: fix module build on FreeBSD 14

[ upstream commit 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 ]

When building nic_uio module on FreeBSD 14, a build error is given in
the DRIVER_MODULE macro:

nic_uio.c:84:81: error: too many arguments provided to function-like macro invocation
DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0);
                                                                                ^
On FreeBSD 14, the devclass parameter is dropped from the macro,
so we conditionally compile a different invocation
for BSD versions before/after v14.

Bugzilla ID: 1335

Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Tested-by: Daxue Gao <daxuex.gao at intel.com>
---
 kernel/freebsd/nic_uio/nic_uio.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/kernel/freebsd/nic_uio/nic_uio.c b/kernel/freebsd/nic_uio/nic_uio.c
index 7a81694c92..0043892870 100644
--- a/kernel/freebsd/nic_uio/nic_uio.c
+++ b/kernel/freebsd/nic_uio/nic_uio.c
@@ -79,8 +79,12 @@ struct pci_bdf {
 };
 
-static devclass_t nic_uio_devclass;
-
 DEFINE_CLASS_0(nic_uio, nic_uio_driver, nic_uio_methods, sizeof(struct nic_uio_softc));
+
+#if __FreeBSD_version < 1400000
+static devclass_t nic_uio_devclass;
 DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_devclass, nic_uio_modevent, 0);
+#else
+DRIVER_MODULE(nic_uio, pci, nic_uio_driver, nic_uio_modevent, 0);
+#endif
 
 static int
-- 
2.43.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-03-05 14:08:54.940538396 +0000
+++ 0008-kernel-freebsd-fix-module-build-on-FreeBSD-14.patch	2024-03-05 14:08:54.619520683 +0000
@@ -1 +1 @@
-From 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 Mon Sep 17 00:00:00 2001
+From 7f994fccfe7f81d6ac04efc86c3816d76f1f7cfb Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 5eedf66ac0e5ce62cd333e523996c63a3c4c2c00 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list