include/net/ieee8021q.h
Source file repositories/reference/linux-study-clean/include/net/ieee8021q.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/ieee8021q.h- Extension
.h- Size
- 1451 bytes
- Lines
- 58
- 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.
Dependency Surface
linux/errno.h
Detected Declarations
enum ieee8021q_traffic_typefunction ietf_dscp_to_ieee8021q_ttfunction ieee8021q_tt_to_tc
Annotated Snippet
#ifndef _NET_IEEE8021Q_H
#define _NET_IEEE8021Q_H
#include <linux/errno.h>
/**
* enum ieee8021q_traffic_type - 802.1Q traffic type priority values (802.1Q-2022)
*
* @IEEE8021Q_TT_BK: Background
* @IEEE8021Q_TT_BE: Best Effort (default). According to 802.1Q-2022, BE is 0
* but has higher priority than BK which is 1.
* @IEEE8021Q_TT_EE: Excellent Effort
* @IEEE8021Q_TT_CA: Critical Applications
* @IEEE8021Q_TT_VI: Video, < 100 ms latency and jitter
* @IEEE8021Q_TT_VO: Voice, < 10 ms latency and jitter
* @IEEE8021Q_TT_IC: Internetwork Control
* @IEEE8021Q_TT_NC: Network Control
*/
enum ieee8021q_traffic_type {
IEEE8021Q_TT_BK = 0,
IEEE8021Q_TT_BE = 1,
IEEE8021Q_TT_EE = 2,
IEEE8021Q_TT_CA = 3,
IEEE8021Q_TT_VI = 4,
IEEE8021Q_TT_VO = 5,
IEEE8021Q_TT_IC = 6,
IEEE8021Q_TT_NC = 7,
/* private: */
IEEE8021Q_TT_MAX,
};
#define SIMPLE_IETF_DSCP_TO_IEEE8021Q_TT(dscp) ((dscp >> 3) & 0x7)
#if IS_ENABLED(CONFIG_NET_IEEE8021Q_HELPERS)
int ietf_dscp_to_ieee8021q_tt(u8 dscp);
int ieee8021q_tt_to_tc(enum ieee8021q_traffic_type tt, unsigned int num_queues);
#else
static inline int ietf_dscp_to_ieee8021q_tt(u8 dscp)
{
return -EOPNOTSUPP;
}
static inline int ieee8021q_tt_to_tc(enum ieee8021q_traffic_type tt,
unsigned int num_queues)
{
return -EOPNOTSUPP;
}
#endif
#endif /* _NET_IEEE8021Q_H */
Annotation
- Immediate include surface: `linux/errno.h`.
- Detected declarations: `enum ieee8021q_traffic_type`, `function ietf_dscp_to_ieee8021q_tt`, `function ieee8021q_tt_to_tc`.
- 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.