diff options
author | Toke Høiland-Jørgensen <[email protected]> | 2020-10-09 20:42:34 +0200 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2020-10-11 21:59:20 +0200 |
commit | d1c362e1dd68a421cf9033404cf141a4ab734a5d (patch) | |
tree | a1d84d0c824c50cfa276c2ff2dd83237f16257af /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 52b07e56af6414a1623901e18bf6a217ec33c11f (diff) |
bpf: Always return target ifindex in bpf_fib_lookup
The bpf_fib_lookup() helper performs a neighbour lookup for the destination
IP and returns BPF_FIB_LKUP_NO_NEIGH if this fails, with the expectation
that the BPF program will pass the packet up the stack in this case.
However, with the addition of bpf_redirect_neigh() that can be used instead
to perform the neighbour lookup, at the cost of a bit of duplicated work.
For that we still need the target ifindex, and since bpf_fib_lookup()
already has that at the time it performs the neighbour lookup, there is
really no reason why it can't just return it in any case. So let's just
always return the ifindex if the FIB lookup itself succeeds.
Signed-off-by: Toke Høiland-Jørgensen <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Cc: David Ahern <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions