include/net/dsa_stubs.h
Source file repositories/reference/linux-study-clean/include/net/dsa_stubs.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/dsa_stubs.h- Extension
.h- Size
- 1314 bytes
- Lines
- 49
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/mutex.hlinux/netdevice.hlinux/net_tstamp.hnet/dsa.h
Detected Declarations
struct dsa_stubsfunction dsa_conduit_hwtstamp_validatefunction dsa_conduit_hwtstamp_validate
Annotated Snippet
struct dsa_stubs {
int (*conduit_hwtstamp_validate)(struct net_device *dev,
const struct kernel_hwtstamp_config *config,
struct netlink_ext_ack *extack);
};
static inline int dsa_conduit_hwtstamp_validate(struct net_device *dev,
const struct kernel_hwtstamp_config *config,
struct netlink_ext_ack *extack)
{
if (!netdev_uses_dsa(dev))
return 0;
/* rtnl_lock() is a sufficient guarantee, because as long as
* netdev_uses_dsa() returns true, the dsa_core module is still
* registered, and so, dsa_unregister_stubs() couldn't have run.
* For netdev_uses_dsa() to start returning false, it would imply that
* dsa_conduit_teardown() has executed, which requires rtnl_lock().
*/
ASSERT_RTNL();
return dsa_stubs->conduit_hwtstamp_validate(dev, config, extack);
}
#else
static inline int dsa_conduit_hwtstamp_validate(struct net_device *dev,
const struct kernel_hwtstamp_config *config,
struct netlink_ext_ack *extack)
{
return 0;
}
#endif
Annotation
- Immediate include surface: `linux/mutex.h`, `linux/netdevice.h`, `linux/net_tstamp.h`, `net/dsa.h`.
- Detected declarations: `struct dsa_stubs`, `function dsa_conduit_hwtstamp_validate`, `function dsa_conduit_hwtstamp_validate`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- 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.