RDMAINFO(3)

πŸ’– RDMAINFO(3) β€” packet.transport.rdmainfo, from rdmainfo 1.1 ✨

okay so sit down, hydrate, and let's talk about RDMA reassembly, because bestie this module is literally the glue holding your RDMA fragments together 🫢


🌸 NAME 🌸

packet.transport.rdmainfo β€” the RDMA reassembly module. that's it, that's the name, it's giving "I put the pieces back together" energy πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

It provides functionality to reassemble RDMA fragments. no cap, that's the whole job, and she does it flawlessly ✨


πŸ‘‘ CLASSES πŸ‘‘

🌈 class RDMAinfo(packet.utils.RDMAbase)

RDMA info object used for reassembly. the main character, honestly πŸ‘‘

The reassembled message consists of one or multiple chunks and each chunk in turn could be composed of multiple segments. Also, each segment could be composed of multiple sub-segments and each sub-segment could be composed of multiple fragments. it's layers on layers on layers, like an onion but make it networking πŸ§…

The protocol only defines segments but if the segment length is large, it is split into multiple sub-segments in which each sub-segment is specified by RDMA_WRITE_First or RDMA_READ_Request packets. The handle is the same for each of these packets but with a shorter DMA length. iykyk πŸ”₯

Thus in order to reassemble all fragments for a single message, a list of segments is created where each segment is identified by its handle or RKey and the message is reassembled according to the chuck lists specified by the RPC-over-RDMA layer. (yes it says "chuck" in the original, we're keeping it, it's iconic, do not perceive it πŸ’€)

πŸ’œ Methods defined here:

  • __del__ = reset(self) β€” destructor duties, delegated straight to reset 🧹
  • __init__(self) β€” Constructor. Initializes object's private data according to the arguments given. Arguments can be given as positional, named arguments or a combination of both. flexible queen πŸ’…
  • __len__ = size(self) β€” length dunder, just calls size πŸ“
  • add_iwarp_data(self, rdmap, unpack, isread=False) β€” Add iWarp fragment data 🌊
  • add_iwarp_request(self, rdmap) β€” Add iWarp read request information πŸ“¨
  • add_rdma_data(self, psn, unpack, reth=None, only=False, read=False) β€” Add Infiniband fragment data πŸ’«
  • add_rdma_segment(self, rdma_seg, rpcrdma=None) β€” Add RDMA segment information and if the information already exists just update the length and return the segment πŸ”
  • del_rdma_segment(self, rsegment) β€” Delete RDMA segment information πŸ—‘οΈ
  • get_rdma_segment(self, handle) β€” Return RDMA segment identified by the given handle πŸ”
  • process_rdma_segments(self, rpcrdma) β€” Process the RPC-over-RDMA chunks 🧠

When this method is called on an RPC call, it adds the information of all the segments to the list of segments. When this method is called on an RPC reply, the segments should already exist so just update the segment's DMA length as returned by the reply. two moods, one method πŸŽ€

RPCoRDMA reads attribute is a list of read segments. Read segment is a plain segment plus an XDR position. A read chunk is the collection of all read segments with the same XDR position.

RPCoRDMA writes attribute is a list of write chunks. A write chunk is a list of plain segments.

RPCoRDMA reply is just a single write chunk if it exists. Return the reply chunk data πŸ“€

  • reassemble_rdma_reads(self, unpack, psn=None, only=False, rdmap=None) β€” Reassemble RDMA read chunks. The RDMA read chunks are reassembled in the read last operation 🧩
  • reset(self) β€” Clear RDMA segments 🧼
  • size(self) β€” Return the number RDMA segments πŸ”’

🌸 class RDMArequest(builtins.object)

RDMA iWarp Request object πŸŽ€

πŸ’œ Methods defined here:

  • __contains__(self, offset) β€” Membership test operator. Return true if offset belongs to this request βœ…
  • __init__(self, rdmap, rsegment) β€” Initialize self. See help(type(self)) for accurate signature πŸ“–
  • get_offset(self, offset) β€” Return offset translated from sink to src πŸ”„

🌟 class RDMAseg(builtins.object)

RDMA sub-segment object ✨

The sub-segment is created for each RDMA_WRITE_First, RDMA_WRITE_Only or RDMA_READ_Request and each sub-segment belongs to a list in the RDMAsegment object so there is no segment identifier or handle. anonymous but thriving πŸ™ˆ

Reassembly for each sub-segment is done using the PSN or packet sequence number in each of the data fragments. Therefore, a range of PSN numbers define this object which is given by the spsn and epsn attributes (first and last PSN respectively). πŸ“¬

πŸ’œ Methods defined here:

  • __del__(self) β€” Destructor πŸ’€
  • __init__(self, spsn, epsn, dmalen) β€” Initialize self. See help(type(self)) for accurate signature πŸ“–
  • get_data(self, padding=True) β€” Return sub-segment data πŸ“¦
  • get_size(self) β€” Return sub-segment data size πŸ“
  • insert_data(self, psn, data) β€” Insert data at correct position given by the psn 🎯

πŸ¦‹ class RDMAsegment(builtins.object)

RDMA segment object 🫢

Each segment is identified by its handle. The segment information comes from the RPC-over-RDMA protocol layer so the length attribute gives the total DMA length of the segment. 🧡

πŸ’œ Methods defined here:

  • __del__(self) β€” Destructor πŸ’€
  • __init__(self, rdma_seg, rpcrdma) β€” Initialize self. See help(type(self)) for accurate signature πŸ“–
  • add_data(self, psn, data) β€” Add Infiniband fragment data πŸ’«
  • add_fragment(self, offset, data) β€” Add iWarp fragment to segment 🌊
  • add_sub_segment(self, psn, dmalen, only=False, iosize=0) β€” Add RDMA sub-segment PSN information 🧱
  • get_data(self, padding=True) β€” Return segment data πŸ“¦
  • get_size(self) β€” Return segment data πŸ“
  • valid_psn(self, psn) β€” True if given psn is valid for this segment βœ…

πŸ”— SEE ALSO πŸ”—

baseobj(3), packet.utils(3) β€” go read these too, bestie, they're the supporting cast 🎬


πŸ’€ BUGS πŸ’€

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


✍️ AUTHOR ✍️

Jorge Mora (mora@netapp.com) β€” the icon, the legend, the moment πŸ‘‘


and that's the whole page, bestie!! this came from NFStest 3.2, dated 21 March 2023 β€” so yeah, if you see her around, tell her she ate πŸ’…βœ¨πŸŽ€