Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue running ipdk demo #312

Open
AmitDavidi opened this issue Jan 2, 2023 · 1 comment
Open

Issue running ipdk demo #312

AmitDavidi opened this issue Jan 2, 2023 · 1 comment

Comments

@AmitDavidi
Copy link

AmitDavidi commented Jan 2, 2023

Hello,
I followed the readme and after running ipdk connect

I ran the command ipdk demo.

I got the error: ipdk: command not found ,

I found inside the folder scripts the script: rundemo.sh

After trying to run it, it seemed that there were some files missing, (placed in the wrong folder perhaps) so I moved them around,
Now I got it to run, but It still seems that the script is missing something:

root@ab27fa4c867e:~# ./scripts/rundemo.sh   

Cleaning from previous run

./scripts/rundemo.sh: line 53: killall: command not found
./scripts/rundemo.sh: line 54: killall: command not found

Creating Ubuntu focal image

~ ~
./scripts/rundemo.sh: line 61: /git/ipdk/build/networking/scripts/get-image.sh: No such file or directory
cp: cannot stat 'focal-server-cloudimg-amd64.img': No such file or directory
cp: cannot stat 'focal-server-cloudimg-amd64.img': No such file or directory
~

Configuring VM networking and creating cloud-init images

./scripts/rundemo.sh: line 103: cloud-localds: command not found
./scripts/rundemo.sh: line 139: cloud-localds: command not found

Setting hugepages up and starting P4-OVS

~/P4-OVS ~
OS and Version details...
Ubuntu : 20.04


Updated Environment Variables ...
SDE_INSTALL: /root/p4-sde/install
PKG_CONFIG_PATH: /root/p4-sde/install/lib/x86_64-linux-gnu/pkgconfig
LIBRARY_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_INSTALL/lib:
LD_LIBRARY_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_INSTALL/lib64:/root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_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:/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/p4ovs/P4OVS_DEPS_INSTALL/bin:/root/p4ovs/P4OVS_DEPS_INSTALL/sbin:/root/ipdk/build:ipdk/build:/ipdk/build:/home/ad/ipdk/build:/home/ad/ipdk/build:/root/p4ovs/P4OVS_DEPS_INSTALL/bin:/root/p4ovs/P4OVS_DEPS_INSTALL/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
C_INCLUDE_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/include
CPLUS_INCLUDE_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/include

1024
1024
Killing OVS Processes If Already Running....
Killing ovsdb-server process....
Remove previous configs from: /root/p4ovs/P4OVS_DEPS_INSTALL/etc/openvswitch
Remove previous configs from: /root/p4ovs/P4OVS_DEPS_INSTALL/var/run/openvswitch
Create an OVSDB with avaiable schema....
Starting OVSDB server....
Staring OVS-VSWITCHD Process....
2023-01-02T13:26:30Z|00001|vlog|INFO|opened log file /tmp/ovs-vswitchd.log
2023-01-02T13:26:30Z|00002|ovs_numa|INFO|Discovered 2 CPU cores on NUMA node 0
2023-01-02T13:26:30Z|00003|ovs_numa|INFO|Discovered 1 NUMA nodes and 2 CPU cores
WARNING: Logging before InitGoogleLogging() is written to STDERR
I20230102 13:26:30.437259  4648 bf_sde_wrapper.cc:1649] bf_sysfs_fname: /sys/class/bf/bf0/device/dev_add
Install dir: /usr (0x55930c24fcc0)
bf_switchd: system services initialized
bf_switchd: loading conf_file /usr/share/stratum/target_skip_p4_no_bsp.conf...
bf_switchd: processing device configuration...
Configuration for dev_id 0
  Family        : dpdk
bf_switchd: processing P4 configuration...
P4 profile for dev_id 0
P4 EAL args dummy -n 4 -c 3
Debug CLI disable
num mempool objs 1
  mempool_name: MEMPOOL0
  buffer_size:  2304
  pool_size:    4096
  cache_size:   256
  numa_node:    0
num P4 programs 1
  p4_name: dummy
  bfrt_config: 
  port_config: 
  p4_pipeline_name: pipe
  core_id: 1
  numa_node: 0
    context: 
    config: 
  Pipes in scope [0 1 2 3 ]
  Mirror Config
    n_slots: 4 
    n_sessions: 64 
    fast_clone: 0 
  diag: 
  accton diag: 
  non_default_port_ppgs: 0
  SAI default initialize: 1 
Operational mode set to DPDK MODEL
Initialized the device types using PAL handler registration
STUB:port_mgr_platform_init DPDK
bf_switchd: drivers initialized
Skipping P4 program load for dev_id 0
EAL: Detected CPU lcores: 2
EAL: Detected NUMA nodes: 1
EAL: Detected shared linkage of DPDK
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'PA'
EAL: VFIO support initialized
TELEMETRY: No legacy callbacks, legacy socket not created
2023-01-02 13:26:30.933492 BF_BFRT ERROR - convertDevProfileToDeviceConfig:103 No TDI json file found for program dummy Not adding TDI Info object for it
2023-01-02 13:26:30.937693 BF_BFRT FATAL - Unable to find any TDI Json Schema File

