RPCORDMA(3)

✨ RPCORDMA ✨

okay bestie sit DOWN because this one is literally the decoder for RPCORDMA and it's giving serious main-character energy πŸ’… it lives in the rpcordma 1.0 manual, section 3 (that's the library-functions section, iykyk), and it's here to help you crack open RPCORDMA packets like they're a lil gift πŸŽ€


🌸 NAME 🌸

packet.application.rpcordma β€” the RPCORDMA decoding module. that's it, that's the whole vibe ✨


πŸ¦‹ CLASSES πŸ¦‹

πŸ‘‘ class RPCoRDMA(baseobj.BaseObj)

the big one. the headliner. the way that it just mirrors the RPC header xid like it's not even a big deal:

struct RPCoRDMA {
    uint32    xid;     /* Mirrors the RPC header xid */
    uint32    vers;    /* Version of this protocol */
    uint32    credit;  /* Buffers requested/granted */
    rdma_body body;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. no cap, it's flexible like that 🫢


🌈 class rdma_body(baseobj.BaseObj)

a union switch, which is basically the "choose your own adventure" of this whole module, keyed off rdma_proc proc:

union switch rdma_body (rdma_proc proc) {
    case const.RDMA_MSG:
        rpc_rdma_header rdma_msg;
    case const.RDMA_NOMSG:
        rpc_rdma_header_nomsg rdma_nomsg;
    case const.RDMA_MSGP:                 /* Not to be used */
        rpc_rdma_header_padded rdma_msgp;
    case const.RDMA_DONE:                 /* Not to be used */
        void;
    case const.RDMA_ERROR:
        rpc_rdma_error rdma_error;
};
🚨 heads up bestie: const.RDMA_MSGP and const.RDMA_DONE are marked Not to be used. don't be the girl who uses them πŸ’€

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. ✨


🧚 class rdma_proc(packet.utils.Enum)

enum rdma_proc β€” it's an enum, she's an icon, she's from packet.utils. πŸ‘‘


🧚 class rpc_rdma_errcode(packet.utils.Enum)

enum rpc_rdma_errcode β€” another enum from packet.utils, slaying quietly in the background. πŸ’œ


πŸ“ class rpc_rdma_error(baseobj.BaseObj)

union switch city, keyed off rpc_rdma_errcode err:

union switch rpc_rdma_error (rpc_rdma_errcode err) {
    case const.ERR_VERS:
        rpc_rdma_errvers range;
    case const.ERR_CHUNK:
        void;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. 🫢


πŸ¦‹ class rpc_rdma_errvers(baseobj.BaseObj)

a lil low/high range moment:

struct rpc_rdma_errvers {
    uint32 low;
    uint32 high;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. ✨


πŸŽ€ class rpc_rdma_header(baseobj.BaseObj)

reads, writes, and a reply β€” the full trio, obsessed:

struct rpc_rdma_header {
    xdr_read_list   *reads;
    xdr_write_list  *writes;
    xdr_write_chunk *reply;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. πŸ’œ


πŸŽ€ class rpc_rdma_header_nomsg(baseobj.BaseObj)

literally the same shape as rpc_rdma_header, just the no-message variant bestie:

struct rpc_rdma_header_nomsg {
    xdr_read_list   *reads;
    xdr_write_list  *writes;
    xdr_write_chunk *reply;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. 🫢


πŸŽ€ class rpc_rdma_header_padded(baseobj.BaseObj)

the padded one, with alignment and threshold flexing at the top:

struct rpc_rdma_header_padded {
    uint32          align;    /* Padding alignment */
    uint32          thresh;   /* Padding threshold */
    xdr_read_list   *reads;
    xdr_write_list  *writes;
    xdr_write_chunk *reply;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. ✨


🧚 class xdr_rdma_segment(baseobj.BaseObj)

the little memory descriptor that could:

struct xdr_rdma_segment {
    uint32 handle;  /* Registered memory handle */
    uint32 length;  /* Length of the chunk in bytes */
    uint64 offset;  /* Chunk virtual address or offset */
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. 🌸


πŸ“ class xdr_read_chunk(baseobj.BaseObj)

a position plus a target segment, cute lil pair:

struct xdr_read_chunk {
    uint32           position;  /* Position in XDR stream */
    xdr_rdma_segment target;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. πŸ’œ


🌈 class xdr_read_list(baseobj.BaseObj)

it's a linked list, it's an entry, it's a next pointer, it's iconic:

struct xdr_read_list {
    xdr_read_chunk entry;
    xdr_read_list  *next;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. ✨


πŸ“ class xdr_write_chunk(baseobj.BaseObj)

a variable-length array of segments β€” the <> means variable-length bestie, don't forget it:

struct xdr_write_chunk {
    xdr_rdma_segment target<>;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. 🫢


🌈 class xdr_write_list(baseobj.BaseObj)

same linked-list energy, write-flavored:

struct xdr_write_list {
    xdr_write_chunk entry;
    xdr_write_list  *next;
};

Methods defined here:


πŸ’– __init__(self, unpack)

Constructor πŸ’«

Initialize object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. πŸ’–


🫢 SEE ALSO 🫢

go read these next, bestie, they're the whole squad:


πŸ’€ BUGS πŸ’€

No known bugs. she's flawless, periodt. πŸ‘‘


πŸ‘‘ AUTHOR πŸ‘‘

Jorge Mora (mora@netapp.com) β€” the legend who wrote this. give her a round of applause 🫢✨


🌸 that's the whole page bestie! this was NFStest 3.2, dated 21 March 2023. go forth and decode, and remember: mirrors the RPC header xid, always. πŸ’…πŸŽ€πŸ¦‹