1fb4483207
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 >
2020-11-14 18:44:40 +01:00
9f97d984cb
traffic-pacing-edt: edt_pacer02.c add ECN marking horizon
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 17:16:03 +01:00
5a3e52cf43
traffic-pacing-edt: Make fq script respect --remove
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 16:51:56 +01:00
55a8513e2c
traffic-pacing-edt: Play with edt_pacer02 drop horizon
...
This didn't help.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 16:51:11 +01:00
252a40763a
traffic-pacing-edt: Adjustments to HTB script to get closer to EDT system
...
These adjustment doesn't help, EDT is still closer to 1Gbit/s at wire-level.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 14:58:47 +01:00
a6294dd946
edt_pacer02: Use skb wire_len
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 14:51:30 +01:00
3969089c64
traffic-pacing-edt/tc_fq_pacer.sh: Add doc explaining
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 13:53:49 +01:00
a5ed0071f1
traffic-pacing-edt: Add tc_fq_pacer.sh script for MQ-FQ setup
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 13:43:42 +01:00
aae2db4496
traffic-pacing-edt/tc_htb_shaper.sh: Make it easy to remove HTB qdisc
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 13:09:39 +01:00
bcd6074567
traffic-pacing-edt: Add HTB shaper script
...
This is primary to comparing HTB shaper accuracy against EDT
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-11-14 12:41:22 +01:00
fe9c2ed2ea
Merge branch 'master' of github.com:xdp-project/bpf-examples
...
Merging to integrated local branch traffic-pacing-edt01 changes
for the traffic-pacing-edt example.
2020-11-14 12:10:32 +01:00
86750f321e
EDT: implement horizon drop
...
FQ-pacing qdisc also have horizon, but cannot use that, because this
BPF-prog will have updated map (t_last) on packet and assumes it got
its part of bandwidth.
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-14 12:06:25 +01:00
efcd3c81b0
Implement basic EDT with static defines
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-14 10:43:56 +01:00
f98780e588
Add params for choosing other bpf object files
...
Default to edt_pacer02.o
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 14:52:36 +01:00
42c1c99799
Add note to edt_pacer02 as it is non-functional atm
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 14:40:19 +01:00
98ca505bc3
Add edt_pacer02.c for testing basic access to needed ctx and helpers
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 14:24:51 +01:00
30e9bddd8b
Add iproute2_compat.h to get iproute2 map support
...
This is needed for pinning maps later.
Cannot use the binary compatible top-part of struct, due to the
need for pinning later.
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 13:53:04 +01:00
30e9f04cf3
Fixup mentions of "ingress"
...
This was partly copied from netoptimizer/network-testing script
that used this for testing ingress path.
Our use-case is egress code path.
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 13:21:45 +01:00
91a8e78a12
Introduce parameter --remove
...
Need an easy way to move the setup again.
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 13:14:42 +01:00
72d3bba6d9
Make use of the params variables limit listing filter setup
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 13:14:27 +01:00
35ffcec7c3
Add common parameters.sh for shell cmdline arguments
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 12:46:26 +01:00
f8546bbbce
Add shell script for easier loading TC BPF egress program
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 12:18:08 +01:00
984faedafb
Copy shell 'tc' helper functions from netoptimizer/network-testing
...
Taken from:
https://github.com/netoptimizer/network-testing/blob/master/tc/functions.sh
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 11:49:04 +01:00
3ef00744da
Add edt_pacer01 only containing dummy tc program.
...
Want to make sure make system works and I can test load this prog.
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 11:48:51 +01:00
f4846b8297
Start traffic-pacing-edt example
...
Signed-off-by: Jesper Dangaard Brouer <netoptimizer@brouer.com >
2020-11-08 11:31:55 +01:00
f2c4416baf
bpf-encap: Update example to use the BPF helper syntax agreed upon by upstream
...
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com >
2020-10-21 16:54:29 +02:00
bf1c03c959
Merge pull request #1 from netoptimizer/MTU-tests01.public
...
MTU testing
Simple TC-BPF program for testing different packets sizes that violate the MTU of the interface.
This is part of testing upstream kernel work, for removing the MTU limit in the BPF-helpers that change packet size, and instead add BPF-helper that can check or lookup interface MTU.
2020-10-15 16:37:14 +02:00
f2a13d942f
MTU-tests: Cycle through different MTU packet sizes
...
Encode this statically via C/BPF-code switch statement, and
have global counter cycles through these.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 22:10:28 +02:00
7c2badedd4
MTU-tests: Fix stripping object file from .BTF section
...
Shot myself in the foot with stripping ELF obj file.
This was the reason I could not load BPF program with TC.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 17:08:42 +02:00
78788141e4
MTU-tests: Use map as counter
...
This doesn't work. It compiles, but loading with tc breaks.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 16:25:03 +02:00
cbb2da1d05
MTU-tests: Loading via tc seems not to support global vars
...
This code only works because LLVM optimize it as a constant.
As soon at I try to use it as variable it breaks.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 15:58:15 +02:00
bfc08deedd
MTU-tests: Add README
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 15:37:05 +02:00
4f8b36e569
MTU-tests: iproute2 'tc' tool doesn't understand BTF debug info
...
It still works when loading, but results in a huge warning
which is really annoying.
Add a Makefile hack to strip the object file.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 15:35:08 +02:00
5f3898ca61
MTU-tests: Add encap header after adjusting pkt room
...
This makes it easier to see/decode packets via tcpdump.
Borrowing part of ../encap-forward/encap.h.
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 15:34:50 +02:00
00eaf20fae
MTU-tests: Add tc_bpf program that increase packet size
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 15:34:37 +02:00
74bde6b32c
MTU-tests: Add new MTU-tests directory and Makefile
...
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com >
2020-10-13 15:04:22 +02:00
40706ad9fa
lsm-nobpf: Check for presence of BPF LSM before loading
...
If the BPF LSM is compiled-in but not enabled, the loading of the BPF
program will succeed, but it won't actually do anything. Detect this
and abort rather than silently not working.
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-12 16:53:24 +02:00
54259af20a
Add bpf-nolsm example for disabling bpf()
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-12 14:58:41 +02:00
71e076b08c
encap-forward: Use fib lookup + bpf_redirect() and bpf_redirect_neigh()
...
Only for IPv4, and requires bpf-next + a modification to bpf_fib_lookup()
to work.
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-08 16:56:07 +02:00
9bbedb4709
encap-forward: Add README describing the issue
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-07 14:39:09 +02:00
bc91d4d456
encap-forward: Support conditional IPv6 encapsulation with IPV6=1
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-07 13:35:38 +02:00
061bb5026c
encap-forward: new proposed helper for setting skb source valid
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-06 17:14:07 +02:00
e08a4e085d
lib/testenv: Don't get iface MAC address before we need it
...
Resolves a race condition where the MAC can change
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-06 17:13:44 +02:00
cbaa0704ab
encap-forward: Run ping and tcpdump as part of test setup
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-06 16:10:25 +02:00
a2dec68e1e
encap-forward: Change SKB packet type
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-06 16:06:45 +02:00
b7544155f7
Add lib/Makefile
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-06 15:59:44 +02:00
4513664ca3
Initial import with encap-forward example
...
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk >
2020-10-06 15:53:55 +02:00