FreeBSD Bugzilla – Attachment 175085 Details for
Bug 212923
net/dpdk: Add options, fix contigmem.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
dpdk.patch
dpdk_2.txt (text/plain), 3.06 KB, created by
ru_M1cRO
on 2016-09-23 14:25:10 UTC
(
hide
)
Description:
dpdk.patch
Filename:
MIME Type:
Creator:
ru_M1cRO
Created:
2016-09-23 14:25:10 UTC
Size:
3.06 KB
patch
obsolete
>diff --git a/net/dpdk/Makefile b/net/dpdk/Makefile >index 2f986b1..4fcbc0b 100644 >--- a/net/dpdk/Makefile >+++ b/net/dpdk/Makefile >@@ -2,6 +2,7 @@ > > PORTNAME= dpdk > PORTVERSION= 16.07 >+PORTREVISION= 1 > CATEGORIES= net > MASTER_SITES= http://www.dpdk.org/browse/dpdk/snapshot/ > >@@ -20,6 +21,15 @@ WRKBUILD= ${WRKSRC}/${RTE_TARGET} > > ALL_TARGET= install T=${RTE_TARGET} > >+OPTIONS_DEFINE= DEBUG TOOLS >+OPTIONS_SUB= yes >+DEBUG_DESC= With DEBUG(unoptimized build - will impact performance) >+TOOLS_DESC= Added tool scripts >+ >+DEBUG_MAKE_ENV= EXTRA_CFLAGS='-O0 -g' >+TOOLS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyelftools>=0:devel/py-pyelftools >+TOOLS_USES= python >+ > # build up the list of files in the compiled directory that should be executable > EXEC_FILES= app/cmdline_test \ > app/testpipeline \ >@@ -60,4 +70,8 @@ do-install: > ${LN} -sf ${DATADIR}/examples ${STAGEDIR}${EXAMPLESDIR} > ${INSTALL_KLD} ${WRKBUILD}/kmod/* ${STAGEDIR}${KMODDIR} > >+do-install-TOOLS-on: >+ ${MKDIR} ${STAGEDIR}${PREFIX}/bin/ >+ ${INSTALL_SCRIPT} ${WRKSRC}/tools/dpdk-pmdinfo.py ${STAGEDIR}${PREFIX}/bin/ >+ > .include <bsd.port.mk> >diff --git a/net/dpdk/pkg-descr b/net/dpdk/pkg-descr >index a4f0921..921194a 100644 >--- a/net/dpdk/pkg-descr >+++ b/net/dpdk/pkg-descr >@@ -13,3 +13,5 @@ amongst others. > Applications written using the DPDK run in userspace. The devices used by a > DPDK application are removed from kernel control and are instead managed > directly by that application. >+ >+WWW: http://dpdk.org >diff --git a/net/dpdk/pkg-plist b/net/dpdk/pkg-plist >index 5c7e0b4..fa2bc52 100644 >--- a/net/dpdk/pkg-plist >+++ b/net/dpdk/pkg-plist >@@ -553,4 +553,5 @@ lib/dpdk > %%DATADIR%%/x86_64-native-bsdapp-clang/lib/librte_sched.a > %%DATADIR%%/x86_64-native-bsdapp-clang/lib/librte_table.a > %%DATADIR%%/x86_64-native-bsdapp-clang/lib/librte_timer.a >+%%TOOLS%%bin/dpdk-pmdinfo.py > %%PORTEXAMPLES%%%%EXAMPLESDIR%% >diff --git a/net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap b/net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap >new file mode 100644 >index 0000000..36e6eee >--- /dev/null >+++ b/net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap >@@ -0,0 +1,24 @@ >+--- lib/librte_eal/bsdapp/contigmem/contigmem.c 2016-08-16 22:46:46 UTC >++++ lib/librte_eal/bsdapp/contigmem/contigmem.c >+@@ -216,15 +216,19 @@ static int >+ contigmem_mmap_single(struct cdev *cdev, vm_ooffset_t *offset, vm_size_t size, >+ struct vm_object **obj, int nprot) >+ { >++ uint64_t buffer_index; >++ >+ /* >+ * The buffer index is encoded in the offset. Divide the offset by >+ * PAGE_SIZE to get the index of the buffer requested by the user >+ * app. >+ */ >+- if ((*offset/PAGE_SIZE) >= contigmem_num_buffers) >++ buffer_index = *offset / PAGE_SIZE; >++ if (buffer_index >= contigmem_num_buffers) >+ return EINVAL; >+ >+- *offset = (vm_ooffset_t)vtophys(contigmem_buffers[*offset/PAGE_SIZE]); >++ memset(contigmem_buffers[buffer_index], 0, contigmem_buffer_size); >++ *offset = (vm_ooffset_t)vtophys(contigmem_buffers[buffer_index]); >+ *obj = vm_pager_allocate(OBJT_DEVICE, cdev, size, nprot, *offset, >+ curthread->td_ucred); >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
rum1cro
:
maintainer-approval+
Actions:
View
Attachments on
bug 212923
: 175085