drivers/net/ethernet/fungible/funeth/funeth.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/fungible/funeth/funeth.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/fungible/funeth/funeth.h- Extension
.h- Size
- 3949 bytes
- Lines
- 172
- 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
uapi/linux/if_ether.hlinux/net_tstamp.hlinux/mutex.hlinux/seqlock.hlinux/xarray.hnet/devlink.hfun_dev.h
Detected Declarations
struct fun_vport_infostruct fun_ethdevstruct fun_qsetstruct funeth_priv
Annotated Snippet
struct fun_vport_info {
u8 mac[ETH_ALEN];
u16 vlan;
__be16 vlan_proto;
u8 qos;
u8 spoofchk:1;
u8 trusted:1;
unsigned int max_rate;
};
/* "subclass" of fun_dev for Ethernet functions */
struct fun_ethdev {
struct fun_dev fdev;
/* the function's network ports */
struct net_device **netdevs;
unsigned int num_ports;
/* configuration for the function's virtual ports */
unsigned int num_vports;
struct fun_vport_info *vport_info;
struct mutex state_mutex; /* nests inside RTNL if both taken */
unsigned int nsqs_per_port;
};
static inline struct fun_ethdev *to_fun_ethdev(struct fun_dev *p)
{
return container_of(p, struct fun_ethdev, fdev);
}
struct fun_qset {
struct funeth_rxq **rxqs;
struct funeth_txq **txqs;
struct funeth_txq **xdpqs;
unsigned int nrxqs;
unsigned int ntxqs;
unsigned int nxdpqs;
unsigned int rxq_start;
unsigned int txq_start;
unsigned int xdpq_start;
unsigned int cq_depth;
unsigned int rq_depth;
unsigned int sq_depth;
int state;
};
/* Per netdevice driver state, i.e., netdev_priv. */
struct funeth_priv {
struct fun_dev *fdev;
struct pci_dev *pdev;
struct net_device *netdev;
struct funeth_rxq * __rcu *rxqs;
struct funeth_txq **txqs;
struct funeth_txq * __rcu *xdpqs;
struct xarray irqs;
unsigned int num_tx_irqs;
unsigned int num_rx_irqs;
unsigned int rx_irq_ofst;
unsigned int lane_attrs;
u16 lport;
/* link settings */
u64 port_caps;
u64 advertising;
u64 lp_advertising;
unsigned int link_speed;
u8 xcvr_type;
u8 active_fc;
u8 active_fec;
u8 link_down_reason;
seqcount_t link_seq;
u32 msg_enable;
unsigned int num_xdpqs;
/* ethtool, etc. config parameters */
unsigned int sq_depth;
unsigned int rq_depth;
unsigned int cq_depth;
unsigned int cq_irq_db;
u8 tx_coal_usec;
u8 tx_coal_count;
u8 rx_coal_usec;
u8 rx_coal_count;
Annotation
- Immediate include surface: `uapi/linux/if_ether.h`, `linux/net_tstamp.h`, `linux/mutex.h`, `linux/seqlock.h`, `linux/xarray.h`, `net/devlink.h`, `fun_dev.h`.
- Detected declarations: `struct fun_vport_info`, `struct fun_ethdev`, `struct fun_qset`, `struct funeth_priv`.
- 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.