Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ */
0002 
0003 #ifndef __LAN966X_IFH_H__
0004 #define __LAN966X_IFH_H__
0005 
0006 /* Fields with description (*) should just be cleared upon injection
0007  * IFH is transmitted MSByte first (Highest bit pos sent as MSB of first byte)
0008  */
0009 
0010 #define IFH_LEN                      7
0011 
0012 /* Timestamp for frame */
0013 #define IFH_POS_TIMESTAMP            192
0014 
0015 /* Bypass analyzer with a prefilled IFH */
0016 #define IFH_POS_BYPASS               191
0017 
0018 /* Masqueraded injection with masq_port defining logical source port */
0019 #define IFH_POS_MASQ                 190
0020 
0021 /* Masqueraded port number for injection */
0022 #define IFH_POS_MASQ_PORT            186
0023 
0024 /* Frame length (*) */
0025 #define IFH_POS_LEN                  178
0026 
0027 /* Cell filling mode. Full(0),Etype(1), LlctOpt(2), Llct(3) */
0028 #define IFH_POS_WRDMODE              176
0029 
0030 /* Frame has 16 bits rtag removed compared to line data */
0031 #define IFH_POS_RTAG48               175
0032 
0033 /* Frame has a redundancy tag */
0034 #define IFH_POS_HAS_RED_TAG          174
0035 
0036 /* Frame has been cut through forwarded (*) */
0037 #define IFH_POS_CUTTHRU              173
0038 
0039 /* Rewriter command */
0040 #define IFH_POS_REW_CMD              163
0041 
0042 /* Enable OAM-related rewriting. PDU_TYPE encodes OAM type. */
0043 #define IFH_POS_REW_OAM              162
0044 
0045 /* PDU type. Encoding: (0-NONE, 1-Y1731_CCM, 2-MRP_TST, 3-MRP_ITST, 4-DLR_BCN,
0046  * 5-DLR_ADV, 6-RTE_NULL_INJ, 7-IPV4, 8-IPV6, 9-Y1731_NON_CCM).
0047  */
0048 #define IFH_POS_PDU_TYPE             158
0049 
0050 /* Update FCS before transmission */
0051 #define IFH_POS_FCS_UPD              157
0052 
0053 /* Classified DSCP value of frame */
0054 #define IFH_POS_DSCP                 151
0055 
0056 /* Yellow indication */
0057 #define IFH_POS_DP                   150
0058 
0059 /* Process in RTE/inbound */
0060 #define IFH_POS_RTE_INB_UPDATE       149
0061 
0062 /* Number of tags to pop from frame */
0063 #define IFH_POS_POP_CNT              147
0064 
0065 /* Number of tags in front of the ethertype */
0066 #define IFH_POS_ETYPE_OFS            145
0067 
0068 /* Logical source port of frame (*) */
0069 #define IFH_POS_SRCPORT              141
0070 
0071 /* Sequence number in redundancy tag */
0072 #define IFH_POS_SEQ_NUM              120
0073 
0074 /* Stagd flag and classified TCI of frame (PCP/DEI/VID) */
0075 #define IFH_POS_TCI                  103
0076 
0077 /* Classified internal priority for queuing */
0078 #define IFH_POS_QOS_CLASS            100
0079 
0080 /* Bit mask with eight cpu copy classses */
0081 #define IFH_POS_CPUQ                 92
0082 
0083 /* Relearn + learn flags (*) */
0084 #define IFH_POS_LEARN_FLAGS          90
0085 
0086 /* SFLOW identifier for frame (0-8: Tx port, 9: Rx sampling, 15: No sampling) */
0087 #define IFH_POS_SFLOW_ID             86
0088 
0089 /* Set if an ACL/S2 rule was hit (*).
0090  * Super priority: acl_hit=0 and acl_hit(4)=1.
0091  */
0092 #define IFH_POS_ACL_HIT              85
0093 
0094 /* S2 rule index hit (*) */
0095 #define IFH_POS_ACL_IDX              79
0096 
0097 /* ISDX as classified by S1 */
0098 #define IFH_POS_ISDX                 71
0099 
0100 /* Destination ports for frame */
0101 #define IFH_POS_DSTS                 62
0102 
0103 /* Storm policer to be applied: None/Uni/Multi/Broad (*) */
0104 #define IFH_POS_FLOOD                60
0105 
0106 /* Redundancy tag operation */
0107 #define IFH_POS_SEQ_OP               58
0108 
0109 /* Classified internal priority for resourcemgt, tagging etc */
0110 #define IFH_POS_IPV                  55
0111 
0112 /* Frame is for AFI use */
0113 #define IFH_POS_AFI                  54
0114 
0115 /* Internal aging value (*) */
0116 #define IFH_POS_AGED                 52
0117 
0118 /* RTP Identifier */
0119 #define IFH_POS_RTP_ID               42
0120 
0121 /* RTP MRPD flow */
0122 #define IFH_POS_RTP_SUBID            41
0123 
0124 /* Profinet DataStatus or opcua GroupVersion MSB */
0125 #define IFH_POS_PN_DATA_STATUS       33
0126 
0127 /* Profinet transfer status (1 iff the status is 0) */
0128 #define IFH_POS_PN_TRANSF_STATUS_ZERO 32
0129 
0130 /* Profinet cycle counter or opcua NetworkMessageNumber */
0131 #define IFH_POS_PN_CC                16
0132 
0133 #define IFH_WID_TIMESTAMP            32
0134 #define IFH_WID_BYPASS               1
0135 #define IFH_WID_MASQ                 1
0136 #define IFH_WID_MASQ_PORT            4
0137 #define IFH_WID_LEN                  14
0138 #define IFH_WID_WRDMODE              2
0139 #define IFH_WID_RTAG48               1
0140 #define IFH_WID_HAS_RED_TAG          1
0141 #define IFH_WID_CUTTHRU              1
0142 #define IFH_WID_REW_CMD              10
0143 #define IFH_WID_REW_OAM              1
0144 #define IFH_WID_PDU_TYPE             4
0145 #define IFH_WID_FCS_UPD              1
0146 #define IFH_WID_DSCP                 6
0147 #define IFH_WID_DP                   1
0148 #define IFH_WID_RTE_INB_UPDATE       1
0149 #define IFH_WID_POP_CNT              2
0150 #define IFH_WID_ETYPE_OFS            2
0151 #define IFH_WID_SRCPORT              4
0152 #define IFH_WID_SEQ_NUM              16
0153 #define IFH_WID_TCI                  17
0154 #define IFH_WID_QOS_CLASS            3
0155 #define IFH_WID_CPUQ                 8
0156 #define IFH_WID_LEARN_FLAGS          2
0157 #define IFH_WID_SFLOW_ID             4
0158 #define IFH_WID_ACL_HIT              1
0159 #define IFH_WID_ACL_IDX              6
0160 #define IFH_WID_ISDX                 8
0161 #define IFH_WID_DSTS                 9
0162 #define IFH_WID_FLOOD                2
0163 #define IFH_WID_SEQ_OP               2
0164 #define IFH_WID_IPV                  3
0165 #define IFH_WID_AFI                  1
0166 #define IFH_WID_AGED                 2
0167 #define IFH_WID_RTP_ID               10
0168 #define IFH_WID_RTP_SUBID            1
0169 #define IFH_WID_PN_DATA_STATUS       8
0170 #define IFH_WID_PN_TRANSF_STATUS_ZERO 1
0171 #define IFH_WID_PN_CC                16
0172 
0173 #endif /* __LAN966X_IFH_H__ */