Daniel Borkmann 2c22542570 bpf, netkit: Add indirect call wrapper for fetching peer dev
ndo_get_peer_dev is used in tcx BPF fast path, therefore make use of
indirect call wrapper and therefore optimize the bpf_redirect_peer()
internal handling a bit. Add a small skb_get_peer_dev() wrapper which
utilizes the INDIRECT_CALL_1() macro instead of open coding.

Future work could potentially add a peer pointer directly into struct
net_device in future and convert veth and netkit over to use it so
that eventually ndo_get_peer_dev can be removed.

Co-developed-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Stanislav Fomichev <sdf@google.com>
Link: https://lore.kernel.org/r/20231114004220.6495-7-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
2023-11-20 10:15:16 -08:00
..
2023-10-26 20:02:41 -07:00
2021-12-16 07:18:35 -08:00
2023-10-11 10:39:01 +01:00
2023-10-20 17:41:29 -07:00
2023-10-27 10:51:42 +01:00
2023-10-31 05:10:11 -10:00
2022-11-21 20:36:30 -08:00
2023-11-01 11:16:34 -10:00
2022-12-12 15:04:39 -08:00