STRUCT P9_TRANS_MODULE(9)
π struct p9_trans_module(9) π
okay so we're deep in the Kernel API Manual, bestie, and this page is all about struct p9_trans_module β the transport module interface. It's giving very "kernel plumbing but make it fashion" energy, and honestly? iconic. Let's go β¨
πΈ NAME πΈ
struct p9_trans_module β transport module interface. That's the name line, no cap π«Ά
β¨ SYNOPSIS β¨
here's the whole struct, copied exactly so nobody comes for me:
struct p9_trans_module {
struct list_head list;
char *name;
int maxsize;
bool pooled_rbuffers;
bool def;
bool supports_vmalloc;
struct module *owner;
int (*create)(struct p9_client *client, struct fs_context *fc);
void (*close)(struct p9_client *client);
int (*request)(struct p9_client *client, struct p9_req_t *req);
int (*cancel)(struct p9_client *client, struct p9_req_t *req);
int (*cancelled)(struct p9_client *client, struct p9_req_t *req);
int (*zc_request)(struct p9_client *client, struct p9_req_t *req,
struct iov_iter *uidata, struct iov_iter *uodata, int inlen, int outlen,
int in_hdr_len);
int (*show_options)(struct seq_file *m, struct p9_client *client);
};
π Members π
listβ used to maintain a list of currently available transports. simple, useful, doing its thing πnameβ the human-readable name of the transport. cute and legible, we love that.maxsizeβ transport provided maximum packet size. big important number energy.pooled_rbuffersβ currently only set for RDMA transport which pulls the response buffers from a shared pool, and accordingly we're less flexible when choosing the response message size in this case. yes, that whole situation πdefβ set if this transport should be considered the default. main character transport behavior, lowkey.supports_vmallocβ set if this transport can work with vmalloc'd buffers (non-physically contiguous memory). Transports requiring DMA should leave this asfalse. important caveat, bestie, do not skip it πcreateβ member function to create a new connection on this transport. new connection, who dis π¦closeβ member function to discard a connection on this transport. bye bestie πrequestβ member function to issue a request to the transport. go go go π₯cancelβ member function to cancel a request (if it hasn't been sent). the parenthetical matters, periodt.cancelledβ member function to notify that a cancelled request will not receive a reply. no reply bestie, that's the whole point π
π Description π
This is the basic API for a transport module which is registered by the transport module with the 9P core network module and used by the client to instantiate a new connection on a transport. that's the vibe: transport module meets 9P core, client makes a new connection π«Ά
The transport module list is protected by v9fs_trans_lock. do not forget it β that lock is the bodyguard π₯
π SEE ALSO π
- Kernel file
./include/net/9p/transport.hβ go peek, iykyk π
xoxo, this page comes from ./include/net/9p, dated October 2026, and it's filed as struct p9_trans_module(9) πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms