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

/* SPDX-License-Identifier: GPL-2.0+ */

#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
#define IFH_LEN_BYTES

/* Timestamp for frame */
#define IFH_POS_TIMESTAMP

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

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

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

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

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

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

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

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

/* Rewriter command */
#define IFH_POS_REW_CMD

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

/* 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

/* Update FCS before transmission */
#define IFH_POS_FCS_UPD

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

/* Yellow indication */
#define IFH_POS_DP

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

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

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

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

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

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

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

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

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

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

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

/* S2 rule index hit (*) */
#define IFH_POS_ACL_IDX

/* ISDX as classified by S1 */
#define IFH_POS_ISDX

/* Destination ports for frame */
#define IFH_POS_DSTS

/* Storm policer to be applied: None/Uni/Multi/Broad (*) */
#define IFH_POS_FLOOD

/* Redundancy tag operation */
#define IFH_POS_SEQ_OP

/* Classified internal priority for resourcemgt, tagging etc */
#define IFH_POS_IPV

/* Frame is for AFI use */
#define IFH_POS_AFI

/* Internal aging value (*) */
#define IFH_POS_AGED

/* RTP Identifier */
#define IFH_POS_RTP_ID

/* RTP MRPD flow */
#define IFH_POS_RTP_SUBID

/* Profinet DataStatus or opcua GroupVersion MSB */
#define IFH_POS_PN_DATA_STATUS

/* Profinet transfer status (1 iff the status is 0) */
#define IFH_POS_PN_TRANSF_STATUS_ZERO

/* Profinet cycle counter or opcua NetworkMessageNumber */
#define IFH_POS_PN_CC

#define IFH_WID_TIMESTAMP
#define IFH_WID_BYPASS
#define IFH_WID_MASQ
#define IFH_WID_MASQ_PORT
#define IFH_WID_LEN
#define IFH_WID_WRDMODE
#define IFH_WID_RTAG48
#define IFH_WID_HAS_RED_TAG
#define IFH_WID_CUTTHRU
#define IFH_WID_REW_CMD
#define IFH_WID_REW_OAM
#define IFH_WID_PDU_TYPE
#define IFH_WID_FCS_UPD
#define IFH_WID_DSCP
#define IFH_WID_DP
#define IFH_WID_RTE_INB_UPDATE
#define IFH_WID_POP_CNT
#define IFH_WID_ETYPE_OFS
#define IFH_WID_SRCPORT
#define IFH_WID_SEQ_NUM
#define IFH_WID_TCI
#define IFH_WID_QOS_CLASS
#define IFH_WID_CPUQ
#define IFH_WID_LEARN_FLAGS
#define IFH_WID_SFLOW_ID
#define IFH_WID_ACL_HIT
#define IFH_WID_ACL_IDX
#define IFH_WID_ISDX
#define IFH_WID_DSTS
#define IFH_WID_FLOOD
#define IFH_WID_SEQ_OP
#define IFH_WID_IPV
#define IFH_WID_AFI
#define IFH_WID_AGED
#define IFH_WID_RTP_ID
#define IFH_WID_RTP_SUBID
#define IFH_WID_PN_DATA_STATUS
#define IFH_WID_PN_TRANSF_STATUS_ZERO
#define IFH_WID_PN_CC

#endif /* __LAN966X_IFH_H__ */