bf_switchd: dev_id 0 initialized

bf_switchd: initialized 1 devices
Skip p4 lib init
Skip mav diag lib init
bf_switchd: spawning cli server thread
bf_switchd: running in background; driver shell is disabled
bf_switchd: server started - listening on port 9999
I20230102 13:26:31.025564  4648 bf_sde_wrapper.cc:1667] switchd started successfully
I20230102 13:26:31.025583  4648 bf_interface.cc:89] Detected is_sw_model: 1
I20230102 13:26:31.025589  4648 bf_interface.cc:90] SDE version: 9.5.0
2023-01-02T13:26:31Z|00001|switch_vrf|INFO|vrf init successful on device 0
2023-01-02T13:26:31Z|00002|switch_rmac|INFO|rmac init successful on device 0
2023-01-02T13:26:31Z|00003|switch_rmac|INFO|rmac group created on device 0, rmac handle 0x12000001 
2023-01-02T13:26:31Z|00004|switch_vrf|INFO|vrf created on device 0 vrf id 0 handle 0xa000001 
2023-01-02T13:26:31Z|00004|reconnect|INFO|unix:/root/p4ovs/P4OVS_DEPS_INSTALL/var/run/openvswitch/db.sock: connecting...
2023-01-02T13:26:31Z|00005|reconnect|INFO|unix:/root/p4ovs/P4OVS_DEPS_INSTALL/var/run/openvswitch/db.sock: connected
All Processes Started.....
~

Creating vhost-user ports

~/P4-OVS ~
OS and Version details...
Ubuntu : 20.04


Updated Environment Variables ...
SDE_INSTALL: /root/p4-sde/install
PKG_CONFIG_PATH: /root/p4-sde/install/lib/x86_64-linux-gnu/pkgconfig
LIBRARY_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_INSTALL/lib:
LD_LIBRARY_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_INSTALL/lib64:/root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_INSTALL/lib64:/root/p4ovs/P4OVS_DEPS_INSTALL/lib:/root/p4ovs/P4OVS_DEPS_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:/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:/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/p4ovs/P4OVS_DEPS_INSTALL/bin:/root/p4ovs/P4OVS_DEPS_INSTALL/sbin:/root/p4ovs/P4OVS_DEPS_INSTALL/bin:/root/p4ovs/P4OVS_DEPS_INSTALL/sbin:/root/ipdk/build:ipdk/build:/ipdk/build:/home/ad/ipdk/build:/home/ad/ipdk/build:/root/p4ovs/P4OVS_DEPS_INSTALL/bin:/root/p4ovs/P4OVS_DEPS_INSTALL/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
C_INCLUDE_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/include
CPLUS_INCLUDE_PATH: /root/p4ovs/P4OVS_DEPS_INSTALL/include

setting vhost_dev = true.Set request, successful...!!!
setting vhost_dev = true.Set request, successful...!!!
~

Generating dependent files from P4C and OVS pipeline builder

~/examples/simple_l3 ~
I20230102 13:26:47.213371  4692 bf_pipeline_builder.cc:113] Found P4 program: simple_l3
I20230102 13:26:47.213572  4692 bf_pipeline_builder.cc:120] 	Found pipeline: pipe
~

Starting VM1_TAP_DEV

~ ~
qemu-system-x86_64: -hda ./vm1.qcow2: Could not open './vm1.qcow2': No such file or directory

Waiting 10 seconds before starting second VM

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

~

Programming P4-OVS pipelines

qemu-system-x86_64: -hda ./vm2.qcow2: Could not open './vm2.qcow2': No such file or directory

I want to solve: qemu-system-x86_64: -hda ./vm2.qcow2: Could not open './vm2.qcow2': No such file or directory

and qemu-system-x86_64: -hda ./vm1.qcow2: Could not open './vm1.qcow2': No such file or directory

and all of the other - command not found erros,
Is the docker image bad ? or am I doing something wrong here?

@AmitDavidi
Copy link
Author

It seems like the commands

gnmi-cli set "device:virtual-device,name:net_vhost0,host:host1,device-type:VIRTIO_NET,queues:1,socket-path:/tmp/intf/vhost-user-0,port-type:LINK"

and

gnmi-cli set "device:virtual-device,name:net_vhost1,host:host1,device-type:VIRTIO_NET,queues:1,socket-path:/tmp/intf/vhost-user-1,port-type:LINK"

fail to create the ports in the specified path..
when I run these commands I get the error:
setting vhost_dev = true.Return grpc errno (14), Reason: failed to connect to all addresses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant