net/dsa/tag.h
Source file repositories/reference/linux-study-clean/net/dsa/tag.h
File Facts
- System
- Linux kernel
- Corpus path
net/dsa/tag.h- Extension
.h- Size
- 14053 bytes
- Lines
- 410
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/if_vlan.hlinux/list.hlinux/types.hnet/dsa.hport.huser.h
Detected Declarations
struct dsa_tag_driverfunction dsa_tag_protocol_overheadfunction dsa_software_untag_vlan_aware_bridgefunction dsa_software_untag_vlan_unaware_bridgefunction portfunction dsa_find_designated_bridge_port_by_vidfunction list_for_each_entryfunction dsa_default_offload_fwd_markfunction skb_pullfunction skb_pushfunction skb_mac_headerfunction isfunction dsa_xmit_port_maskmodule init dsa_tag_driver_module_init
Annotated Snippet
module_init(dsa_tag_driver_module_init); \
\
static void __exit dsa_tag_driver_module_exit(void) \
{ \
dsa_tag_drivers_unregister(__dsa_tag_drivers_array, __count); \
} \
module_exit(dsa_tag_driver_module_exit)
/**
* module_dsa_tag_drivers() - Helper macro for registering DSA tag
* drivers
* @__ops_array: Array of tag driver structures
*
* Helper macro for DSA tag drivers which do not do anything special
* in module init/exit. Each module may only use this macro once, and
* calling it replaces module_init() and module_exit().
*/
#define module_dsa_tag_drivers(__ops_array) \
dsa_tag_driver_module_drivers(__ops_array, ARRAY_SIZE(__ops_array))
#define DSA_TAG_DRIVER_NAME(__ops) dsa_tag_driver ## _ ## __ops
/* Create a static structure we can build a linked list of dsa_tag
* drivers
*/
#define DSA_TAG_DRIVER(__ops) \
static struct dsa_tag_driver DSA_TAG_DRIVER_NAME(__ops) = { \
.ops = &__ops, \
}
/**
* module_dsa_tag_driver() - Helper macro for registering a single DSA tag
* driver
* @__ops: Single tag driver structures
*
* Helper macro for DSA tag drivers which do not do anything special
* in module init/exit. Each module may only use this macro once, and
* calling it replaces module_init() and module_exit().
*/
#define module_dsa_tag_driver(__ops) \
DSA_TAG_DRIVER(__ops); \
\
static struct dsa_tag_driver *dsa_tag_driver_array[] = { \
&DSA_TAG_DRIVER_NAME(__ops) \
}; \
module_dsa_tag_drivers(dsa_tag_driver_array)
#endif
Annotation
- Immediate include surface: `linux/if_vlan.h`, `linux/list.h`, `linux/types.h`, `net/dsa.h`, `port.h`, `user.h`.
- Detected declarations: `struct dsa_tag_driver`, `function dsa_tag_protocol_overhead`, `function dsa_software_untag_vlan_aware_bridge`, `function dsa_software_untag_vlan_unaware_bridge`, `function port`, `function dsa_find_designated_bridge_port_by_vid`, `function list_for_each_entry`, `function dsa_default_offload_fwd_mark`, `function skb_pull`, `function skb_push`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: integration 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.