This seems to be a common occuring issue with tc cmdline.
And the C-code have inherited the issue in the API.
Trying to replace a TC-BPF prog often result in appending a new prog
(as a new tc filter instance).
Be careful to set both handle and prio and the replace flag.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Yocto build have a problem with loading this via tc
# tc filter replace dev eth1 egress prio 0xC000 handle 1 bpf da obj tc_txq_policy_kern.o
Continuing without mounted eBPF fs. Too old kernel?
mkdir (null)/globals failed: No such file or directory
Unable to load program
It can be worked around via mounting BPF file-system manually:
# mount -t bpf bpf /sys/fs/bpf/
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>