OSDN Git Service

samples/bpf: use hugepages in xdpsock app
authorKevin Laatz <kevin.laatz@intel.com>
Tue, 27 Aug 2019 02:25:30 +0000 (02:25 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 30 Aug 2019 23:08:27 +0000 (01:08 +0200)
commit3945b37a975d22bed33b525f2933bac82424793d
tree96d0f8a9bd273899be911c3c6a2e41fa72eb8ff2
parent03895e63ff97447e5eab1b71ed46e3662a45bfe8
samples/bpf: use hugepages in xdpsock app

This patch modifies xdpsock to use mmap instead of posix_memalign. With
this change, we can use hugepages when running the application in unaligned
chunks mode. Using hugepages makes it more likely that we have physically
contiguous memory, which supports the unaligned chunk mode better.

Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
samples/bpf/xdpsock_user.c