View | Details | Raw Unified | Return to bug 243058
Collapse All | Expand All

(-)net/dpdk/files/patch-kernel_freebsd_contigmem_contigmem.c (+27 lines)
Line 0 Link Here
1
--- kernel/freebsd/contigmem/contigmem.c.orig	2020-01-03 12:22:51 UTC
2
+++ kernel/freebsd/contigmem/contigmem.c
3
@@ -297,19 +297,22 @@ contigmem_cdev_pager_fault(vm_object_t object, vm_ooff
4
 		VM_OBJECT_WLOCK(object);
5
 		vm_page_updatefake(page, paddr, memattr);
6
 	} else {
7
-		vm_page_t mret;
8
 		/*
9
 		 * Replace the passed in reqpage page with our own fake page and
10
 		 * free up the original page.
11
 		 */
12
 		page = vm_page_getfake(paddr, memattr);
13
 		VM_OBJECT_WLOCK(object);
14
-		mret = vm_page_replace(page, object, (*mres)->pindex);
15
+#if __FreeBSD__ >= 13
16
+		vm_page_replace(page, object, (*mres)->pindex, *mres);
17
+#else
18
+		vm_page_t mret = vm_page_replace(page, object, (*mres)->pindex);
19
 		KASSERT(mret == *mres,
20
 		    ("invalid page replacement, old=%p, ret=%p", *mres, mret));
21
 		vm_page_lock(mret);
22
 		vm_page_free(mret);
23
 		vm_page_unlock(mret);
24
+#endif
25
 		*mres = page;
26
 	}
27
 
(-)net/dpdk/files/patch-lib_librte__eal_freebsd_eal_include_rte__os.h (+27 lines)
Line 0 Link Here
1
--- lib/librte_eal/freebsd/eal/include/rte_os.h.orig	2020-01-03 12:22:03 UTC
2
+++ lib/librte_eal/freebsd/eal/include/rte_os.h
3
@@ -29,6 +29,9 @@ typedef cpuset_t rte_cpuset_t;
4
 	CPU_COPY(&tmp, dst); \
5
 } while (0)
6
 #define RTE_CPU_FILL(set) CPU_FILL(set)
7
+
8
+/* In FreeBSD 13 CPU_NAND macro is CPU_ANDNOT */
9
+#ifdef CPU_NAND
10
 #define RTE_CPU_NOT(dst, src) do \
11
 { \
12
 	cpuset_t tmp; \
13
@@ -36,5 +39,14 @@ typedef cpuset_t rte_cpuset_t;
14
 	CPU_NAND(&tmp, src); \
15
 	CPU_COPY(&tmp, dst); \
16
 } while (0)
17
+#else
18
+#define RTE_CPU_NOT(dst, src) do \
19
+{ \
20
+	cpuset_t tmp; \
21
+	CPU_FILL(&tmp); \
22
+	CPU_ANDNOT(&tmp, src); \
23
+	CPU_COPY(&tmp, dst); \
24
+} while (0)
25
+#endif
26
 
27
 #endif /* _RTE_OS_H_ */

Return to bug 243058