Closed 10212 closed 3 months ago
But when I tried to change some bmv2 configuration conditions, I found that I couldn't find it , even though I had installed it through apt
@10212 Could you describe what were the configuration conditions and how did you change them?
I installed bmv2 with apt and compiled simple_switch with p4c, and simple_switch is still available.
I can also use apt show to view bmv2 information like this:
c410@410:~$ apt show p4lang-bmv2
Package: p4lang-bmv2
Version: 1.15.0-3
Priority: optional
Section: net
Maintainer: Radostin Stoyanov <radostin@stoyanov.io>
Installed-Size: 63.3 MB
I also searched for places where apt downloads might exist, such as usr/local and several other locations, still not found.
As for how to configure it, I first created a new test.p4 file and compiled it through p4c:
p4c -b bmv2 test.p4 -o test.bmv2
sudo simple_switch --interface 0@veth0 --interface 1@veth2 --interface 2@veth4 test.bmv2/test.json &
The main configuration is shown above.
although simpleswitch is currently available,I can't find bmv2 folder...
@10212 Thank you for this information. Could you run the following commands and show the output of the last two?
sudo apt-get update
sudo apt-get purge -y p4lang-bmv2
sudo apt-get autoremove
sudo apt-get install -y p4lang-bmv2
which simple_switch
simple_switch --version
Although I did not reinstall the bmv2, the output is as follows:
c410@410:~/p4$ which simple_switch
/usr/local/bin/simple_switch
c410@410:~/p4$ simple_switch --version
1.15.0-e9fa7dc6
Following your prompts to reinstall it, it shows the same information in usr/local/bin 'ls' showbm_CLI bm_p4dbg p4c p4c-bm2-ss p4c-ebpf p4c-ubpf pi_convert_p4info pi_gen_native_json psa_switch_CLI simple_switch_CLI bm_nanomsg_events p4c-bm2-psa p4c-dpdk p4c-graphs p4test pi_gen_fe_defines psa_switch simple_switch thrift
Does that make it complete? I was trying to find out if the bmv2 folder was wrong.
@10212 It looks like you have two versions of BMv2 installed on your system.
One is installed from source in /usr/local/
and the other is installed from the p4lang-bmv2 package in /usr
.
Could you run the following commands to confirm this?
/usr/local/bin/simple_switch --version
/usr/bin/simple_switch --version
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment, or this will be closed in 180 days
In the Ubuntu20.04,I install bmv2 by below cmd:
. /etc/os-release echo "deb http://download.opensuse.org/repositories/home:/p4lang/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/home:p4lang.list curl -fsSL "https://download.opensuse.org/repositories/home:p4lang/xUbuntu_${VERSION_ID}/Release.key" | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_p4lang.gpg > /dev/null sudo apt update sudo apt install p4lang-bmv2
And I've successfully run simple switch with p4c. But when I tried to change some bmv2 configuration conditions, I found that I couldn't find it , even though I had installed it through apt