TNSM_Latency_Prediction / code / parser / 1_ethernet_base_v1 / switch.p4
switch.p4
Raw
/* -*- P4_16 -*- */

/*
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ .@@@@@@/@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  @#              @ @@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@                                              @@@@@@
@@@@@@@@@@@@@@@@@@@@                                         @@       @@ @@@@@@@
@@@@@@@@@@@@@@@@                                                            @@@@
@@@@@@@@@@@@@                                                      @@@@@@@@  @@@
@@@@@@@@@@%        -Eder Ollora Zaballa:                        @@@@@@@@@@   @@@
@@@@@@@            eoza@fotonik.dtu.dk  (DTU)                        @    @@@@@@
@@@@@              -David Franco:                            @@@@@@@@@@@@@@@@@@@
@@@@@@@            david.franco@ehu.eus (EHU)              @@@@@@@@@@@@@@@@@@@@@
@@@@@@@                                                  @@@@@@@@@@@@@@@@@@@@@@@
@@@@@@,                                          .      @@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@                                          @     @@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@                 *@@@@@                  @    .@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@                @     @@@              @    @@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@              @     @@@@            @    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@           @     @@@@@@         @@   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
*/

#include <core.p4>
#include <tna.p4>


/*************************************************************************
 ************* C O N S T A N T S    A N D   T Y P E S  *******************
**************************************************************************/
#include "typedefs.p4"
#include "constants.p4"

/*************************************************************************
 ***********************  H E A D E R S  *********************************
 *************************************************************************/

#include "headers.p4"

/*************************************************************************
 **************  I N G R E S S   P R O C E S S I N G   *******************
 *************************************************************************/

    /***********************  H E A D E R S  ************************/

    // Declared at previous file

    /******  G L O B A L   I N G R E S S   M E T A D A T A  *********/

    #include "user_metadata.p4"

    /***********************  P A R S E R  **************************/

    #include "ingress_parser.p4"

    /***************** M A T C H - A C T I O N  *********************/

    #include "ingress.p4"

    /*********************  D E P A R S E R  ************************/

    #include "ingress_deparser.p4"


/*************************************************************************
 ****************  E G R E S S   P R O C E S S I N G   *******************
 *************************************************************************/

    /***********************  H E A D E R S  ************************/

    // from headers.p4

    /********  G L O B A L   E G R E S S   M E T A D A T A  *********/

    // from user_metadata.p4

    /***********************  P A R S E R  **************************/

    #include "egress_parser.p4"

    /***************** M A T C H - A C T I O N  *********************/

    #include "egress.p4"

    /*********************  D E P A R S E R  ************************/

    #include "egress_deparser.p4"



/************ F I N A L   P A C K A G E ******************************/
Pipeline(
    IngressParser(),
    Ingress(),
    IngressDeparser(),
    EgressParser(),
    Egress(),
    EgressDeparser()
) pipe;

Switch(pipe) main;