drivers/net/ethernet/qualcomm/ppe/ppe_config.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qualcomm/ppe/ppe_config.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qualcomm/ppe/ppe_config.c- Extension
.c- Size
- 56853 bytes
- Lines
- 2035
- 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/bitfield.hlinux/bitmap.hlinux/bits.hlinux/device.hlinux/regmap.hppe.hppe_config.hppe_regs.h
Detected Declarations
struct ppe_bm_port_configstruct ppe_qm_queue_configstruct ppe_scheduler_bm_configstruct ppe_scheduler_qm_configstruct ppe_scheduler_port_configstruct ppe_port_schedule_resourceenum ppe_scheduler_directionfunction ppe_scheduler_l0_queue_map_setfunction ppe_scheduler_l1_queue_map_setfunction ppe_queue_scheduler_setfunction ppe_queue_ucast_base_setfunction ppe_queue_ucast_offset_pri_setfunction ppe_queue_ucast_offset_hash_setfunction ppe_port_resource_getfunction ppe_sc_config_setfunction ppe_counter_enable_setfunction ppe_rss_hash_ipv4_configfunction ppe_rss_hash_ipv6_configfunction ppe_rss_hash_config_setfunction ppe_ring_queue_map_setfunction ppe_config_bm_thresholdfunction ppe_config_bmfunction ppe_config_qmfunction ppe_node_scheduler_configfunction ppe_config_schedulerfunction ppe_queue_dest_initfunction CPUfunction ppe_servcode_initfunction ppe_port_config_initfunction ppe_rss_hash_initfunction ppe_queues_to_ring_initfunction ppe_bridge_initfunction ppe_hw_config
Annotated Snippet
struct ppe_bm_port_config {
unsigned int port_id_start;
unsigned int port_id_end;
unsigned int pre_alloc;
unsigned int in_fly_buf;
unsigned int ceil;
unsigned int weight;
unsigned int resume_offset;
unsigned int resume_ceil;
bool dynamic;
};
/**
* struct ppe_qm_queue_config - PPE queue config.
* @queue_start: PPE start of queue ID.
* @queue_end: PPE end of queue ID.
* @prealloc_buf: Queue dedicated buffer number.
* @ceil: Ceil to start drop packet from queue.
* @weight: Weight value.
* @resume_offset: Resume offset from the threshold.
* @dynamic: Threshold value is decided dynamically or statically.
*
* Queue configuration decides the threshold to drop packet from PPE
* hardware queue.
*/
struct ppe_qm_queue_config {
unsigned int queue_start;
unsigned int queue_end;
unsigned int prealloc_buf;
unsigned int ceil;
unsigned int weight;
unsigned int resume_offset;
bool dynamic;
};
/**
* enum ppe_scheduler_direction - PPE scheduler direction for packet.
* @PPE_SCH_INGRESS: Scheduler for the packet on ingress,
* @PPE_SCH_EGRESS: Scheduler for the packet on egress,
*/
enum ppe_scheduler_direction {
PPE_SCH_INGRESS = 0,
PPE_SCH_EGRESS = 1,
};
/**
* struct ppe_scheduler_bm_config - PPE arbitration for buffer config.
* @valid: Arbitration entry valid or not.
* @dir: Arbitration entry for egress or ingress.
* @port: Port ID to use arbitration entry.
* @backup_port_valid: Backup port valid or not.
* @backup_port: Backup port ID to use.
*
* Configure the scheduler settings for accessing and releasing the PPE buffers.
*/
struct ppe_scheduler_bm_config {
bool valid;
enum ppe_scheduler_direction dir;
unsigned int port;
bool backup_port_valid;
unsigned int backup_port;
};
/**
* struct ppe_scheduler_qm_config - PPE arbitration for scheduler config.
* @ensch_port_bmp: Port bit map for enqueue scheduler.
* @ensch_port: Port ID to enqueue scheduler.
* @desch_port: Port ID to dequeue scheduler.
* @desch_backup_port_valid: Dequeue for the backup port valid or not.
* @desch_backup_port: Backup port ID to dequeue scheduler.
*
* Configure the scheduler settings for enqueuing and dequeuing packets on
* the PPE port.
*/
struct ppe_scheduler_qm_config {
unsigned int ensch_port_bmp;
unsigned int ensch_port;
unsigned int desch_port;
bool desch_backup_port_valid;
unsigned int desch_backup_port;
};
/**
* struct ppe_scheduler_port_config - PPE port scheduler config.
* @port: Port ID to be scheduled.
* @flow_level: Scheduler flow level or not.
* @node_id: Node ID, for level 0, queue ID is used.
* @loop_num: Loop number of scheduler config.
* @pri_max: Max priority configured.
* @flow_id: Strict priority ID.
Annotation
- Immediate include surface: `linux/bitfield.h`, `linux/bitmap.h`, `linux/bits.h`, `linux/device.h`, `linux/regmap.h`, `ppe.h`, `ppe_config.h`, `ppe_regs.h`.
- Detected declarations: `struct ppe_bm_port_config`, `struct ppe_qm_queue_config`, `struct ppe_scheduler_bm_config`, `struct ppe_scheduler_qm_config`, `struct ppe_scheduler_port_config`, `struct ppe_port_schedule_resource`, `enum ppe_scheduler_direction`, `function ppe_scheduler_l0_queue_map_set`, `function ppe_scheduler_l1_queue_map_set`, `function ppe_queue_scheduler_set`.
- 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.