Open Arishbiswas opened 2 weeks ago
@osinstom @tatry
You can add the --extern-file
command to the compiler, I would take a look at the
https://github.com/p4lang/p4c/blob/main/backends/ebpf/CMakeLists.txt#L256C156-L256C169
ebpf_checksum_extern
example.
sudo -E p4c/backends/ebpf/run-ebpf-test.py -t test -c "p4c/build/p4c-ebpf" p4c --extern-file p4c/testdata/extern_modules/extern-checksum-ebpf.c p4c/testdata/p4_16_samples/ebpf_checksum_extern.p4
should run it.
how can we add custom extern for psa-ebpf backend. is it possoble to write an (ebpf.c) extern and call it from the p4 program