virtio_mark_txdone(9)
π NAME
virtio_mark_txdone β Mark transmission done. This is the virtio_mark_txdone(9) page from the Kernel API Manual, bestie, and it's literally about marking transmission done. Slay. β¨
β¨ SYNOPSIS
Okay so the exact signature is right here, no cap:
void virtio_mark_txdone (struct scmi_chan_info *cinfo , int ret , struct
scmi_xfer *xfer );
πΈ ARGUMENTS
cinfoβ SCMI channel info. It's the channel info, periodt. πretβ Transmission return code. The little code that says how the transmission went. π«xferβ Transfer descriptor. The descriptor for the transfer. π¦
π« DESCRIPTION
Bestie, the whole assignment is: free only completed polling transfer messages. That's the vibe. π
Quick lore drop: in the SCMI VirtIO transport we never explicitly release still outstanding but timed-out messages by forcibly re-adding them to the free-list inside the TX code path. Nope. Instead we let IRQ/RX callbacks, or the TX deferred worker, eventually clean up such messages once, finally, a late reply is received and discarded (if ever). It's giving patience. π§
This approach was deemed preferable, and honestly? Valid. Those pending timed-out buffers are still effectively owned by the SCMI platform VirtIO device even after timeout expiration. So forcibly freeing and reusing them before they had been returned explicitly by the SCMI platform could lead to subtle bugs due to message corruption. π« An SCMI platform VirtIO device which never returns message buffers is anyway broken, and it will quickly lead to exhaustion of available messages. No buffer return? Broken behavior, exhausted messages, bye. π
For this same reason, here we take care to free only the polled messages that had been somehow replied β only if not by chance already processed on the IRQ path, because the initial scmi_vio_msg_release takes care of this β and also any timed-out polled message if that indeed appears to have been at least dequeued from the virtqueues (VIO_MSG_POLL_DONE): this is needed since such messages won't be freed elsewhere. Any other polled message is marked as VIO_MSG_POLL_TIMEOUT. π
Possible late replies to timed-out polled messages will be eventually freed by RX callbacks if delivered on the IRQ path or by the deferred TX worker if dequeued on some other polling path. Late replies get cleaned up eventually β not by us being messy. π
π¦ SEE ALSO
Kernel file ./drivers/firmware/arm_scmi/transports/virtio.cβ the kernel file reference, iykyk. πTheory of Operation(9)β the theory-of-operation reference, bestie. πΈstruct scmi_vio_channel(9)β the channel struct reference. πstruct scmi_vio_msg(9)β the message struct reference. πvirtio_poll_done(9)β the poll-done reference. β
Cute sign-off: that's the whole page, bestie π source/version: ./drivers/firmware/arm_scmi/tr...; date: October 2026; and it's the virtio_mark_txdone(9) manual page. Mwah π
π¦ 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