ipdk-io / ipdk

Infrastructure Programmer Development Kit (IPDK) is an open source, vendor agnostic framework of drivers and APIs for infrastructure offload and management that runs on a CPU, IPU, DPU or switch.
Apache License 2.0
185 stars 68 forks source link

Error running rundemo.sh & rundemo_TAP_IO.sh for IPDK_Native #398

Open justinkong0623 opened 1 year ago

justinkong0623 commented 1 year ago

Can anyone help? I already upgrade protoc >= 3.19.0.

Wrong Message for rundemo_TAP_IO.sh:

root@justin-virtual-machine:~# /root/clone/ipdk/build/networking/scripts/rundemo_TAP_IO.sh --workdir=/root |& tee $HOME/out-rundemo_TAP_IO.sh

WORKING_DIR: /root SCRIPTS_DIR: /root/scripts DEPS_INSTALL_DIR: /root/networking-recipe/deps_install P4C_INSTALL_DIR: /root/p4c/install SDE_INSTALL_DIR: /root/p4-sde/install NR_INSTALL_DIR: /root/networking-recipe/install

Cleaning from previous run

Setting hugepages up and starting networking-recipe processes

~ ~

DEPS_INSTALL_DIR: /root/networking-recipe/deps_install SDE_INSTALL_DIR: /root/p4-sde/install NR_INSTALL_DIR: /root/networking-recipe/install P4C_INSTALL_DIR: /root/p4c/install

Updated Environment Variables ... SDE_INSTALL_DIR: /root/p4-sde/install LIBRARY_PATH: /root/networking-recipe/deps_install/lib:/root/networking-recipe/deps_install/lib64: LD_LIBRARY_PATH: /root/networking-recipe/deps_install/lib:/root/networking-recipe/deps_install/lib64:/root/networking-recipe/install/lib:/root/networking-recipe/install/lib64::/root/p4-sde/install/lib:/root/p4-sde/install/lib64:/root/p4-sde/install/lib/x86_64-linux-gnu:/usr/local/lib:/usr/local/lib64 PATH: /root/p4c/install/bin:/root/networking-recipe/deps_install/bin:/root/networking-recipe/deps_install/sbin:/root/networking-recipe/install/bin:/root/networking-recipe/install/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

1024 1024

SDE_INSTALL_DIR: /root/p4-sde/install NR_INSTALL_DIR: /root/networking-recipe/install

NR_INSTALL_DIR: /root/networking-recipe/install DEAMON_MODE_ARGS:

~

Creating TAP ports

~ ~ setting vhost_dev = true.Set request, successful...!!! I20230810 07:40:41.120030 146877 gnmi_ctl.cc:103] Client context cancelled. setting vhost_dev = true.Set request, successful...!!! I20230810 07:40:41.557056 146902 gnmi_ctl.cc:103] Client context cancelled. ~

Generating dependent files from P4C and pipeline builder

~/examples/simple_l3 ~ I20230810 07:40:45.816721 146940 tdi_pipeline_builder.cc:116] Found P4 program: simple_l3 I20230810 07:40:45.816859 146940 tdi_pipeline_builder.cc:123] Found pipeline: pipe ~

Create two Namespaces

Move TAP ports to respective namespaces and bringup the ports

Assign IP addresses to the TAP ports

Add ARP table for neighbor TAP port

Add Route to reach neighbor TAP port

Programming P4 pipeline

