xdp: Simplify xdp_return_{frame, frame_rx_napi, buff}
authorBjörn Töpel <bjorn.topel@intel.com>
Wed, 20 May 2020 19:21:01 +0000 (21:21 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 22 May 2020 00:31:27 +0000 (17:31 -0700)
commit82c41671ca4f597b6ff05bd5d118161deec26e07
tree6bd0694fc24467e3828c350356bd38391079f8cb
parent0807892ecb35734b7ce6f7c29b078f1b60151c94
xdp: Simplify xdp_return_{frame, frame_rx_napi, buff}

The xdp_return_{frame,frame_rx_napi,buff} function are never used,
except in xdp_convert_zc_to_xdp_frame(), by the MEM_TYPE_XSK_BUFF_POOL
memory type.

To simplify and reduce code, change so that
xdp_convert_zc_to_xdp_frame() calls xsk_buff_free() directly since the
type is know, and remove MEM_TYPE_XSK_BUFF_POOL from the switch
statement in __xdp_return() function.

Suggested-by: Maxim Mikityanskiy <maximmi@mellanox.com>
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-14-bjorn.topel@gmail.com
net/core/xdp.c