[PATCH v3] tap: fix build of TAP BPF program

Stephen Hemminger stephen at networkplumber.org
Wed Jul 26 18:31:27 CEST 2023


On Thu, 20 Jul 2023 16:25:49 -0700
Stephen Hemminger <stephen at networkplumber.org> wrote:

> Move the BPF program related code into a subdirectory.
> And add a Makefile for building it.
> 
> The code was depending on old versions of headers from iproute2.
> Include those headers here so that build works.
> 
> The standalone build was also broken because by
> commit ef5baf3486e0 ("replace packed attributes")
> which introduced __rte_packed into this code.
> 
> Add a python program to extract the resulting BPF into
> a format that can be consumed by the TAP driver.
> 
> Update the documentation.
> 
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>

Some backstory notes:

0. No longer work for Microsoft, so don't have Azure/Failsafe/TAP setup.
Therefore compile tested only.

1. Went down this rabbit hole while trying to clear some of the DPDK
patch backlog, and ran into this one fix for RSS on fragmented packets
https://patchwork.dpdk.org/project/dpdk/patch/20220420112400.2271-1-madhuker.mythri@oracle.com/

2. This version of patch only makes the BPF program build.
It does not change the BPF program used currently by TAP device.

3. Doing build will change the bpf program since clang is probably
optimizing more now.

Bottom line:
Merging the patch won't fix the RSS bug, it won't change the current TAP
device behavior (same BPF). But it will allow for easier later fix in next release.


More information about the dev mailing list