Digging into the return value of netdev_pick_tx().
Want to be able to debug the case where a socket
selects another queue_id.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
The BPF-prog "not_txq_zero" also needed to take into account
that skb->queue_mapping usually isn't set for locally
generated traffic.
I worry that sockets can set another queue id that could
override our (BPF choice) in netdev_pick_tx().
See sk_tx_queue_set() and sk_tx_queue_get().
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This version of the XPS script have been modified to
work with the shell ash. As bash was not avail on
the Yocto target host.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
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>
The reason for going this route is that this allow us to
create a user binary that contains the BPF object file.
Thus, we can avoid having to load the BPF file from
a specific location or having to be in same dir as file.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
The Yocto build this is intended for doesn't have /bin/bash
adapt script.
External program "getopt" not avail.
The 'sort' tool is also different, as it comes from busybox.
Adapt the cmdline options for 'sort'.
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>