net/smc/smc_stats.c
Source file repositories/reference/linux-study-clean/net/smc/smc_stats.c
File Facts
- System
- Linux kernel
- Corpus path
net/smc/smc_stats.c- Extension
.c- Size
- 11429 bytes
- Lines
- 420
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/mutex.hlinux/percpu.hlinux/ctype.hlinux/smc.hnet/genetlink.hnet/sock.hsmc_netlink.hsmc_stats.h
Detected Declarations
function RDMAfunction smc_stats_exitfunction smc_nl_fill_stats_rmb_datafunction smc_nl_fill_stats_bufsize_datafunction smc_nl_fill_stats_tech_datafunction smc_nl_get_statsfunction smc_nl_get_fback_detailsfunction smc_nl_get_fback_stats
Annotated Snippet
if (!skip_serv) {
rc_srv = smc_nl_get_fback_details(skb, cb, k, is_srv);
if (rc_srv && rc_srv != -ENODATA)
break;
} else {
skip_serv = 0;
}
rc_clnt = smc_nl_get_fback_details(skb, cb, k, !is_srv);
if (rc_clnt && rc_clnt != -ENODATA) {
skip_serv = 1;
break;
}
if (rc_clnt == -ENODATA && rc_srv == -ENODATA)
break;
}
mutex_unlock(&net->smc.mutex_fback_rsn);
cb_ctx->pos[1] = skip_serv;
cb_ctx->pos[0] = k;
return skb->len;
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/mutex.h`, `linux/percpu.h`, `linux/ctype.h`, `linux/smc.h`, `net/genetlink.h`, `net/sock.h`, `smc_netlink.h`.
- Detected declarations: `function RDMA`, `function smc_stats_exit`, `function smc_nl_fill_stats_rmb_data`, `function smc_nl_fill_stats_bufsize_data`, `function smc_nl_fill_stats_tech_data`, `function smc_nl_get_stats`, `function smc_nl_get_fback_details`, `function smc_nl_get_fback_stats`.
- 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.