summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorMagnus Karlsson <magnus.karlsson@intel.com>2021-09-22 09:56:06 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2021-09-28 00:18:35 +0200
commit94033cd8e73b8632bab7c8b7bb54caa4f5616db7 (patch)
tree3a9b38847f8a17f881826b944040238cc401110a /tools/testing
parent6aab0bb0c5cdc02d6f182ada2d86afae0c22fc76 (diff)
xsk: Optimize for aligned case
Optimize for the aligned case by precomputing the parameter values of the xdp_buff_xsk and xdp_buff structures in the heads array. We can do this as the heads array size is equal to the number of chunks in the umem for the aligned case. Then every entry in this array will reflect a certain chunk/frame and can therefore be prepopulated with the correct values and we can drop the use of the free_heads stack. Note that it is not possible to allocate more buffers than what has been allocated in the aligned case since each chunk can only contain a single buffer. We can unfortunately not do this in the unaligned case as one chunk might contain multiple buffers. In this case, we keep the old scheme of populating a heads entry every time it is used and using the free_heads stack. Also move xp_release() and xp_get_handle() to xsk_buff_pool.h. They were for some reason in xsk.c even though they are buffer pool operations. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20210922075613.12186-7-magnus.karlsson@gmail.com
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions