[PATCH v9 5/9] net/tap: rewrite the RSS BPF program

Ferruh Yigit ferruh.yigit at amd.com
Wed May 1 13:14:28 CEST 2024


On 4/26/2024 4:48 PM, Stephen Hemminger wrote:
> Rewrite the BPF program used to do queue based RSS.
> Important changes:
> 	- uses newer BPF map format BTF
> 	- accepts key as parameter rather than constant default
> 	- can do L3 or L4 hashing
> 	- supports IPv4 options
> 	- supports IPv6 extension headers
> 	- restructured for readability
> 
> The usage of BPF is different as well:
> 	- the incoming configuration is looked up based on
> 	  class parameters rather than patching the BPF.
> 	- the resulting queue is placed in skb rather
> 	  than requiring a second pass through classifier step.
> 
> Note: This version only works with later patch to enable it on
> the DPDK driver side. It is submitted as an incremental patch
> to allow for easier review. Bisection still works because
> the old instruction are still present for now.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>

<...>

> @@ -0,0 +1,38 @@
> +This is the BPF program used to implement the RSS across queues flow action.
> +The program is loaded when first RSS flow rule is created and is never unloaded.
> +
> +Each flow rule creates a unique key (handle) and this is used as the key
> +for finding the RSS information for that flow rule.
> +
> +This version is built the BPF Compile Once — Run Everywhere (CO-RE)
> +framework and uses libbpf and bpftool.
> +
> +Limitations
> +-----------
> +- requires libbpf to run
> +- rebuilding the BPF requires Clang and bpftool.
> +  Some older versions of Ubuntu do not have working bpftool package.
> +  Need a version of Clang that can compile to BPF.
> +- only standard Toeplitz hash with standard 40 byte key is supported
> +- the number of flow rules using RSS is limited to 32
> +
> +Building
> +--------
> +During the DPDK build process the meson build file checks that
> +libbpf, bpftool, and clang are not available. If everything is
>

s/and clang are *not* available./and clang are available./ ?



More information about the dev mailing list