You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I declare neighber as a Struct or a header, it will fail while running simple_switch, as follow:
mao@mao-vm:~/maoP4/testbmv2/techTest$ sudo simple_switch -L 'trace' --log-file ~/maoP4/mao.log --log-flush -i 0@ens192 -i 1@ens224 ~/maoP4/testbmv2/techTest/output.file
Thrift port was not specified, will use 9090
Calling target program-options parser
Adding interface ens192 as port 0
Adding interface ens224 as port 1
Thrift server was started
simple_switch: ../../include/bm/bm_sim/actions.h:327: T bm::ActionParam::to(bm::ActionEngineState*) const [with T = bm::Field&]: Assertion `tag == ActionParam::FIELD' failed.
Aborted (core dumped)
mao@mao-vm:~/maoP4/testbmv2/techTest$
I recommend opening an issue with the p4c compiler once again. The backend should probably reject your program as bmv2 currently does not support compound types in registers.
The backend could also generate JSON that goes around this limitation, using masking and shifting when doing reads / writes.
That being said, I will leave this issue open in case there is a desire to add native support for this in bmv2 in the future.
When I declare neighber as a Struct or a header, it will fail while running simple_switch, as follow:
Declare is:
Read and write register in Ingress control, by:
If I declare register<bit<20>>(10) maoReg;, and modify Read and Write call respectively, it will work well.
The architecture model, <v1model.p4> has:
In my understanding, T can be anything including typical data-type, structure, header, etc.
Is that right?
The text was updated successfully, but these errors were encountered: