drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/pensando/ionic/ionic_debugfs.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/pensando/ionic/ionic_debugfs.c- Extension
.c- Size
- 8994 bytes
- Lines
- 304
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/pci.hlinux/netdevice.hionic.hionic_bus.hionic_lif.hionic_debugfs.h
Detected Declarations
function ionic_debugfs_createfunction ionic_debugfs_destroyfunction ionic_debugfs_add_devfunction ionic_debugfs_del_devfunction identity_showfunction ionic_debugfs_add_identfunction ionic_debugfs_add_sizesfunction q_tail_showfunction q_head_showfunction cq_tail_showfunction ionic_debugfs_add_qcqfunction netdev_showfunction lif_filters_showfunction hlist_for_each_entry_safefunction ionic_debugfs_add_liffunction ionic_debugfs_del_liffunction ionic_debugfs_del_qcq
Annotated Snippet
hlist_for_each_entry_safe(f, tmp, head, by_id) {
switch (le16_to_cpu(f->cmd.match)) {
case IONIC_RX_FILTER_MATCH_VLAN:
seq_printf(seq, "0x%04x 0x%08x 0x%02x vlan 0x%04x\n",
f->filter_id, f->flow_id, f->state,
le16_to_cpu(f->cmd.vlan.vlan));
break;
case IONIC_RX_FILTER_MATCH_MAC:
seq_printf(seq, "0x%04x 0x%08x 0x%02x mac %pM\n",
f->filter_id, f->flow_id, f->state,
f->cmd.mac.addr);
break;
case IONIC_RX_FILTER_MATCH_MAC_VLAN:
seq_printf(seq, "0x%04x 0x%08x 0x%02x macvl 0x%04x %pM\n",
f->filter_id, f->flow_id, f->state,
le16_to_cpu(f->cmd.vlan.vlan),
f->cmd.mac.addr);
break;
case IONIC_RX_FILTER_STEER_PKTCLASS:
seq_printf(seq, "0x%04x 0x%08x 0x%02x rxstr 0x%llx\n",
f->filter_id, f->flow_id, f->state,
le64_to_cpu(f->cmd.pkt_class));
break;
}
}
}
spin_unlock_bh(&lif->rx_filters.lock);
return 0;
}
DEFINE_SHOW_ATTRIBUTE(lif_filters);
void ionic_debugfs_add_lif(struct ionic_lif *lif)
{
struct dentry *lif_dentry;
lif_dentry = debugfs_create_dir(lif->name, lif->ionic->dentry);
if (IS_ERR_OR_NULL(lif_dentry))
return;
lif->dentry = lif_dentry;
debugfs_create_file("netdev", 0400, lif->dentry,
lif->netdev, &netdev_fops);
debugfs_create_file("filters", 0400, lif->dentry,
lif, &lif_filters_fops);
}
void ionic_debugfs_del_lif(struct ionic_lif *lif)
{
if (!lif->dentry)
return;
debugfs_remove_recursive(lif->dentry);
lif->dentry = NULL;
}
void ionic_debugfs_del_qcq(struct ionic_qcq *qcq)
{
debugfs_remove_recursive(qcq->dentry);
qcq->dentry = NULL;
}
#endif
Annotation
- Immediate include surface: `linux/pci.h`, `linux/netdevice.h`, `ionic.h`, `ionic_bus.h`, `ionic_lif.h`, `ionic_debugfs.h`.
- Detected declarations: `function ionic_debugfs_create`, `function ionic_debugfs_destroy`, `function ionic_debugfs_add_dev`, `function ionic_debugfs_del_dev`, `function identity_show`, `function ionic_debugfs_add_ident`, `function ionic_debugfs_add_sizes`, `function q_tail_show`, `function q_head_show`, `function cq_tail_show`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.