[P4-dev] Default switch case should not be reachable with new extern function primitive

Hamidreza Almasi halmas3 at uic.edu
Sat Feb 2 20:33:13 EST 2019


I have defined an extern function as follows:
extern void int_div(out bit<32> result, in bit<32> op1, in bit<32> op2);

and have implemented its functionality as a simple_switch primitive from p4
tutorials suggested checkouts tags. I compile the p4 code with:

p4c-bm2-ss --p4v 16 --p4runtime-file basic.p4info --p4runtime-format text
-o basic.json basic.p4

and feed it to simple_switch_grpc but when I send a packet, the switch
fails noting:
Assertion 'Default switch case should not be reachable' failed, file
'../../include/bm/bm_sim/actions.h' line '282'.

I have attached the p4 code, the switch log and the json file and would
appreciate your help on why this happens and what should the fix be.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190202/657b90ad/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basic.json
Type: application/json
Size: 14680 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190202/657b90ad/attachment-0001.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: basic.p4
Type: application/octet-stream
Size: 5013 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190202/657b90ad/attachment-0001.p4>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s1.log
Type: application/octet-stream
Size: 2960 bytes
Desc: not available
URL: <http://lists.p4.org/pipermail/p4-dev_lists.p4.org/attachments/20190202/657b90ad/attachment-0001.log>


More information about the P4-dev mailing list