Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Contributing Intel Tofino compiler backend to p4c (#4964)
* Add licenses and top level scripts Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files in top level directory Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/arch for handling tna/t2na/v1model architectures Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/arch/psa for handling psa to tna translation Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/arch/tna Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/common Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/pragma Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/control-plane for bfrt support Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/driver for compiler driver Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/ir for tofino-specific IR Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/lib Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/logging Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/mau Core algorithms to allocate resource in MAU Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/p4include Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde Core algorithms for Parser and Deparser allocation Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/clot clot stands for Checksum-Length-Offset-Tag Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/lowered, common and mirror Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/phv (part 1) Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/phv/analysis (part 2) Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/phv/pragma (part 3) Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/phv/* (part 4) Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/parde/phv/v2 (part 5) V2 algorithm for phv allocation Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-p4c/test/gtest Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/bf-utils for dynamic_hash library Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/compiler-interfaces Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Add files under backends/tofino/scripts for misc scripts Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Changes to other backend to fix compilation error Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Changes to top level CMakeLists.txt to add tofino backend Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * fix compilation issues Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * CI script fixes - fix ci-build.sh - add pyinstaller to requirement.txt - link ${P4C_LIB_DEPS} to bf_gtest_support target - link ${P4C_LIB_DEPS} to tofinobackend target Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Fixes for coding-style issues - clang-format - black format - isort errors - ifdefs name fixes Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * switch ENABLE_TOFINO to OFF by default Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * try 20.04 build Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * add FindZ3.cmake for bf-p4c Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Fix p4c driver issues - remove duplicated bmv2/psa.p4 and dpdk/psa.p4 - remove calling bfas in p4c-driver - disable a few driver tests Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Addressing review comments Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Update licenses to Apache 2.0 Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * Create new test runner for tofino backend Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * reenable driver tests Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> * address review comments Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]> Signed-off-by: Han Wang <[email protected]> --------- Signed-off-by: Han Wang <[email protected]> Co-authored-by: Glen Gibb <[email protected]> Co-authored-by: Prathima Kotikalapudi <[email protected]> Co-authored-by: Han Wang <[email protected]>
- Loading branch information