Skip to Content.

rare-dev - [rare-dev] bumping ebpf insn to 1m

Subject: Rare project developers

List archive


[rare-dev] bumping ebpf insn to 1m


Chronological Thread 
  • From: mc36 <>
  • To:
  • Cc: "" <>
  • Subject: [rare-dev] bumping ebpf insn to 1m
  • Date: Tue, 21 Jun 2022 12:33:57 +0200

hi,

first of all, i'm very happy to see ebgp will arrive to openwrt 22.03!
but, could you please bump the ebpf instructions to 1m? according to
https://github.com/iovisor/bcc/blob/master/docs/kernel-versions.md
the kernel already have it, but when i try to load a bigger program i get:

BPF program is too large. Processed 1000001 insn
processed 1000001 insns (limit 1000000) max_states_per_insn 56 total_states
51016 peak_states 1837 mark_read 61
-- END PROG LOAD LOG --
libbpf: prog 'xdp_router': program too large (5415 insns), at most 4096 insns
libbpf: failed to load program 'xdp_router'
libbpf: failed to load object '/usr/sbin/p4xdp_kern.bin'
error loading code

whereas the same loads on a fresh debian/sid and performs everything as
needed...

if i change the
https://github.com/rare-freertr/freeRtr/blob/e5b738056a0c0dc3dc4868c0bd8416418f7133aa/misc/native/p4xdp_kern.c#L278
to something smaller, let's say 2, then it loads fine one openwrt too, and
passes almost all the ~500 integration
tests except those who require a mode depth packet processing like
http://sources.freertr.org/cfg/p4lang-rout041.tst
(basically you can think about this loop as recirculation in the real
forwarding engines, but here,
unrolled, because the current version ebpf verifier does not like backward
jumps:)

about my plans:

for now, btw, i'm happy with the 2 but, as openwrt will have ebpf, and,
rare/freerouter
recently got stacking capability, i'm planning to add more features to the
p4xdp dataplane
to mark green on https://wiki.geant.org/display/RARE/Home because this makes
the p4xdp
dataplane a real thing... (before i considered it as a technical
demonstration:)

for now, i already stacked all my openwrts to my nearest p4dpdk nodes (up to
some 10gbps),
who btw already stacked to my single tofion node... (it's an programmable
asic up to 12tbps)
this means in short that all of these above mentioned nodes configured from a
single
location, the mac learning and so also performed on that single router... the
underlay
between the dataplanes could be anything including tunnels, because the
stacking uses
regular mpls labels internally on the backplane links...

regarding the openwrts role, their p4xdp get programmed via regular api
messages common
between all the above mentioned dataplanes... the openwrts just pick all the
packets from
their wlan interfaces, and according to the configured bridge-domain on the
controlling router,
they perform the packet rewrites needed to reach the point where the routing,
filtering, natting,
etc will happen to the packets... (these are usually different nodes, btw)
this also means that i can freely roam between my openwrts connected over a
routed network...

thanks,
csaba



  • [rare-dev] bumping ebpf insn to 1m, mc36, 06/21/2022

Archive powered by MHonArc 2.6.19.

Top of Page