p4lang / tutorials

P4 language tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The "behavioral-model" folder can not be found in the P4 tutorial VM

castilhorosa opened this issue · comments

Hi,

I would like to increase the throughput of my P4 program and came across with the possibility to recompile the bmv2 using:

./configure 'CXXFLAGS=-g -O3' 'CFLAGS=-g -O3' --disable-logging-macros --disable-elogger

However, I can not find the behavioral-model folder anywhere in the P4 tutorial vagrant image, even when using the vagrant user. According with what @jafingerhut commented here #401 (comment), the vagrant account is "where the source code of P4 open source tools was downloaded, compiled, and installed when the VM was created". How can I find such folders? Do I need to clone the bmv2 manually and type the build/rebuild commands? I'm afraid to mess up my experimentation environment..

Which vagrant image did you install?

Note that among the VM images I publish, the ones with "release" in their names are created by installing precompiled binary Ubuntu packages for almost all of the P4 development tools, including behavioral-model.

The ones with "development" in their names are created by cloning the source code and building it, and I leave the source code used in the file system of the VM image, in the home directory of the vagrant user account.

Thanks @jafingerhut. I have installed the vagrant image with the name "P4 Tutorial Release 2023-08-23". In fact, the source codes are not available in the home directory. I was supposed to install a "development" version as you mentioned. For now, what are the options I have to compile bmv2 with the aforementioned options besides of having to install a new development vagrant image and migrate my code?

The approach you mention should work -- I have done it before.

I have not tested any other options than the one you suggest, so have no idea whether other approaches would work.

Thanks @jafingerhut . It worked.