[PATCH v4 4/7] net/tap: rewrite the RSS BPF program

Ferruh Yigit ferruh.yigit at amd.com
Sat Feb 10 01:54:15 CET 2024


On 2/8/2024 7:05 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>

<...>

> diff --git a/drivers/net/tap/bpf/meson.build b/drivers/net/tap/bpf/meson.build
> new file mode 100644
> index 000000000000..f2c03a19fd4d
> --- /dev/null
> +++ b/drivers/net/tap/bpf/meson.build
> @@ -0,0 +1,81 @@
> +# SPDX-License-Identifier: BSD-3-Clause
> +# Copyright 2024 Stephen Hemminger <stephen at networkplumber.org>
> +
> +enable_tap_rss = false
> +
> +libbpf = dependency('libbpf', required: false, method: 'pkg-config')
> +if not libbpf.found()
> +    message('net/tap: no RSS support missing libbpf')
> +    subdir_done()
> +endif
> +
> +# Debian install this in /usr/sbin which is not in $PATH
> +bpftool = find_program('bpftool', '/usr/sbin/bpftool', required: false, version: '>= 5.6.0')
> +if not bpftool.found()
> +    message('net/tap: no RSS support missing bpftool')
> +    subdir_done()
> +endif
>

I am getting following build error:
'
drivers/net/tap/bpf/meson.build:13:10: ERROR: Command `/usr/sbin/bpftool
--version` failed with status 2.
'

There is a '/usr/sbin/bpftool' file but it is a script and gives
following message when run:
"WARNING: bpftool not found for kernel 6.5.0-15"

This is with "Ubuntu 22.04.3 LTS"


Overall thanks for fixing tap BPF support.



More information about the dev mailing list