drivers/net/dsa/mxl862xx/mxl862xx.h
Source file repositories/reference/linux-study-clean/drivers/net/dsa/mxl862xx/mxl862xx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/dsa/mxl862xx/mxl862xx.h- Extension
.h- Size
- 13746 bytes
- Lines
- 344
- 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
asm/byteorder.hlinux/mdio.hlinux/workqueue.hnet/dsa.h
Detected Declarations
struct mxl862xx_privstruct mxl862xx_vf_vidstruct mxl862xx_vf_blockstruct mxl862xx_evlan_blockstruct mxl862xx_port_statsstruct mxl862xx_portstruct mxl862xx_pcsstruct mxl862xx_fw_versionstruct mxl862xx_privfunction mxl862xx_fw_portmap_set_bitfunction mxl862xx_fw_portmap_clear_bitfunction mxl862xx_fw_portmap_is_empty
Annotated Snippet
struct mxl862xx_vf_vid {
struct list_head list;
u16 vid;
u16 index;
bool untagged;
};
/**
* struct mxl862xx_vf_block - Per-port VLAN Filter block
* @allocated: Whether the HW block has been allocated via VLANFILTER_ALLOC
* @block_id: HW VLAN Filter block ID from VLANFILTER_ALLOC
* @block_size: Total entries allocated in this block
* @active_count: Number of ALLOW entries at indices [0, active_count).
* The bridge port config sends max(active_count, 1) as
* block_size to narrow the HW scan window.
* discard_unmatched_tagged handles frames outside this range.
* @vids: List of &mxl862xx_vf_vid entries programmed in this block
*/
struct mxl862xx_vf_block {
bool allocated;
u16 block_id;
u16 block_size;
u16 active_count;
struct list_head vids;
};
/**
* struct mxl862xx_evlan_block - Per-port per-direction extended VLAN block
* @allocated: Whether the HW block has been allocated via EXTENDEDVLAN_ALLOC.
* Guards alloc/free idempotency--the block_id is only valid
* while allocated is true.
* @in_use: Whether the EVLAN engine should be enabled for this block
* on the bridge port (sent as the enable flag in
* set_bridge_port). Can be false while allocated is still
* true -- e.g. when all egress VIDs are removed (idx == 0 in
* evlan_program_egress) the block stays allocated for
* potential reuse, but the engine is disabled so an empty
* rule set does not discard all traffic.
* @block_id: HW block ID from EXTENDEDVLAN_ALLOC
* @block_size: Total entries allocated
* @n_active: Number of HW entries currently written. The bridge port
* config sends this as the egress scan window, so entries
* beyond n_active are never scanned. Always equals
* block_size for ingress blocks (fixed catchall rules).
*/
struct mxl862xx_evlan_block {
bool allocated;
bool in_use;
u16 block_id;
u16 block_size;
u16 n_active;
};
/**
* struct mxl862xx_port_stats - 64-bit accumulated hardware port statistics
* @rx_packets: total received packets
* @tx_packets: total transmitted packets
* @rx_bytes: total received bytes
* @tx_bytes: total transmitted bytes
* @rx_errors: total receive errors
* @tx_errors: total transmit errors
* @rx_dropped: total received packets dropped
* @tx_dropped: total transmitted packets dropped
* @multicast: total received multicast packets
* @collisions: total transmit collisions
* @rx_length_errors: received length errors (undersize + oversize)
* @rx_crc_errors: received FCS errors
* @rx_frame_errors: received alignment errors
* @prev_rx_good_pkts: previous snapshot of rx good packet counter
* @prev_tx_good_pkts: previous snapshot of tx good packet counter
* @prev_rx_good_bytes: previous snapshot of rx good byte counter
* @prev_tx_good_bytes: previous snapshot of tx good byte counter
* @prev_rx_fcserror_pkts: previous snapshot of rx FCS error counter
* @prev_rx_under_size_error_pkts: previous snapshot of rx undersize
* error counter
* @prev_rx_oversize_error_pkts: previous snapshot of rx oversize
* error counter
* @prev_rx_align_error_pkts: previous snapshot of rx alignment
* error counter
* @prev_tx_dropped_pkts: previous snapshot of tx dropped counter
* @prev_rx_dropped_pkts: previous snapshot of rx dropped counter
* @prev_rx_evlan_discard_pkts: previous snapshot of extended VLAN
* discard counter
* @prev_mtu_exceed_discard_pkts: previous snapshot of MTU exceed
* discard counter
* @prev_tx_acm_dropped_pkts: previous snapshot of tx ACM dropped
* counter
* @prev_rx_multicast_pkts: previous snapshot of rx multicast counter
* @prev_tx_coll_count: previous snapshot of tx collision counter
*
Annotation
- Immediate include surface: `asm/byteorder.h`, `linux/mdio.h`, `linux/workqueue.h`, `net/dsa.h`.
- Detected declarations: `struct mxl862xx_priv`, `struct mxl862xx_vf_vid`, `struct mxl862xx_vf_block`, `struct mxl862xx_evlan_block`, `struct mxl862xx_port_stats`, `struct mxl862xx_port`, `struct mxl862xx_pcs`, `struct mxl862xx_fw_version`, `struct mxl862xx_priv`, `function mxl862xx_fw_portmap_set_bit`.
- 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.