| // Logic ports as defined in the simple_switch target |
| #define DROP_PORT 511 |
| |
| #define ETHERTYPE_IPV4 0x0800 |
| #define IP_PROTOCOLS_TCP 6 |
| #define IP_PROTOCOLS_UDP 17 |
| |
| // Build for Tofino by default. |
| |
| #ifdef DO_BMV2_BUILD |
| #define __BMV2_BUILD__ 1 |
| #else |
| #define __TOFINO_BUILD__ 1 |
| #endif |
| |
| #ifdef __TOFINO_BUILD__ |
| #define EGR_PORT_FIELD ig_intr_md_for_tm.ucast_egress_port |
| #define IGR_PORT_FIELD ig_intr_md.ingress_port |
| #define MAX_PORTS 512 |
| #else |
| #define EGR_PORT_FIELD standard_metadata.egress_spec |
| #define IGR_PORT_FIELD standard_metadata.ingress_port |
| #define MAX_PORTS 254 |
| #endif |