Traceback (most recent call last): File "/root/networking-recipe/install/bin/p4rt-ctl", line 45, in from p4.v1 import p4runtime_pb2 File "/usr/local/lib/python3.8/dist-packages/p4/v1/p4runtime_pb2.py", line 18, in from p4.config.v1 import p4info_pb2 as p4_dot_config_dot_v1_dot_p4infopb2 File "/usr/local/lib/python3.8/dist-packages/p4/config/v1/p4info_pb2.py", line 16, in from p4.config.v1 import p4types_pb2 as p4_dot_config_dot_v1_dot_p4typespb2 File "/usr/local/lib/python3.8/dist-packages/p4/config/v1/p4types_pb2.py", line 35, in _descriptor.FieldDescriptor( File "/usr/local/lib/python3.8/dist-packages/google/protobuf/descriptor.py", line 561, in new _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

Wrong Message for rundemo.sh: 沒有此一檔案或目錄=Files can't find 命令找不到=Can't find command

root@justin-virtual-machine:~# /root/clone/ipdk/build/networking/scripts/rundemo.sh --workdir=/root |& tee $HOME/out-rundemo_TAP_IO.sh

WORKING_DIR: /root SCRIPTS_DIR: /root/scripts DEPS_INSTALL_DIR: /root/networking-recipe/deps_install P4C_INSTALL_DIR: /root/p4c/install SDE_INSTALL_DIR: /root/p4-sde/install NR_INSTALL_DIR: /root/networking-recipe/install

Cleaning from previous run

Creating Ubuntu focal image

~ ~ dist: focal-server-cloudimg-amd64.img ~

Configuring VM networking and creating cloud-init images

/root/clone/ipdk/build/networking/scripts/rundemo.sh: 列 130: cloud-localds:命令找不到 /root/clone/ipdk/build/networking/scripts/rundemo.sh: 列 166: cloud-localds:命令找不到

Setting hugepages up and starting networking-recipe processes

~ ~

DEPS_INSTALL_DIR: /root/networking-recipe/deps_install SDE_INSTALL_DIR: /root/p4-sde/install NR_INSTALL_DIR: /root/networking-recipe/install P4C_INSTALL_DIR: /root/p4c/install

Updated Environment Variables ... SDE_INSTALL_DIR: /root/p4-sde/install LIBRARY_PATH: /root/networking-recipe/deps_install/lib:/root/networking-recipe/deps_install/lib64: LD_LIBRARY_PATH: /root/networking-recipe/deps_install/lib:/root/networking-recipe/deps_install/lib64:/root/networking-recipe/install/lib:/root/networking-recipe/install/lib64::/root/p4-sde/install/lib:/root/p4-sde/install/lib64:/root/p4-sde/install/lib/x86_64-linux-gnu:/usr/local/lib:/usr/local/lib64 PATH: /root/p4c/install/bin:/root/networking-recipe/deps_install/bin:/root/networking-recipe/deps_install/sbin:/root/networking-recipe/install/bin:/root/networking-recipe/install/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin

1024 1024

SDE_INSTALL_DIR: /root/p4-sde/install NR_INSTALL_DIR: /root/networking-recipe/install

NR_INSTALL_DIR: /root/networking-recipe/install DEAMON_MODE_ARGS:

~

Creating TAP ports

~ ~ setting vhost_dev = true.Set request, successful...!!! I20230810 07:45:07.882185 147076 gnmi_ctl.cc:103] Client context cancelled. setting vhost_dev = true.Set request, successful...!!! I20230810 07:45:09.063472 147098 gnmi_ctl.cc:103] Client context cancelled. ~

Generating dependent files from P4C and pipeline builder

~/examples/simple_l3 ~ I20230810 07:45:15.952613 147128 tdi_pipeline_builder.cc:116] Found P4 program: simple_l3 I20230810 07:45:15.952816 147128 tdi_pipeline_builder.cc:123] Found pipeline: pipe ~

Starting VM1_TAP_DEV

Using QEMU: ~/scripts ~ /root/clone/ipdk/build/networking/scripts/rundemo.sh: 列 248: /usr/bin/qemu-kvm: 沒有此一檔案或目錄

Waiting 10 seconds before starting second VM

.......... Starting VM2_TAP_DEV

~

Programming target pipelines

/root/clone/ipdk/build/networking/scripts/rundemo.sh: 列 279: /usr/bin/qemu-kvm: 沒有此一檔案或目錄 Traceback (most recent call last): File "/root/networking-recipe/install/bin/p4rt-ctl", line 45, in from p4.v1 import p4runtime_pb2 File "/usr/local/lib/python3.8/dist-packages/p4/v1/p4runtime_pb2.py", line 18, in from p4.config.v1 import p4info_pb2 as p4_dot_config_dot_v1_dot_p4infopb2 File "/usr/local/lib/python3.8/dist-packages/p4/config/v1/p4info_pb2.py", line 16, in from p4.config.v1 import p4types_pb2 as p4_dot_config_dot_v1_dot_p4typespb2 File "/usr/local/lib/python3.8/dist-packages/p4/config/v1/p4types_pb2.py", line 35, in _descriptor.FieldDescriptor( File "/usr/local/lib/python3.8/dist-packages/google/protobuf/descriptor.py", line 561, in new _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates