Date: Thu, 6 Oct 2016 16:23:45 +0000 (UTC) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r423416 - in head/net/dpdk: . files Message-ID: <201610061623.u96GNjwC063985@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: amdmi3 Date: Thu Oct 6 16:23:45 2016 New Revision: 423416 URL: https://svnweb.freebsd.org/changeset/ports/423416 Log: - 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) Added: head/net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap (contents, props changed) Modified: head/net/dpdk/Makefile head/net/dpdk/pkg-descr head/net/dpdk/pkg-plist Modified: head/net/dpdk/Makefile ============================================================================== --- head/net/dpdk/Makefile Thu Oct 6 16:06:28 2016 (r423415) +++ head/net/dpdk/Makefile Thu Oct 6 16:23:45 2016 (r423416) @@ -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- 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> Added: head/net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap Thu Oct 6 16:23:45 2016 (r423416) @@ -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); + Modified: head/net/dpdk/pkg-descr ============================================================================== --- head/net/dpdk/pkg-descr Thu Oct 6 16:06:28 2016 (r423415) +++ head/net/dpdk/pkg-descr Thu Oct 6 16:23:45 2016 (r423416) @@ -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/ Modified: head/net/dpdk/pkg-plist ============================================================================== --- head/net/dpdk/pkg-plist Thu Oct 6 16:06:28 2016 (r423415) +++ head/net/dpdk/pkg-plist Thu Oct 6 16:23:45 2016 (r423416) @@ -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%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201610061623.u96GNjwC063985>