[PATCH v4 5/7] net/tap: use libbpf to load new BPF program
Stephen Hemminger
stephen at networkplumber.org
Thu Feb 8 21:39:52 CET 2024
On Thu, 8 Feb 2024 11:05:53 -0800
Stephen Hemminger <stephen at networkplumber.org> wrote:
> There were multiple issues in the RSS queue support in the TAP
> driver. This required extensive rework of the BPF support.
>
> Change the BPF loading to use bpftool to
> create a skeleton header file, and load with libbpf.
> The BPF is always compiled from source so less chance that
> source and instructions diverge. Also resolves issue where
> libbpf and source get out of sync. The program
> is only loaded once, so if multiple rules are created
> only one BPF program is loaded in kernel.
>
> The new BPF program only needs a single action.
> No need for action and re-classification step.
>
> It alsow fixes the missing bits from the original.
> - supports setting RSS key per flow
> - level of hash can be L3 or L3/L4.
>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Note: this patch introduces a optional dependency on bpftool
to get the RSS to work. If bpftool is not present, then RSS
is not built, and attempts to use rte_flow_action_queue will
fail with not supported.
It looks like the CI build environment is missing bpftool,
so all the builds just skip that code. This works but CI build
environments need to change to get bpftool. Not sure how to make
that happen.
More information about the dev
mailing list