1 #ifndef BCM_PHS_DEFINES_H
2 #define BCM_PHS_DEFINES_H
4 #define PHS_INVALID_TABLE_INDEX 0xffffffff
5 #define PHS_MEM_TAG "_SHP"
8 #define STATUS_PHS_COMPRESSED 0xa1
9 #define STATUS_PHS_NOCOMPRESSION 0xa2
14 #define SIZE_MULTIPLE_32 4
15 #define UNCOMPRESSED_PACKET 0
18 #define NO_CLASSIFIER_MATCH 0
19 #define SEND_PACKET_UNCOMPRESSED 0
20 #define PHSI_IS_ZERO 0
23 #define PHS_BUFFER_SIZE 1532
24 #define MAX_PHSRULE_PER_SF 20
25 #define MAX_SERVICEFLOWS 17
27 /* PHS Error Defines */
29 #define ERR_PHS_INVALID_DEVICE_EXETENSION 0x800
30 #define ERR_PHS_INVALID_PHS_RULE 0x801
31 #define ERR_PHS_RULE_ALREADY_EXISTS 0x802
32 #define ERR_SF_MATCH_FAIL 0x803
33 #define ERR_INVALID_CLASSIFIERTABLE_FOR_SF 0x804
34 #define ERR_SFTABLE_FULL 0x805
35 #define ERR_CLSASSIFIER_TABLE_FULL 0x806
36 #define ERR_PHSRULE_MEMALLOC_FAIL 0x807
37 #define ERR_CLSID_MATCH_FAIL 0x808
38 #define ERR_PHSRULE_MATCH_FAIL 0x809
43 u8 u8PHSF
[MAX_PHS_LENGTHS
];
45 u8 u8PHSM
[MAX_PHS_LENGTHS
];
49 u8 bUnclassifiedPHSRule
;
51 long PHSModifiedBytes
;
52 unsigned long PHSModifiedNumPackets
;
53 unsigned long PHSErrorNumPackets
;
56 enum bcm_phs_classifier_context
{
57 eActiveClassifierRuleContext
,
58 eOldClassifierRuleContext
61 struct bcm_phs_classifier_entry
{
63 u16 uiClassifierRuleId
;
65 struct bcm_phs_rule
*pstPhsRule
;
66 u8 bUnclassifiedPHSRule
;
69 struct bcm_phs_classifier_table
{
70 u16 uiTotalClassifiers
;
71 struct bcm_phs_classifier_entry stActivePhsRulesList
[MAX_PHSRULE_PER_SF
];
72 struct bcm_phs_classifier_entry stOldPhsRulesList
[MAX_PHSRULE_PER_SF
];
73 u16 uiOldestPhsRuleIndex
;
76 struct bcm_phs_entry
{
79 struct bcm_phs_classifier_table
*pstClassifierTable
;
82 struct bcm_phs_table
{
83 u16 uiTotalServiceFlows
;
84 struct bcm_phs_entry stSFList
[MAX_SERVICEFLOWS
];
87 struct bcm_phs_extension
{
88 /* PHS Specific data */
89 struct bcm_phs_table
*pstServiceFlowPhsRulesTable
;
90 void *CompressedTxBuffer
;
91 void *UnCompressedRxBuffer
;