STRUCT P9_TRANS_MODULE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 as false. 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