p4-utils icon indicating copy to clipboard operation
p4-utils copied to clipboard

No module sswitch_runtime

Open caopeirui opened this issue 3 years ago • 7 comments

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?

caopeirui avatar Nov 15 '21 12:11 caopeirui

By the way, would you mind telling me the most significant difference between SimpleSwitchThriftAPI and SimpleSwitchP4RuntimeAPI ?

caopeirui avatar Nov 15 '21 12:11 caopeirui

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.

jurijnota avatar Nov 25 '21 13:11 jurijnota

maybe you can find it in the file "behavioral-model/targets/simple_switch/thrift/simple_switch.thrift"

yhx-coder avatar May 22 '22 10:05 yhx-coder

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?

trailll avatar Oct 10 '22 02:10 trailll