Subject: Re: [PATCH bpf-next v3 1/2] bpf, xdp: per-map bpf_redirect_map functions for XDP

From: Jesper Dangaard Brouer <[email-masked]>
Date: Mon, 22 Feb 2021 08:23:01 +0100

On Sun, 21 Feb 2021 21:09:53 +0100
Björn Töpel <[email-masked]> wrote:

> From: Björn Töpel <[email-masked]>
> 
> Currently the bpf_redirect_map() implementation dispatches to the
> correct map-lookup function via a switch-statement. To avoid the
> dispatching, this change adds one bpf_redirect_map() implementation per
> map. Correct function is automatically selected by the BPF verifier.
> 
> v2->v3 : Fix build when CONFIG_NET is not set. (lkp)
> v1->v2 : Re-added comment. (Toke)
> rfc->v1: Get rid of the macro and use __always_inline. (Jesper)
> 
> Acked-by: Toke Høiland-Jørgensen <[email-masked]>
> Signed-off-by: Björn Töpel <[email-masked]>
> ---
>  include/linux/bpf.h    | 20 +++++++-------
>  include/linux/filter.h |  9 +++++++
>  include/net/xdp_sock.h |  6 ++---
>  kernel/bpf/cpumap.c    |  2 +-
>  kernel/bpf/devmap.c    |  4 +--
>  kernel/bpf/verifier.c  | 17 ++++++++----
>  net/core/filter.c      | 61 ++++++++++++++++++++++++++++--------------
>  7 files changed, 78 insertions(+), 41 deletions(-)

Love it! :-)

Acked-by: Jesper Dangaard Brouer <[email-masked]>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer