On 2/10/2024 2:09 AM, Stephen Hemminger wrote: > On Sat, 10 Feb 2024 00:54:15 +0000 > Ferruh Yigit <ferruh.yi...@amd.com> wrote: > >> 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 <step...@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 <step...@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. > > Just set up an equivalent Ubuntu VM 22.04 VM and made sure all packages > were up to date. > > Looks like Ubuntu borked the packaging of bpftool. > Maybe Luca has some insight. > > shemminger@ubuntu-22-04:~/dpdk$ sudo apt install libbpf-dev bpftool > Reading package lists... Done > Building dependency tree... Done > Reading state information... Done > Package bpftool is a virtual package provided by: > linux-nvidia-6.2-tools-common 6.2.0-1003.3~22.04.1 > linux-lowlatency-hwe-6.5-tools-common 6.5.0-17.17.1.1.1~22.04.1 > linux-hwe-6.5-tools-common 6.5.0-17.17~22.04.1 > linux-hwe-6.2-tools-common 6.2.0-39.40~22.04.1 > You should explicitly select one to install. >
I can make it work but it can hit others too, we need something that detects this condition and disables tap/bpf.