On 10/20/20 3:25 PM, Toke Høiland-Jørgensen wrote: > From: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > > Based on the discussion in [0], update the bpf_redirect_neigh() helper to > accept an optional parameter specifying the nexthop information. This makes > it possible to combine bpf_fib_lookup() and bpf_redirect_neigh() without > incurring a duplicate FIB lookup - since the FIB lookup helper will return > the nexthop information even if no neighbour is present, this can simply be > passed on to bpf_redirect_neigh() if bpf_fib_lookup() returns > BPF_FIB_LKUP_RET_NO_NEIGH. > > [0] https://lore.kernel.org/bpf/393e17fc-d187-3a8d-2f0d-a627c7c63fca@xxxxxxxxxxxxx/ > > Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > --- > include/linux/filter.h | 9 ++ > include/uapi/linux/bpf.h | 22 +++++- > net/core/filter.c | 159 +++++++++++++++++++++++++--------------- > scripts/bpf_helpers_doc.py | 1 > tools/include/uapi/linux/bpf.h | 22 +++++- > 5 files changed, 145 insertions(+), 68 deletions(-) > Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>