p4lang / switch

Consolidated switch repo (API, SAI and Nettlink)
151 stars 72 forks source link

running switch drivers results in error #110

Closed cyberscribbleorg closed 3 years ago

cyberscribbleorg commented 3 years ago

I tried to compile switch on ubuntu 18.04

How to reproduce the issue

Checkout latest version of code base build it within docker environment of ubuntu 18.04 ./run_bm.sh ./run_drivers.sh

Output: Starting API RPC server on port 9091 RPC Initialization failed to get ifindex of cpu interface: No such device

cyberscribbleorg commented 3 years ago

Closing it, as the problem is due to lack of missing network administration capability. not relevant to switch source code but the implementation specific. If anyone come across same error; make sure you have --cap-add=NET_ADMIN when running docker container. Additionally, run veth_setup.sh prior to starting "./run_bm.sh"