diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-11 00:10:58 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-05-11 00:10:59 +0200 |
commit | ff1f56d9877f82d1fdac64e32827a570a54143bd (patch) | |
tree | 2bab4dd9bff8b85508549c97886d92d82d7c22e1 /tools/include | |
parent | bpf, doc: clarification for the meaning of 'id' (diff) | |
parent | samples/bpf: Add example of ipv4 and ipv6 forwarding in XDP (diff) | |
download | linux-ff1f56d9877f82d1fdac64e32827a570a54143bd.tar.xz linux-ff1f56d9877f82d1fdac64e32827a570a54143bd.zip |
Merge branch 'bpf-fib-lookup-helper'
David Ahern says:
====================
Provide a helper for doing a FIB and neighbor lookup in the kernel
tables from an XDP program. The helper provides a fastpath for forwarding
packets. If the packet is a local delivery or for any reason is not a
simple lookup and forward, the packet is expected to continue up the stack
for full processing.
The response from a FIB and neighbor lookup is either the egress index
with the bpf_fib_lookup struct filled in with dmac and gateway or
0 meaning the packet should continue up the stack. In time we can
revisit this to return the FIB lookup result errno if it is one of the
special RTN_'s such as RTN_BLACKHOLE (-EINVAL) so that the XDP
programs can do an early drop if desired.
Patches 1-6 do some more refactoring to IPv6 with the end goal of
extracting a FIB lookup function that aligns with fib_lookup for IPv4,
basically returning a fib6_info without creating a dst based entry.
Patch 7 adds lookup functions to the ipv6 stub. These are needed since
bpf is built into the kernel and ipv6 may not be built or loaded.
Patch 8 adds the bpf helper and 9 adds a sample program.
v3
- remove ETH_ALEN and in6_addr from uapi header
v2
- removed pkt_access from bpf_func_proto as noticed by Daniel
- added check in that IPv6 forwarding is enabled
- added DaveM's ack on patches 1-7 and 9 based on v1 response and
fact that no changes were made to them in v2
v1
- updated commit messages and cover letter
- added comment to sample program noting lack of verification on
egress device supporting XDP
RFC v2
- fixed use of foward helper from cls_act as noted by Daniel
- in patch 1 rename fib6_lookup_1 as well for consistency
====================
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/include')
0 files changed, 0 insertions, 0 deletions