OSDN Git Service

bpf: Implement map_gen_lookup() callback for XSKMAP
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Fri, 1 Nov 2019 11:03:45 +0000 (12:03 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 1 Nov 2019 23:38:49 +0000 (00:38 +0100)
commite65650f291ee72fc578d6346080fc4699204ef2c
tree05a94d62e9e8c40672737ad5f16998d0f8164e4c
parent64fe8c061de7d7ffdfdc104a57d48d645ae0ac4f
bpf: Implement map_gen_lookup() callback for XSKMAP

Inline the xsk_map_lookup_elem() via implementing the map_gen_lookup()
callback. This results in emitting the bpf instructions in place of
bpf_map_lookup_elem() helper call and better performance of bpf
programs.

Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Link: https://lore.kernel.org/bpf/20191101110346.15004-3-bjorn.topel@gmail.com
kernel/bpf/xskmap.c