include/linux/can/can-ml.h
Source file repositories/reference/linux-study-clean/include/linux/can/can-ml.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/can/can-ml.h- Extension
.h- Size
- 3646 bytes
- Lines
- 105
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/can.hlinux/list.hlinux/netdevice.h
Detected Declarations
struct can_dev_rcv_listsstruct can_ml_privfunction can_set_ml_privfunction can_cap_enabledfunction can_set_cap
Annotated Snippet
struct can_dev_rcv_lists {
struct hlist_head rx[RX_MAX];
struct hlist_head rx_sff[CAN_SFF_RCV_ARRAY_SZ];
struct hlist_head rx_eff[CAN_EFF_RCV_ARRAY_SZ];
int entries;
};
struct can_ml_priv {
struct can_dev_rcv_lists dev_rcv_lists;
#ifdef CAN_J1939
struct j1939_priv *j1939_priv;
#endif
u32 can_cap;
};
static inline struct can_ml_priv *can_get_ml_priv(struct net_device *dev)
{
return netdev_get_ml_priv(dev, ML_PRIV_CAN);
}
static inline void can_set_ml_priv(struct net_device *dev,
struct can_ml_priv *ml_priv)
{
netdev_set_ml_priv(dev, ml_priv, ML_PRIV_CAN);
}
static inline bool can_cap_enabled(struct net_device *dev, u32 cap)
{
struct can_ml_priv *can_ml = can_get_ml_priv(dev);
if (!can_ml)
return false;
return (can_ml->can_cap & cap);
}
static inline void can_set_cap(struct net_device *dev, u32 cap)
{
struct can_ml_priv *can_ml = can_get_ml_priv(dev);
can_ml->can_cap = cap;
}
#endif /* CAN_ML_H */
Annotation
- Immediate include surface: `linux/can.h`, `linux/list.h`, `linux/netdevice.h`.
- Detected declarations: `struct can_dev_rcv_lists`, `struct can_ml_priv`, `function can_set_ml_priv`, `function can_cap_enabled`, `function can_set_cap`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.