drivers/net/ethernet/netronome/nfp/nfp_net_repr.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/nfp_net_repr.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/nfp_net_repr.h- Extension
.h- Size
- 3131 bytes
- Lines
- 115
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/dst_metadata.h
Detected Declarations
struct metadata_dststruct nfp_appstruct nfp_netstruct nfp_portstruct nfp_reprsstruct nfp_repr_pcpu_statsstruct nfp_reprenum nfp_repr_typefunction nfp_netdev_is_nfp_reprfunction nfp_repr_get_port_id
Annotated Snippet
extern const struct net_device_ops nfp_repr_netdev_ops;
static inline bool nfp_netdev_is_nfp_repr(struct net_device *netdev)
{
return netdev->netdev_ops == &nfp_repr_netdev_ops;
}
static inline int nfp_repr_get_port_id(struct net_device *netdev)
{
struct nfp_repr *priv = netdev_priv(netdev);
return priv->dst->u.port_info.port_id;
}
struct net_device *
nfp_repr_get_locked(struct nfp_app *app, struct nfp_reprs *set,
unsigned int id);
void nfp_repr_inc_rx_stats(struct net_device *netdev, unsigned int len);
void
nfp_repr_transfer_features(struct net_device *netdev, struct net_device *lower);
int nfp_repr_init(struct nfp_app *app, struct net_device *netdev,
u32 cmsg_port_id, struct nfp_port *port,
struct net_device *pf_netdev);
void nfp_repr_free(struct net_device *netdev);
struct net_device *
nfp_repr_alloc_mqs(struct nfp_app *app, unsigned int txqs, unsigned int rxqs);
void nfp_repr_clean_and_free(struct nfp_repr *repr);
void nfp_reprs_clean_and_free(struct nfp_app *app, struct nfp_reprs *reprs);
void nfp_reprs_clean_and_free_by_type(struct nfp_app *app,
enum nfp_repr_type type);
struct nfp_reprs *nfp_reprs_alloc(unsigned int num_reprs);
int nfp_reprs_resync_phys_ports(struct nfp_app *app);
static inline struct net_device *nfp_repr_alloc(struct nfp_app *app)
{
return nfp_repr_alloc_mqs(app, 1, 1);
}
#endif /* NFP_NET_REPR_H */
Annotation
- Immediate include surface: `net/dst_metadata.h`.
- Detected declarations: `struct metadata_dst`, `struct nfp_app`, `struct nfp_net`, `struct nfp_port`, `struct nfp_reprs`, `struct nfp_repr_pcpu_stats`, `struct nfp_repr`, `enum nfp_repr_type`, `function nfp_netdev_is_nfp_repr`, `function nfp_repr_get_port_id`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern 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.