p4-utils
p4-utils copied to clipboard
No module sswitch_runtime
Hi @edgar-costa :
p4utils/utils/sswitch_thrift_API.py has the import code: from sswitch_runtime import SimpleSwitch from sswitch_runtime.ttypes import * However, 'sswitch_runtime' cannot be found. Where is the sswitch_runtime module?
By the way, would you mind telling me the most significant difference between SimpleSwitchThriftAPI and SimpleSwitchP4RuntimeAPI ?
Hi @caopeirui,
the module sswitch_runtime
is included in the behavioral model. You can check out the requirements for P4-Utils here. The difference between the SimpleSwitchThriftAPI
and the SimpleSwitchP4RuntimeAPI
is that the former is the legacy control plane API of the behavioral model, the latter is a new one based on P4Runtime that aims at becoming the new standard for the control plane of all the P4 devices. Unfortunately, SimpleSwitchP4RuntimeAPI
does not support registers operations yet, so you may still want to use the legacy API.
maybe you can find it in the file "behavioral-model/targets/simple_switch/thrift/simple_switch.thrift"
hello,I have met the same problem,and I find file 'sswitch_runtime' in behavioral model ,then i copy it to p4utils/utils/ and slolve the issue,but then it told me that i miss other moudules,when i copy one ,the other apper,all those missing modules can be found in behavioral model,so the issues is caused by bm2?