svc_rdma_encode_write_chunk(9)
π svc_rdma_encode_write_chunk β the Kernel API Manual page, bestie edition π
okay so this is a page from the Kernel API Manual, and it's about a function called svc_rdma_encode_write_chunk. it's short, it's sweet, and it's giving "small function, big job" energy. let's get into it π«Ά
β¨ NAME β¨
svc_rdma_encode_write_chunk β Encode one Write chunk
like, literally just one. singular. one chunk. π
πΈ SYNOPSIS πΈ
ssize_t svc_rdma_encode_write_chunk (struct svc_rdma_send_ctxt *sctxt ,
const struct svc_rdma_chunk *chunk );
that's the whole signature, no cap. it returns an ssize_t, so yes, it's gonna hand you back a signed size β keep that in mind for the return values later π
π ARGUMENTS π
sctxtβ Send context for the RPC Reply. this is the send context, bestie. it's the Reply's whole little setup. π¦chunkβ Write chunk to push. the actual Write chunk you're pushing out. that's it, that's the argument. π
π DESCRIPTION π
so here's the vibe: this function copies a Write chunk from the Call transport header over to the Reply transport header. that's the main character move. π₯
and it doesn't just copy β it also updates each segment's length field to reflect the number of bytes written in that segment. every single segment gets its length field refreshed. it's giving detail-oriented icon behavior. β¨
Return values:
- On success, returns length in bytes of the Reply XDR buffer that was consumed by the Write chunk.
-EMSGSIZEon XDR buffer overflow. π (that's the sad one, the buffer said "no more room")
ngl, that -EMSGSIZE is the one you're gonna be checking for. if the XDR buffer overflows, that's your error code right there. not me being dramatic, it's just in the manpage. π
π SEE ALSO π
Kernel file ./net/sunrpc/xprtrdma/svc_rdma_sendto.c
and the whole friend group π«Ά (fr fr, this is a long list, but every single one is here):
svc_rdma_send_ctxts_destroy(9)svc_rdma_send_ctxt_get(9)svc_rdma_send_ctxts_drain(9)svc_rdma_send_ctxt_put(9)svc_rdma_wake_send_waiters(9)svc_rdma_sq_wait(9)svc_rdma_post_send_err(9)svc_rdma_wc_send(9)svc_rdma_post_send(9)svc_rdma_encode_read_list(9)svc_rdma_encode_write_segment(9)svc_rdma_encode_write_list(9)svc_rdma_encode_reply_chunk(9)svc_rdma_page_dma_map(9)svc_rdma_iov_dma_map(9)svc_rdma_xb_dma_map(9)svc_rdma_xb_count_sges(9)svc_rdma_check_pull_up(9)svc_rdma_xb_linearize(9)svc_rdma_pull_up_reply_msg(9)svc_rdma_send_error_msg(9)svc_rdma_sendto(9)svc_rdma_result_payload(9)
and that's the page!! π source path ./net/sunrpc/xprtrdma, dated October 2026 β mwah, slay, periodt. go read svc_rdma_sendto.c if you wanna see it in the wild, iykyk ππ
π¦ 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