net/dsa/user.h
Source file repositories/reference/linux-study-clean/net/dsa/user.h
File Facts
- System
- Linux kernel
- Corpus path
net/dsa/user.h- Extension
.h- Size
- 2038 bytes
- Lines
- 72
- 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/if_bridge.hlinux/if_vlan.hlinux/list.hlinux/netpoll.hlinux/types.hnet/dsa.hnet/gro_cells.h
Detected Declarations
struct net_devicestruct netlink_ext_ackstruct dsa_user_privfunction dsa_user_to_conduit
Annotated Snippet
struct dsa_user_priv {
/* Copy of CPU port xmit for faster access in user transmit hot path */
struct sk_buff * (*xmit)(struct sk_buff *skb,
struct net_device *dev);
struct gro_cells gcells;
/* DSA port data, such as switch, port index, etc. */
struct dsa_port *dp;
#ifdef CONFIG_NET_POLL_CONTROLLER
struct netpoll *netpoll;
#endif
/* TC context */
struct list_head mall_tc_list;
};
void dsa_user_mii_bus_init(struct dsa_switch *ds);
int dsa_user_create(struct dsa_port *dp);
void dsa_user_destroy(struct net_device *user_dev);
int dsa_user_suspend(struct net_device *user_dev);
int dsa_user_resume(struct net_device *user_dev);
int dsa_user_register_notifier(void);
void dsa_user_unregister_notifier(void);
int dsa_user_host_uc_install(struct net_device *dev, const u8 *addr);
void dsa_user_host_uc_uninstall(struct net_device *dev);
void dsa_user_sync_ha(struct net_device *dev);
void dsa_user_unsync_ha(struct net_device *dev);
void dsa_user_setup_tagger(struct net_device *user);
int dsa_user_change_mtu(struct net_device *dev, int new_mtu);
int dsa_user_change_conduit(struct net_device *dev, struct net_device *conduit,
struct netlink_ext_ack *extack);
int dsa_user_manage_vlan_filtering(struct net_device *dev,
bool vlan_filtering);
static inline struct dsa_port *dsa_user_to_port(const struct net_device *dev)
{
struct dsa_user_priv *p = netdev_priv(dev);
return p->dp;
}
static inline struct net_device *
dsa_user_to_conduit(const struct net_device *dev)
{
struct dsa_port *dp = dsa_user_to_port(dev);
return dsa_port_to_conduit(dp);
}
#endif
Annotation
- Immediate include surface: `linux/if_bridge.h`, `linux/if_vlan.h`, `linux/list.h`, `linux/netpoll.h`, `linux/types.h`, `net/dsa.h`, `net/gro_cells.h`.
- Detected declarations: `struct net_device`, `struct netlink_ext_ack`, `struct dsa_user_priv`, `function dsa_user_to_conduit`.
- 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.