drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h- Extension
.h- Size
- 24199 bytes
- Lines
- 862
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/dcbnl.hlinux/netdevice.hlinux/if_vlan.hlinux/fsl/mc.hlinux/net_tstamp.hnet/devlink.hnet/xdp.hsoc/fsl/dpaa2-io.hsoc/fsl/dpaa2-fd.hdpni.hdpni-cmd.hdpaa2-eth-trace.hdpaa2-eth-debugfs.hdpaa2-mac.h
Detected Declarations
struct dpaa2_eth_swastruct dpaa2_fasstruct dpaa2_faprstruct dpaa2_faeadstruct ptp_tstampstruct dpaa2_eth_drv_statsstruct dpaa2_eth_fq_statsstruct dpaa2_eth_ch_statsstruct dpaa2_eth_privstruct dpaa2_eth_channelstruct dpaa2_eth_fqstruct dpaa2_eth_xdp_fdsstruct dpaa2_eth_fqstruct dpaa2_eth_ch_xdpstruct dpaa2_eth_bpstruct dpaa2_eth_channelstruct dpaa2_eth_dist_fieldsstruct dpaa2_eth_cls_rulestruct dpaa2_eth_sgt_cachestruct dpaa2_eth_trap_itemstruct dpaa2_eth_trap_datastruct dpaa2_eth_fdsstruct dpaa2_eth_privstruct dpaa2_eth_devlink_privenum dpaa2_eth_swa_typeenum dpaa2_eth_fq_typeenum dpaa2_eth_rx_distfunction ns_to_ptp_tstampfunction dpaa2_eth_cmp_dpni_verfunction dpaa2_eth_tx_pause_enabledfunction dpaa2_eth_rx_pause_enabledfunction dpaa2_eth_needed_headroomfunction dpaa2_eth_rx_head_roomfunction dpaa2_eth_is_type_phyfunction dpaa2_eth_has_mac
Annotated Snippet
struct dpaa2_eth_swa {
enum dpaa2_eth_swa_type type;
union {
struct {
struct sk_buff *skb;
int sgt_size;
} single;
struct {
struct sk_buff *skb;
struct scatterlist *scl;
int num_sg;
int sgt_size;
} sg;
struct {
int dma_size;
struct xdp_frame *xdpf;
} xdp;
struct {
struct xdp_buff *xdp_buff;
int sgt_size;
} xsk;
struct {
struct sk_buff *skb;
int num_sg;
int sgt_size;
int is_last_fd;
} tso;
};
};
/* Annotation valid bits in FD FRC */
#define DPAA2_FD_FRC_FASV 0x8000
#define DPAA2_FD_FRC_FAEADV 0x4000
#define DPAA2_FD_FRC_FAPRV 0x2000
#define DPAA2_FD_FRC_FAIADV 0x1000
#define DPAA2_FD_FRC_FASWOV 0x0800
#define DPAA2_FD_FRC_FAICFDV 0x0400
/* Error bits in FD CTRL */
#define DPAA2_FD_RX_ERR_MASK (FD_CTRL_SBE | FD_CTRL_FAERR)
#define DPAA2_FD_TX_ERR_MASK (FD_CTRL_UFD | \
FD_CTRL_SBE | \
FD_CTRL_FSE | \
FD_CTRL_FAERR)
/* Annotation bits in FD CTRL */
#define DPAA2_FD_CTRL_ASAL 0x00020000 /* ASAL = 128B */
/* Frame annotation status */
struct dpaa2_fas {
u8 reserved;
u8 ppid;
__le16 ifpid;
__le32 status;
};
/* Frame annotation status word is located in the first 8 bytes
* of the buffer's hardware annoatation area
*/
#define DPAA2_FAS_OFFSET 0
#define DPAA2_FAS_SIZE (sizeof(struct dpaa2_fas))
/* Timestamp is located in the next 8 bytes of the buffer's
* hardware annotation area
*/
#define DPAA2_TS_OFFSET 0x8
/* Frame annotation parse results */
struct dpaa2_fapr {
/* 64-bit word 1 */
__le32 faf_lo;
__le16 faf_ext;
__le16 nxt_hdr;
/* 64-bit word 2 */
__le64 faf_hi;
/* 64-bit word 3 */
u8 last_ethertype_offset;
u8 vlan_tci_offset_n;
u8 vlan_tci_offset_1;
u8 llc_snap_offset;
u8 eth_offset;
u8 ip1_pid_offset;
u8 shim_offset_2;
u8 shim_offset_1;
/* 64-bit word 4 */
u8 l5_offset;
u8 l4_offset;
u8 gre_offset;
u8 l3_offset_n;
u8 l3_offset_1;
Annotation
- Immediate include surface: `linux/dcbnl.h`, `linux/netdevice.h`, `linux/if_vlan.h`, `linux/fsl/mc.h`, `linux/net_tstamp.h`, `net/devlink.h`, `net/xdp.h`, `soc/fsl/dpaa2-io.h`.
- Detected declarations: `struct dpaa2_eth_swa`, `struct dpaa2_fas`, `struct dpaa2_fapr`, `struct dpaa2_faead`, `struct ptp_tstamp`, `struct dpaa2_eth_drv_stats`, `struct dpaa2_eth_fq_stats`, `struct dpaa2_eth_ch_stats`, `struct dpaa2_eth_priv`, `struct dpaa2_eth_channel`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.