drivers/net/ethernet/netronome/nfp/abm/main.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/abm/main.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/abm/main.h- Extension
.h- Size
- 8152 bytes
- Lines
- 274
- 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/bits.hlinux/list.hlinux/radix-tree.hnet/devlink.hnet/pkt_cls.hnet/pkt_sched.h
Detected Declarations
struct nfp_appstruct nfp_netstruct nfp_abmstruct nfp_alink_statsstruct nfp_alink_xstatsstruct nfp_qdiscstruct nfp_abm_linkenum nfp_abm_q_actionenum nfp_qdisc_typefunction nfp_abm_has_priofunction nfp_abm_has_dropfunction nfp_abm_has_mark
Annotated Snippet
struct nfp_abm {
struct nfp_app *app;
unsigned int pf_id;
unsigned int red_support;
unsigned int num_prios;
unsigned int num_bands;
unsigned int action_mask;
u32 *thresholds;
unsigned long *threshold_undef;
u8 *actions;
size_t num_thresholds;
unsigned int prio_map_len;
u8 dscp_mask;
enum devlink_eswitch_mode eswitch_mode;
const struct nfp_rtsym *q_lvls;
const struct nfp_rtsym *qm_stats;
const struct nfp_rtsym *q_stats;
};
/**
* struct nfp_alink_stats - ABM NIC statistics
* @tx_pkts: number of TXed packets
* @tx_bytes: number of TXed bytes
* @backlog_pkts: momentary backlog length (packets)
* @backlog_bytes: momentary backlog length (bytes)
* @overlimits: number of ECN marked TXed packets (accumulative)
* @drops: number of tail-dropped packets (accumulative)
*/
struct nfp_alink_stats {
u64 tx_pkts;
u64 tx_bytes;
u64 backlog_pkts;
u64 backlog_bytes;
u64 overlimits;
u64 drops;
};
/**
* struct nfp_alink_xstats - extended ABM NIC statistics
* @ecn_marked: number of ECN marked TXed packets
* @pdrop: number of hard drops due to queue limit
*/
struct nfp_alink_xstats {
u64 ecn_marked;
u64 pdrop;
};
enum nfp_qdisc_type {
NFP_QDISC_NONE = 0,
NFP_QDISC_MQ,
NFP_QDISC_RED,
NFP_QDISC_GRED,
};
#define NFP_QDISC_UNTRACKED ((struct nfp_qdisc *)1UL)
/**
* struct nfp_qdisc - tracked TC Qdisc
* @netdev: netdev on which Qdisc was created
* @type: Qdisc type
* @handle: handle of this Qdisc
* @parent_handle: handle of the parent (unreliable if Qdisc was grafted)
* @use_cnt: number of attachment points in the hierarchy
* @num_children: current size of the @children array
* @children: pointers to children
*
* @params_ok: parameters of this Qdisc are OK for offload
* @offload_mark: offload refresh state - selected for offload
* @offloaded: Qdisc is currently offloaded to the HW
*
* @mq: MQ Qdisc specific parameters and state
* @mq.stats: current stats of the MQ Qdisc
* @mq.prev_stats: previously reported @mq.stats
*
* @red: RED Qdisc specific parameters and state
* @red.num_bands: Number of valid entries in the @red.band table
* @red.band: Per-band array of RED instances
* @red.band.ecn: ECN marking is enabled (rather than drop)
* @red.band.threshold: ECN marking threshold
* @red.band.stats: current stats of the RED Qdisc
* @red.band.prev_stats: previously reported @red.stats
* @red.band.xstats: extended stats for RED - current
* @red.band.prev_xstats: extended stats for RED - previously reported
*/
struct nfp_qdisc {
Annotation
- Immediate include surface: `linux/bits.h`, `linux/list.h`, `linux/radix-tree.h`, `net/devlink.h`, `net/pkt_cls.h`, `net/pkt_sched.h`.
- Detected declarations: `struct nfp_app`, `struct nfp_net`, `struct nfp_abm`, `struct nfp_alink_stats`, `struct nfp_alink_xstats`, `struct nfp_qdisc`, `struct nfp_abm_link`, `enum nfp_abm_q_action`, `enum nfp_qdisc_type`, `function nfp_abm_has_prio`.
- 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.