The tutorials in this section focus on compiling and running Lucid applications on the Tofino. Compiling and running any P4 program on the tofino is a somewhat complicated process, and so Lucid provides scripts and makefiles to simplify it. These scripts, however, are not as well-tested as the interpreter or the Lucid compiler itself, so you may run into issues. If you do, please make sure to try running them with the recommended versions of the bf-sde. Then, if you still have issues, please reach out to us via github or email.
Initial setup
This tutorial assumes that you are using the Lucid compiler built from source, that you have access to the tofino’s bf-sde, and that you have basic familiarity with the bf-sde.
Before continuing, make sure that you have:
-
bf-sde version 9.13.0 installed with
bfrtenabled. The exact yaml file used to test the lucid compiler is included in this directory,bfsde-lucid.yaml. For the current version of lucid, it is likely that the only option you really need is thedrivers: bfrt: true. However we have not tested that hypothesis yet. It is fine to include other options in the yaml file as needed by your other projects. -
$SDE set to the root of the bf-sde directory, and $SDE_INSTALL set to the install directory. This is usually done by running
. ./set_sde.bashin the bf-sde directory, with theset_sde.bashscript being provided by Intel. -
hugepages configured appropriately to run the Tofino model.