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
As far as I understand, when declaring a switch with the addP4Switch or addP4RuntimeSwitch methods, I'm supposed to be able to provide the same flags as the with the simple_switch or simple_switch_grpc CLI commands.
I'm specifically interested in being able to set the --cpu-port 510 flag, however I've tried every combination of arguments to the addP4Switch method and it doesn't seem to work, and the cpu port seems to be getting assigned the value 4.
None of these seem to work, even though they raise no errors:
On further investigation, I realize that on running net.enableCpuPortAll() the cpu_port key gets overwritten with True, and the cpu_port_num key gets overwritten with the value 4 (the next available port on the switch) in the topology.json file. I also noticed that you can set the cpu port for both runtime switches and regular p4 switches in p4utils, however in the command line, the simple_switch command does not support cpu ports. Not sure if this is a bug in p4utils.
I'm not entirely sure if I'm supposed to enable to the cpu port with the arguments to addP4RuntimeSwitch or with the enableCpuPortAll command. If anyone has a simple set of steps to follow for me, I'd appreciate that.
As far as I understand, when declaring a switch with the
addP4Switch
oraddP4RuntimeSwitch
methods, I'm supposed to be able to provide the same flags as the with thesimple_switch
orsimple_switch_grpc
CLI commands.I'm specifically interested in being able to set the
--cpu-port 510
flag, however I've tried every combination of arguments to theaddP4Switch
method and it doesn't seem to work, and the cpu port seems to be getting assigned the value 4.None of these seem to work, even though they raise no errors:
I run
net.enableCpuPortAll()
after I initialize all my switches, and yet the cpu port is mapped to the number 4. What am I doing wrong?The text was updated successfully, but these errors were encountered: