* [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT
@ 2020-01-03 11:52 Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support Bruce Richardson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bruce Richardson @ 2020-01-03 11:52 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
The FreeBSD CI system is reporting errors with DPDK on the current head
of the FreeBSD development branch for FreeBSD 13. Ahead of BSD 13's
release, we need to apply fixes to ensure DPDK continues to compile
on the various versions.
Bruce Richardson (2):
eal/freebsd: update CPU macro for FreeBSD 13 support
kernel/freebsd: update contigmem for FreeBSD 13
kernel/freebsd/contigmem/contigmem.c | 7 +++++--
lib/librte_eal/freebsd/eal/include/rte_os.h | 12 ++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
--
2.24.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support
2020-01-03 11:52 [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Bruce Richardson
@ 2020-01-03 11:52 ` Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 2/2] kernel/freebsd: update contigmem for FreeBSD 13 Bruce Richardson
2020-01-20 16:47 ` [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Thomas Monjalon
2 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2020-01-03 11:52 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
In (currently unreleased) FreeBSD 13, the CPU_NAND macro has been renamed
to CPU_ANDNOT, so we need to use different DPDK-specific macros depending
on what system-defined ones are present.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_eal/freebsd/eal/include/rte_os.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h
index a5efe618f..eeb750cd8 100644
--- a/lib/librte_eal/freebsd/eal/include/rte_os.h
+++ b/lib/librte_eal/freebsd/eal/include/rte_os.h
@@ -29,6 +29,9 @@ typedef cpuset_t rte_cpuset_t;
CPU_COPY(&tmp, dst); \
} while (0)
#define RTE_CPU_FILL(set) CPU_FILL(set)
+
+/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */
+#ifdef CPU_NAND
#define RTE_CPU_NOT(dst, src) do \
{ \
cpuset_t tmp; \
@@ -36,5 +39,14 @@ typedef cpuset_t rte_cpuset_t;
CPU_NAND(&tmp, src); \
CPU_COPY(&tmp, dst); \
} while (0)
+#else
+#define RTE_CPU_NOT(dst, src) do \
+{ \
+ cpuset_t tmp; \
+ CPU_FILL(&tmp); \
+ CPU_ANDNOT(&tmp, src); \
+ CPU_COPY(&tmp, dst); \
+} while (0)
+#endif
#endif /* _RTE_OS_H_ */
--
2.24.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH 2/2] kernel/freebsd: update contigmem for FreeBSD 13
2020-01-03 11:52 [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support Bruce Richardson
@ 2020-01-03 11:52 ` Bruce Richardson
2020-01-20 16:47 ` [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Thomas Monjalon
2 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2020-01-03 11:52 UTC (permalink / raw)
To: dev; +Cc: Bruce Richardson
FreeBSD 13 has changed the definition of vm_page_replace so we need
to have slightly different code paths around this function depending on
the BSD version.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
kernel/freebsd/contigmem/contigmem.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/freebsd/contigmem/contigmem.c b/kernel/freebsd/contigmem/contigmem.c
index 64e0a7fec..7ea0bc617 100644
--- a/kernel/freebsd/contigmem/contigmem.c
+++ b/kernel/freebsd/contigmem/contigmem.c
@@ -297,19 +297,22 @@ contigmem_cdev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot,
VM_OBJECT_WLOCK(object);
vm_page_updatefake(page, paddr, memattr);
} else {
- vm_page_t mret;
/*
* Replace the passed in reqpage page with our own fake page and
* free up the original page.
*/
page = vm_page_getfake(paddr, memattr);
VM_OBJECT_WLOCK(object);
- mret = vm_page_replace(page, object, (*mres)->pindex);
+#if __FreeBSD__ >= 13
+ vm_page_replace(page, object, (*mres)->pindex, *mres);
+#else
+ vm_page_t mret = vm_page_replace(page, object, (*mres)->pindex);
KASSERT(mret == *mres,
("invalid page replacement, old=%p, ret=%p", *mres, mret));
vm_page_lock(mret);
vm_page_free(mret);
vm_page_unlock(mret);
+#endif
*mres = page;
}
--
2.24.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT
2020-01-03 11:52 [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 2/2] kernel/freebsd: update contigmem for FreeBSD 13 Bruce Richardson
@ 2020-01-20 16:47 ` Thomas Monjalon
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2020-01-20 16:47 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dev
03/01/2020 12:52, Bruce Richardson:
> The FreeBSD CI system is reporting errors with DPDK on the current head
> of the FreeBSD development branch for FreeBSD 13. Ahead of BSD 13's
> release, we need to apply fixes to ensure DPDK continues to compile
> on the various versions.
>
> Bruce Richardson (2):
> eal/freebsd: update CPU macro for FreeBSD 13 support
> kernel/freebsd: update contigmem for FreeBSD 13
Applied, thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-01-20 16:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-03 11:52 [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 1/2] eal/freebsd: update CPU macro for FreeBSD 13 support Bruce Richardson
2020-01-03 11:52 ` [dpdk-dev] [PATCH 2/2] kernel/freebsd: update contigmem for FreeBSD 13 Bruce Richardson
2020-01-20 16:47 ` [dpdk-dev] [PATCH 0/2] Fix build with FreeBSD 13-CURRENT Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).