mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
traffic-pacing-edt: tc_fq_pacer.sh adjust packet per flow_limit
This was causing strange issues, where a TCP single flow could not achieve the correct bandwidth. Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
@@ -10,6 +10,7 @@ char _license[] SEC("license") = "GPL";
|
||||
|
||||
/* skb->len in bytes, thus easier to keep rate in bytes */
|
||||
#define RATE_IN_BITS (1000 * 1000 * 1000ULL)
|
||||
//#define RATE_IN_BITS (200 * 1000 * 1000ULL)
|
||||
//#define RATE_IN_BITS (500 * 1000 * 1000ULL)
|
||||
#define RATE_IN_BYTES (RATE_IN_BITS / 8)
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ i=0
|
||||
for dir in /sys/class/net/$DEV/queues/tx-*; do
|
||||
# Details: cause-off-by-one, as tx-0 becomes handle 1:
|
||||
((i++)) || true
|
||||
tc qdisc add dev $DEV parent 7FFF:$i handle $i: fq
|
||||
#tc qdisc add dev $DEV parent 7FFF:$i handle $i: fq
|
||||
#
|
||||
# The higher 'flow_limit' is needed for high-BW pacing
|
||||
tc qdisc add dev $DEV parent 7FFF:$i handle $i: fq \
|
||||
flow_limit 1000
|
||||
#
|
||||
# quantum $((1514*4)) initial_quantum $((1514*20))
|
||||
# tc qdisc add dev $DEV parent 7FFF:$i handle $i: fq maxrate 930mbit
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user