diff options
author | Stefan Eßer <se@FreeBSD.org> | 2022-01-03 11:21:10 +0100 |
---|---|---|
committer | Stefan Eßer <se@FreeBSD.org> | 2022-01-03 11:21:10 +0100 |
commit | 1b13427e48ed448f68a7d67a694da31b2d57104d (patch) | |
tree | 7fb7cf1e5c39deb73f6eec3f4b0981a50a2b8dc6 | |
parent | net-im/dendrite: Update distinfo due to reroll (diff) |
net/dpdk-20.11: fix build on -CURRENT
The CPU_SET macros in -CURRENT have been made compatible with GLIBC.
A simple test for the new signature of CPU_AND, CPU_OR, ... is the
existence of a CPU_ALLOC macro.
Approved by: portmgr (implicit)
MFH: 2022Q1
-rw-r--r-- | net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h b/net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h new file mode 100644 index 000000000000..c48d4a55c9a2 --- /dev/null +++ b/net/dpdk-20.11/files/patch-lib_librte__eal_freebsd_include_rte__os.h @@ -0,0 +1,41 @@ +--- lib/librte_eal/freebsd/include/rte_os.h.orig 2021-03-08 17:40:08 UTC ++++ lib/librte_eal/freebsd/include/rte_os.h +@@ -14,6 +14,28 @@ + #include <pthread_np.h> + + typedef cpuset_t rte_cpuset_t; ++ ++/* FreeBSD 14 uses GLIBC compatible CPU_AND, CPU_OR, ... */ ++#ifdef CPU_ALLOC ++ ++#define RTE_CPU_AND(dst, src1, src2) CPU_AND(dst, src1, src2) ++#define RTE_CPU_OR(dst, src1, src2) CPU_OR(dst, src1, src2) ++#define RTE_CPU_FILL(set) do \ ++{ \ ++ unsigned int i; \ ++ CPU_ZERO(set); \ ++ for (i = 0; i < CPU_SETSIZE; i++) \ ++ CPU_SET(i, set); \ ++} while (0) ++#define RTE_CPU_NOT(dst, src) do \ ++{ \ ++ cpu_set_t tmp; \ ++ RTE_CPU_FILL(&tmp); \ ++ CPU_XOR(dst, &tmp, src); \ ++} while (0) ++ ++#else ++ + #define RTE_CPU_AND(dst, src1, src2) do \ + { \ + cpuset_t tmp; \ +@@ -47,6 +69,8 @@ typedef cpuset_t rte_cpuset_t; + CPU_ANDNOT(&tmp, src); \ + CPU_COPY(&tmp, dst); \ + } while (0) +-#endif ++#endif /* CPU_NAND */ ++ ++#endif /* CPU_ALLOC */ + + #endif /* _RTE_OS_H_ */ |