include/net/9p/client.h
Source file repositories/reference/linux-study-clean/include/net/9p/client.h
File Facts
- System
- Linux kernel
- Corpus path
include/net/9p/client.h- Extension
.h- Size
- 11932 bytes
- Lines
- 401
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/utsname.hlinux/idr.hlinux/tracepoint-defs.h
Detected Declarations
struct p9_req_tstruct p9_clientstruct p9_client_optsstruct p9_fd_optsstruct p9_rdma_optsstruct p9_session_optsstruct v9fs_contextstruct p9_fidstruct p9_direntstruct iov_iterstruct netfs_io_subrequestenum p9_proto_versionsenum p9_trans_statusenum p9_req_status_tenum fid_sourcefunction p9_req_getfunction p9_req_try_getfunction p9_fid_getfunction p9_fid_put
Annotated Snippet
struct p9_req_t {
int status;
int t_err;
refcount_t refcount;
wait_queue_head_t wq;
struct p9_fcall tc;
struct p9_fcall rc;
struct list_head req_list;
};
/**
* struct p9_client - per client instance state
* @lock: protect @fids and @reqs
* @msize: maximum data size negotiated by protocol
* @proto_version: 9P protocol version to use
* @trans_mod: module API instantiated with this client
* @status: connection state
* @trans: tranport instance state and API
* @fids: All active FID handles
* @reqs: All active requests.
* @name: node name used as client id
*
* The client structure is used to keep track of various per-client
* state that has been instantiated.
*/
struct p9_client {
spinlock_t lock;
unsigned int msize;
unsigned char proto_version;
struct p9_trans_module *trans_mod;
enum p9_trans_status status;
void *trans;
struct kmem_cache *fcall_cache;
union {
struct {
int rfd;
int wfd;
} fd;
struct {
u16 port;
bool privport;
} tcp;
} trans_opts;
struct idr fids;
struct idr reqs;
char name[__NEW_UTS_LEN + 1];
};
/**
* struct p9_fd_opts - holds client options during parsing
* @msize: maximum data size negotiated by protocol
* @prot-Oversion: 9P protocol version to use
* @trans_mod: module API instantiated with this client
*
* These parsed options get transferred into client in
* apply_client_options()
*/
struct p9_client_opts {
unsigned int msize;
unsigned char proto_version;
struct p9_trans_module *trans_mod;
};
/**
* struct p9_fd_opts - per-transport options for fd transport
* @rfd: file descriptor for reading (trans=fd)
* @wfd: file descriptor for writing (trans=fd)
* @port: port to connect to (trans=tcp)
* @privport: port is privileged
*/
struct p9_fd_opts {
int rfd;
int wfd;
u16 port;
bool privport;
};
/**
* struct p9_rdma_opts - Collection of mount options for rdma transport
* @port: port of connection
* @privport: Whether a privileged port may be used
* @sq_depth: The requested depth of the SQ. This really doesn't need
* to be any deeper than the number of threads used in the client
* @rq_depth: The depth of the RQ. Should be greater than or equal to SQ depth
* @timeout: Time to wait in msecs for CM events
*/
Annotation
- Immediate include surface: `linux/utsname.h`, `linux/idr.h`, `linux/tracepoint-defs.h`.
- Detected declarations: `struct p9_req_t`, `struct p9_client`, `struct p9_client_opts`, `struct p9_fd_opts`, `struct p9_rdma_opts`, `struct p9_session_opts`, `struct v9fs_context`, `struct p9_fid`, `struct p9_dirent`, `struct iov_iter`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.