field.h (1516B)
1 /* 2 * 3 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 4 * 5 * Copyright 2007-2019 Broadcom Inc. All rights reserved. 6 * 7 * File: field.h 8 * Purpose: Common Internal Field Processor data structure definitions for the 9 * BCM library. 10 */ 11 12 #ifndef _BCM_COMMON_FIELD_H 13 #define _BCM_COMMON_FIELD_H 14 15 #include <shared/bsl.h> 16 17 #include <soc/defs.h> 18 #include <bcm/debug.h> 19 20 #ifdef BCM_FIELD_SUPPORT 21 22 #define FP_VERB_CHECK() LOG_CHECK(BSL_LS_BCM_FP | BSL_VERBOSE) 23 24 #ifndef MAX 25 #define MAX(a,b) ((a) > (b) ? (a) : (b)) 26 #endif 27 28 #ifndef MIN 29 #define MIN(a,b) ((a) < (b) ? (a) : (b)) 30 #endif 31 32 /* 33 * Typedef: 34 * _stage_id_t 35 * Purpose: 36 * Holds format info for pipline stage id. 37 */ 38 typedef int _field_stage_id_t; 39 40 /* Pipeline stages for packet processing. */ 41 #define _BCM_FIELD_STAGE_INGRESS (0) 42 #define _BCM_FIELD_STAGE_LOOKUP (1) 43 #define _BCM_FIELD_STAGE_EGRESS (2) 44 #define _BCM_FIELD_STAGE_EXTERNAL (3) 45 #define _BCM_FIELD_STAGE_EXACTMATCH (4) 46 #define _BCM_FIELD_STAGE_PRESEL (_BCM_FIELD_STAGE_INGRESS) 47 #define _BCM_FIELD_STAGE_CLASS (5) 48 #define _BCM_FIELD_STAGE_FLOWTRACKER (6) 49 50 #define _BCM_FIELD_STAGE_STRINGS \ 51 {"Ingress", \ 52 "Lookup", \ 53 "Egress", \ 54 "External", \ 55 "ExactMatch", \ 56 "Class", \ 57 "Flowtracker"} 58 59 #endif /* BCM_FIELD_SUPPORT */ 60 #endif /* _BCM_COMMON_FIELD_H */