Closed MohamadAlAdraa closed 8 months ago
Does it work if you do import p4utils
?
Hi @edgar-costa,
Yes, see the following image.
the only missing module is sswitch_runtime, as you see here it is not there compiler is not able to find this module.
Is it something need to be fixed in the installation file?
Thanks.
Hi @MohamadAlAdraa
Did you install bmv2
and p4c
with my scripts? Or only p4utils
? I think that might be the problem.
Our install process is the following: https://github.com/nsg-ethz/p4-utils/blob/master/install-tools/install-p4-dev.sh
Try to run the function: site_packages_fix
that might fix it.
Please tell me if this fixes it so I can add a note in the installing process.
Hi @edgar-costa,
My last question would be, what is the difference between setQueueMaxSize and set_queu_depth and set_queue_rate?
Hi @MohamadAlAdraa ,
Did what I told you to do in the last message fix the issue? I would like to know it.
Answering your questions:
set_queue_depth
sets the number of packets a port queue can hold, so basically its size.set_queue_rate
sets the maximum rate packets will be emptied from the queue. If you set it at a lower rate than your input packet rate, when queue_depth
packets are in the queue, they will start to be dropped. Hi @edgar-costa,
Yes, I was pulling the main from bmv2 and p4c and changing on them. However, when I pulled the exact commit you are specifying in the installation script and I changed on it, it worked fine.
Thank you for your help.
Hi,
I am trying to install p4-utils on ubuntu 22.04. I am using the new install script. It is installed successfully. When I try to write a controller, I am importing the following module: from p4utils.utils.sswitch_thrift_API import SimpleSwitchThriftAPI
which is giving me the following error: Traceback (most recent call last): File "/home/mohamad/testbed-P4-emulator/controllers/ciena-controller.py", line 2, in
from p4utils.utils.sswitch_thrift_API import SimpleSwitchThriftAPI
File "/home/mohamad/p4-tools/p4-utils/p4utils/utils/sswitch_thrift_API.py", line 34, in
from sswitch_runtime import SimpleSwitch
ModuleNotFoundError: No module named 'sswitch_runtime'
so inside the sswitch_thrift_API.py there is the following imports: from sswitch_runtime import SimpleSwitch from sswitch_runtime.ttypes import *
so sswitch_runtime cannot be found, what can be the problem?
thank you