include/net/mana/mana.h
Source file repositories/reference/linux-study-clean/include/net/mana/mana.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/mana/mana.h- Extension
.h- Size
- 25777 bytes
- Lines
- 1063
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
net/xdp.hnet/net_shaper.hgdma.hhw_channel.h
Detected Declarations
struct mana_stats_rxstruct mana_stats_txstruct mana_txqstruct mana_skb_headstruct mana_tx_short_oobstruct mana_tx_long_oobstruct mana_tx_oobstruct mana_cqe_headerstruct mana_rxcomp_perpkt_infostruct mana_rxcomp_oobstruct mana_tx_comp_oobstruct mana_rxqstruct mana_cqstruct mana_recv_buf_oobstruct mana_rxqstruct mana_tx_qpstruct mana_ethtool_statsstruct mana_ethtool_hc_statsstruct mana_ethtool_phy_statsstruct mana_contextstruct mana_port_contextstruct mana_obj_specstruct mana_query_link_config_reqstruct mana_query_link_config_respstruct mana_set_bw_clamp_reqstruct mana_set_bw_clamp_respstruct mana_query_device_cfg_reqstruct mana_query_device_cfg_respstruct mana_query_vport_cfg_reqstruct mana_query_vport_cfg_respstruct mana_config_vport_reqstruct mana_config_vport_respstruct mana_create_wqobj_reqstruct mana_create_wqobj_respstruct mana_destroy_wqobj_reqstruct mana_destroy_wqobj_respstruct mana_fence_rq_reqstruct mana_fence_rq_respstruct mana_query_gf_stat_reqstruct mana_query_gf_stat_respstruct mana_query_phy_stat_reqstruct mana_query_phy_stat_respstruct mana_cfg_rx_steer_req_v2struct mana_cfg_rx_steer_respstruct mana_register_hw_vport_reqstruct mana_register_hw_vport_respstruct mana_deregister_hw_vport_reqstruct mana_deregister_hw_vport_resp
Annotated Snippet
struct mana_stats_rx {
u64 packets;
u64 bytes;
u64 xdp_drop;
u64 xdp_tx;
u64 xdp_redirect;
u64 pkt_len0_err;
u64 coalesced_cqe[MANA_RXCOMP_OOB_NUM_PPI - 1];
struct u64_stats_sync syncp;
};
struct mana_stats_tx {
u64 packets;
u64 bytes;
u64 xdp_xmit;
u64 tso_packets;
u64 tso_bytes;
u64 tso_inner_packets;
u64 tso_inner_bytes;
u64 short_pkt_fmt;
u64 long_pkt_fmt;
u64 csum_partial;
u64 mana_map_err;
struct u64_stats_sync syncp;
};
struct mana_txq {
struct gdma_queue *gdma_sq;
union {
u32 gdma_txq_id;
struct {
u32 reserved1 : 10;
u32 vsq_frame : 14;
u32 reserved2 : 8;
};
};
u16 vp_offset;
struct net_device *ndev;
/* The SKBs are sent to the HW and we are waiting for the CQEs. */
struct sk_buff_head pending_skbs;
struct netdev_queue *net_txq;
atomic_t pending_sends;
bool napi_initialized;
struct mana_stats_tx stats;
};
/* skb data and frags dma mappings */
struct mana_skb_head {
/* GSO pkts may have 2 SGEs for the linear part*/
dma_addr_t dma_handle[MAX_SKB_FRAGS + 2];
u32 size[MAX_SKB_FRAGS + 2];
};
#define MANA_HEADROOM sizeof(struct mana_skb_head)
enum mana_tx_pkt_format {
MANA_SHORT_PKT_FMT = 0,
MANA_LONG_PKT_FMT = 1,
};
struct mana_tx_short_oob {
u32 pkt_fmt : 2;
u32 is_outer_ipv4 : 1;
u32 is_outer_ipv6 : 1;
u32 comp_iphdr_csum : 1;
u32 comp_tcp_csum : 1;
u32 comp_udp_csum : 1;
u32 supress_txcqe_gen : 1;
u32 vcq_num : 24;
u32 trans_off : 10; /* Transport header offset */
u32 vsq_frame : 14;
u32 short_vp_offset : 8;
}; /* HW DATA */
struct mana_tx_long_oob {
u32 is_encap : 1;
u32 inner_is_ipv6 : 1;
u32 inner_tcp_opt : 1;
u32 inject_vlan_pri_tag : 1;
u32 reserved1 : 12;
u32 pcp : 3; /* 802.1Q */
Annotation
- Immediate include surface: `net/xdp.h`, `net/net_shaper.h`, `gdma.h`, `hw_channel.h`.
- Detected declarations: `struct mana_stats_rx`, `struct mana_stats_tx`, `struct mana_txq`, `struct mana_skb_head`, `struct mana_tx_short_oob`, `struct mana_tx_long_oob`, `struct mana_tx_oob`, `struct mana_cqe_header`, `struct mana_rxcomp_perpkt_info`, `struct mana_rxcomp_oob`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.