blob: b47a74a3549f4e7d634cc4f8649bcc3a3754aa1c [file] [log] [blame]
// Logic ports as defined in the simple_switch target
#define MAX_PORTS 254
#define CPU_PORT 255
#define DROP_PORT 511
#define NULL_ETH_TYPE 0x00
#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
#else
#define EGR_PORT_FIELD standard_metadata.egress_spec
#define IGR_PORT_FIELD standard_metadata.ingress_port
#endif