xsk: Wrap duplicated code to function
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Mon, 7 Oct 2024 12:24:57 +0000 (14:24 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 14 Oct 2024 15:23:45 +0000 (17:23 +0200)
commit1d10b2bed2d4b2003f174da739d8163b7f7957cf
tree931b6b5405b4d07ad28cdfea02fd465f0e8f042a
parent6e126872191df946a6fe01b79273119d32d96711
xsk: Wrap duplicated code to function

Both allocation paths have exactly the same code responsible for getting
and initializing xskb. Pull it out to common function.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20241007122458.282590-6-maciej.fijalkowski@intel.com
net/xdp/xsk_buff_pool.c