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/dpdk/files | |
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/dpdk/files')
-rw-r--r-- | net/dpdk/files/patch-dpdk-dev-v2-contigmem-zero-all-pages-during-mmap | 24 |
1 files changed, 24 insertions, 0 deletions
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); + |