P4C
The P4 Compiler
|
TC backend aims to generate files for the P4TC implementation in Linux kernel (from 6.3.x version). P4TC is an implementation of the Programming Protocol-independent Packet Processors (P4) that is kernel based, building on top of Linux TC.
For more info on P4TC, Please refer:
The p4c-pna-p4tc compiler accepts the P4-16 programs written for the pna.p4 architecture model.
This backend generates three different outputs as explained below:
The backend for TC reuses code from the p4c-ebpf for generating c file.
The sample p4 programs are located in the testdata/p4tc_samples
directory.
To generate the 'template' file, 'c' file and 'json' file:
p4c-pna-p4tc simple_exact_example.p4 -o exact.template -c exact.c -i exact.json
Sosutha Sethuramapandian sosut.nosp@m.ha.s.nosp@m.ethur.nosp@m.amap.nosp@m.andia.nosp@m.n@in.nosp@m.tel.c.nosp@m.om
Usha Gupta usha..nosp@m.gupt.nosp@m.a@int.nosp@m.el.c.nosp@m.om