xsk: Explicitly inline functions and move definitions
authorBjörn Töpel <bjorn.topel@intel.com>
Wed, 20 May 2020 19:21:02 +0000 (21:21 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 May 2020 00:31:27 +0000 (17:31 -0700)
commit26062b185eee49142adc45f9aa187d909d02d961
tree1d73827201d1c000c6c0381b199c9521c04214a6
parent82c41671ca4f597b6ff05bd5d118161deec26e07
xsk: Explicitly inline functions and move definitions

In order to reduce the number of function calls, the struct
xsk_buff_pool definition is moved to xsk_buff_pool.h. The functions
xp_get_dma(), xp_dma_sync_for_cpu(), xp_dma_sync_for_device(),
xp_validate_desc() and various helper functions are explicitly
inlined.

Further, move xp_get_handle() and xp_release() to xsk.c, to allow for
the compiler to perform inlining.

rfc->v1: Make sure xp_validate_desc() is inlined for Tx perf. (Maxim)

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200520192103.355233-15-bjorn.topel@gmail.com
include/net/xsk_buff_pool.h
net/xdp/xsk.c
net/xdp/xsk_buff_pool.c
net/xdp/xsk_queue.h