Skip to content

nyu-systems/flay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

49cd560 · Dec 22, 2024
Aug 22, 2024
Jun 11, 2024
May 8, 2024
Nov 21, 2024
Sep 27, 2024
Dec 22, 2024
Aug 15, 2024
Sep 27, 2024
Aug 22, 2024
Aug 19, 2024
Apr 11, 2023
Apr 17, 2023
Sep 27, 2024
Apr 4, 2024
Sep 20, 2024
Aug 15, 2024
Sep 27, 2024
Aug 15, 2024
Aug 15, 2024
Aug 15, 2024

Repository files navigation

Flay

Flay is a control-plane dead code elimination tool for P4 programs. Flay takes a P4 program and control-plane configuration and removes all the code that can not be executed with this particular configuration. Flay also removes code that is dead across programmable blocks. For example, code that is only executed if a header is valid, but that header is never set valid in the parser block.

Building Flay

Flay is a P4Tools module, which itself is part of P4C. To be able to use Flay, you first need to build P4C. Instructions can be found here.

After building P4C, you need link Flay as a P4Tools module. The CI scripts describe a similar workflow. You will need to symlink Flay into the modules directory, rerun CMake in your P4C build directory, then rebuild.

ln -sf flay p4c/backends/p4tools/modules/
cd p4c/build
cmake ..
make