STRUCT DMA_TEST(9)
π¦ struct dma_test(9) β the Kernel API Manual glow-up π¦
okay bestie, so this is a page from the Kernel API Manual (that's the manual name, we're not copying the whole header line, you're welcome β¨) and today's main character is struct dma_test β literally the private data of the DMA test device driver. no cap, it's just a lil struct holding all the state, but she's iconic π
β¨ NAME β¨
struct dma_test β the DMA test device driver's private data, periodt.
π SYNOPSIS π
struct dma_test {
const struct tb_service *svc;
struct tb_xdomain *xd;
struct tb_ring *rx_ring;
int rx_hopid;
struct tb_ring *tx_ring;
int tx_hopid;
unsigned int packets_to_send;
unsigned int packets_to_receive;
unsigned int packets_sent;
unsigned int packets_received;
unsigned int link_speed;
enum tb_link_width link_width;
unsigned int crc_errors;
unsigned int buffer_overflow_errors;
enum dma_test_result result;
enum dma_test_test_error error_code;
struct completion complete;
struct mutex lock;
};
ngl that's the whole vibe right there π«Ά copy it exactly, don't freestyle it.
π Members π
okay so let's meet every single field, one by one, no skipping, we don't do that here π
svcβ the XDomain service the driver is bound to. her whole situation π«xdβ the XDomain that the service belongs to. the bigger picture, iykyk.rx_ringβ the software ring holding RX frames. receiving queen πrx_hopidβ the HopID used for receiving frames.tx_ringβ the software ring holding TX frames. sending queen, matching set πΈtx_hopidβ the HopID used for sending frames.packets_to_sendβ number of packets to send. the goal, the dream β¨packets_to_receiveβ number of packets to receive.packets_sentβ the actual number of packets sent. reality check πpackets_receivedβ the actual number of packets received.link_speedβ expected link speed in (Gb/s), and0means "use whatever is negotiated". lowkey the chill option π¦link_widthβ expected link width in (Gb/s), and0means "use whatever is negotiated". same energy πcrc_errorsβ number of CRC errors during the test run. the oopsie counter πbuffer_overflow_errorsβ number of buffer overflow errors during the test run. the bigger oopsie counter πresultβ result of the last run. the vibe check results, fr fr.error_codeβ error code of the last run.completeβ used to wait for the Rx to complete. very "wait for me bestie" of her βlockβ lock serializing access to this structure. she's the bouncer at the door, one at a time please π
π SEE ALSO π
- Kernel file
./drivers/thunderbolt/dma_test.cβ go read the source, it ate π₯
yes, every single member got her moment. nobody left behind, that's the rule π«Ά
and that's the whole page bestie!! π§π this one came from ./drivers/thunderbolt and it's dated October 2026 β so mark your calendar, screenshot it, send it to the group chat, it's giving archival slay π
β¨
π¦ 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