diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2016-10-07 00:23:45 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2016-10-07 00:23:45 +0800 |
commit | 9380868bdaa36078563b3485527c25de9da091ba (patch) | |
tree | aeae412dcc0aded243247d1af1034a844b6c34f1 /net | |
parent | b7c55ec7a5164ab103ab832b4598559b42c8369b (diff) | |
download | freebsd-ports-gnome-9380868bdaa36078563b3485527c25de9da091ba.tar.gz freebsd-ports-gnome-9380868bdaa36078563b3485527c25de9da091ba.tar.zst freebsd-ports-gnome-9380868bdaa36078563b3485527c25de9da091ba.zip |
- Fix page zeroing (http://dpdk.org/dev/patchwork/patch/15211/)
- Added options for DEBUG and TOOLS
- Added WWW:
PR: 212923
Submitted by: rum1cro@yandex.ru
Approved by: bruce.richardson@intel.com (maintainer)
Diffstat (limited to 'net')
-rw-r--r-- | net/dpdk/Makefile | 17 | ||||
-rw-r--r-- | net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap | 24 | ||||
-rw-r--r-- | net/dpdk/pkg-descr | 2 | ||||
-rw-r--r-- | net/dpdk/pkg-plist | 1 |
4 files changed, 43 insertions, 1 deletions
diff --git a/net/dpdk/Makefile b/net/dpdk/Makefile index 2f986b121933..1ea5ea158a1e 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/ @@ -17,9 +18,19 @@ ONLY_FOR_ARCHS_REASON= Only works on 64-bit x86 hardware NO_PACKAGE= ignores cflags RTE_TARGET= x86_64-native-bsdapp-clang WRKBUILD= ${WRKSRC}/${RTE_TARGET} +MAKE_ENV= V=1 ALL_TARGET= install T=${RTE_TARGET} +OPTIONS_DEFINE= DEBUG TOOLS +OPTIONS_SUB= yes +DEBUG_DESC= Debugging support (unoptimized build, impacts performance) +TOOLS_DESC= Install 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 \ @@ -33,7 +44,7 @@ post-patch: ${WRKSRC}/mk/exec-env/bsdapp/rte.vars.mk do-install: - ${MKDIR} ${STAGEDIR}${DATADIR}/${RTE_TARGET}/app \ + @${MKDIR} ${STAGEDIR}${DATADIR}/${RTE_TARGET}/app \ ${STAGEDIR}${DATADIR}/${RTE_TARGET}/lib \ ${STAGEDIR}${DATADIR}/${RTE_TARGET}/include/generic \ ${STAGEDIR}${DATADIR}/${RTE_TARGET}/include/exec-env @@ -60,4 +71,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/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 000000000000..36e6eeed9c21 --- /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); + diff --git a/net/dpdk/pkg-descr b/net/dpdk/pkg-descr index a4f09217b2a0..0a775ed3c088 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 5c7e0b4293d6..fa2bc526551f 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%% |