KCAPI_SET_MAXSPLICES(3)
π KCAPI_SET_MAXSPLICESIZE π
okay bestie, welcome to the <pink>kcapi_set_maxsplicesize</pink> page β she's a little function that sets the maximum buffer size for splice. no cap. πΈ
β¨ SYNOPSIS β¨
int kcapi_set_maxsplicesize(struct kcapi_handle * handle,
unsigned int size);
π ARGUMENTS π
handleβ [in] the cipher handle, and you the caller are the one who allocated it, so it's your baby π«Άsizeβ [in] the new maximum buffer size, in bytes. yes bytes, the classic unit π
π¦ DESCRIPTION π¦
so here's the vibe: when you use vmsplice/splice to dodge copying data into the kernel (iconic behaviour, honestly), the kernel is like "mmm no, there's a maximum number of bytes you can splice, periodt." so if bigger data shows up wanting to be processed, sendmsg gets called instead. not the main character moment you planned, but okay. π
and that's literally where this call comes in β using this call, the buffer size can be increased. slay. β¨
β οΈ NOTE β οΈ
splice uses a pipe pair, bestie. so the maximum number of bytes that can be stored with the pipe is what governs the maximum data size to be spliced. the way that pipe buffer size worksβ¦ π
increasing the pipe buffer size is only allowed up to the maximum specified with /proc/sys/fs/pipe-max-size. so don't go feral, there's a ceiling and the ceiling said no. π
and for the return: return 0 upon success; a negative errno-style error code if an error occurred. π
π AUTHOR π
Stephan Mueller <smueller@chronox.de>
- Author.
π COPYRIGHT π
libkcapi Manual 1.5.0 β July 2025.
and that's the whole page, bestie β kcapi_set_maxsplicesize, documented, understood, ate. go forth and splice responsibly π β¨
π¦ where this page comes from
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- fedora 43: libkcapi-devel 1.5.0-6.fc43 Β· BSD-3-Clause OR GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms