drivers/net/ethernet/microchip/lan966x/lan966x_ifh.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/microchip/lan966x/lan966x_ifh.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/microchip/lan966x/lan966x_ifh.h
Extension
.h
Size
5330 bytes
Lines
175
Domain
Driver Families
Bucket
drivers/net
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef __LAN966X_IFH_H__
#define __LAN966X_IFH_H__

/* Fields with description (*) should just be cleared upon injection
 * IFH is transmitted MSByte first (Highest bit pos sent as MSB of first byte)
 */

#define IFH_LEN                      7
#define IFH_LEN_BYTES                (IFH_LEN * sizeof(u32))

/* Timestamp for frame */
#define IFH_POS_TIMESTAMP            192

/* Bypass analyzer with a prefilled IFH */
#define IFH_POS_BYPASS               191

/* Masqueraded injection with masq_port defining logical source port */
#define IFH_POS_MASQ                 190

/* Masqueraded port number for injection */
#define IFH_POS_MASQ_PORT            186

/* Frame length (*) */
#define IFH_POS_LEN                  178

/* Cell filling mode. Full(0),Etype(1), LlctOpt(2), Llct(3) */
#define IFH_POS_WRDMODE              176

/* Frame has 16 bits rtag removed compared to line data */
#define IFH_POS_RTAG48               175

/* Frame has a redundancy tag */
#define IFH_POS_HAS_RED_TAG          174

/* Frame has been cut through forwarded (*) */
#define IFH_POS_CUTTHRU              173

/* Rewriter command */
#define IFH_POS_REW_CMD              163

/* Enable OAM-related rewriting. PDU_TYPE encodes OAM type. */
#define IFH_POS_REW_OAM              162

/* PDU type. Encoding: (0-NONE, 1-Y1731_CCM, 2-MRP_TST, 3-MRP_ITST, 4-DLR_BCN,
 * 5-DLR_ADV, 6-RTE_NULL_INJ, 7-IPV4, 8-IPV6, 9-Y1731_NON_CCM).
 */
#define IFH_POS_PDU_TYPE             158

/* Update FCS before transmission */
#define IFH_POS_FCS_UPD              157

/* Classified DSCP value of frame */
#define IFH_POS_DSCP                 151

/* Yellow indication */
#define IFH_POS_DP                   150

/* Process in RTE/inbound */
#define IFH_POS_RTE_INB_UPDATE       149

/* Number of tags to pop from frame */
#define IFH_POS_POP_CNT              147

/* Number of tags in front of the ethertype */
#define IFH_POS_ETYPE_OFS            145

/* Logical source port of frame (*) */
#define IFH_POS_SRCPORT              141

/* Sequence number in redundancy tag */
#define IFH_POS_SEQ_NUM              120

/* Stagd flag and classified TCI of frame (PCP/DEI/VID) */
#define IFH_POS_TCI                  103

/* Classified internal priority for queuing */
#define IFH_POS_QOS_CLASS            100

/* Bit mask with eight cpu copy classes */
#define IFH_POS_CPUQ                 92

/* Relearn + learn flags (*) */
#define IFH_POS_LEARN_FLAGS          90

/* SFLOW identifier for frame (0-8: Tx port, 9: Rx sampling, 15: No sampling) */
#define IFH_POS_SFLOW_ID             86

/* Set if an ACL/S2 rule was hit (*).
 * Super priority: acl_hit=0 and acl_hit(4)=1.
 */

Annotation

Implementation Notes