Closed xiaobai0102 closed 1 year ago
What OS and version of that OS are you using?
How did you install the P4 development tools?
Have you tried rebooting the system and then running the same command again, in case some state is left over from a previous run that was not fully cleaned up? I am not certain, but perhaps that error message can occur if there is an old simple_switch_grpc process still running from an earlier make run
command in the tutorials repository, assuming that the output you show above is from that.
I have resolved this issue now, but I encountered an error while running the packetinout file in ptf tests in p4 gudie. The error is as follows, and I don't know how to solve it. Started simple switch grpc. Waiting 2 seconds before starting PTF test ... [sudo] password for liuwei: /usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/EGG-INFO/scripts/ptf:19: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses import imp Calling target program-options parser Adding interface veth0 as port 0 Adding interface veth2 as port 1 Adding interface veth4 as port 2 Adding interface veth6 as port 3 Adding interface veth8 as port 4 Adding interface veth10 as port 5 Adding interface veth12 as port 6 Using packet manipulation module: ptf.packet_ scapy Adding interface veth14 as port 7 Server listening on 0.0.0.0:9559 2023-04-28 16:01:44,049 - root - INFO - Importing platform: eth 2023-04-28 16:01:44,063 - root - INFO - port map: {(0, 0): 'veth1', (0, 1): 'veth3', (0, 2): 'veth5', (0, 3): 'veth7', (0, 4): 'veth9', (0, 5): 'veth11', (0, 6): 'veth13', (0, 7): 'veth15'} 2023-04-28 16:01:44,063 - root - INFO - Autogen random seed: 66988585 Traceback (most recent call last): File "/usr/local/bin/ptf", line 4, in <module> import ('pkgresources').run script('ptf==0.9.3', 'ptf') File "/usr/lib/python3/dist-packages/pkgresources/init.py", line 656, in run script self.require(requires)[0].run_ script(script_name, ns) File "/usr/lib/python3/dist-packages/pkgresources/init.py", line 1453, in run script exec(code, namespace, namespace) File "/usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/EGG-INFO/scripts/ptf", line 859, in <module> ptf.dataplane instance.port add(ifname, device, port) File "/usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/ptf/dataplane.py", line 682, in port_ add self.ports[port_id] = self.dppclass( File "/usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/ptf/dataplane.py", line 145, in init self.socket.bind((interface_name, self.ETH_P_ALL)) OSError: [Errno 19] No such device
1426864603 @.***
------------------ 原始邮件 ------------------ 发件人: "jafingerhut/p4-guide" @.>; 发送时间: 2023年4月28日(星期五) 中午11:17 @.>; @.**@.>; 主题: Re: [jafingerhut/p4-guide] how can i solve this problem (Issue #53)
What OS and version of that OS are you using?
How did you install the P4 development tools?
Have you tried rebooting the system and then running the same command again, in case some state is left over from a previous run that was not fully cleaned up? I am not certain, but perhaps that error message can occur if there is an old simple_switch_grpc process still running from an earlier make run command in the tutorials repository, assuming that the output you show above is from that.
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Before any of the PTF tests in the p4-guide repository can be successfully run, you must create many veth interfaces for them to use in sending and receiving packets. Run the script bin/veth_setup.sh as user root, e.g. sudo path/to/bin/veth_setup.sh
.
Waiting 2 seconds before starting PTF test ... [sudo] password for liuwei: Calling target program-options parser Adding interface veth0 as port 0 Adding interface veth2 as port 1 Adding interface veth4 as port 2 Adding interface veth6 as port 3 Adding interface veth8 as port 4 Adding interface veth10 as port 5 Adding interface veth12 as port 6 Adding interface veth14 as port 7 Server listening on 0.0.0.0:9559 /usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/EGG-INFO/scripts/ptf:19: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses import imp Using packet manipulation module: ptf.packet_scapy 2023-04-26 21:33:14,692 - root - INFO - Importing platform: eth 2023-04-26 21:33:14,694 - root - INFO - port map: {(0, 0): 'veth1', (0, 1): 'veth3', (0, 2): 'veth5', (0, 3): 'veth7', (0, 4): 'veth9', (0, 5): 'veth11', (0, 6): 'veth13', (0, 7): 'veth15'} 2023-04-26 21:33:14,694 - root - INFO - Autogen random seed: 71143180 Traceback (most recent call last): File "/usr/local/bin/ptf", line 4, in
import('pkg_resources').run_script('ptf==0.9.3', 'ptf')
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 656, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 1453, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/EGG-INFO/scripts/ptf", line 859, in
ptf.dataplane_instance.port_add(ifname, device, port)
File "/usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/ptf/dataplane.py", line 682, in port_add
self.ports[port_id] = self.dppclass(
File "/usr/local/lib/python3.10/dist-packages/ptf-0.9.3-py3.10.egg/ptf/dataplane.py", line 145, in init
self.socket.bind((interface_name, self.ETH_P_ALL))
OSError: [Errno 19] No such device