pci_epf_test_data_transfer(9)
π pci_epf_test_data_transfer β the kernel API manual, but make it make sense
okay bestie, so this one's a kernel function from the API manual (section 9, the kernel API one, not the command-line one) and honestly? she's a whole vibe. pci_epf_test_data_transfer is the function that uses the dmaengine API to move data between a PCIe EP and a remote PCIe RC. yes that's a lot of letters. we'll get there. π
β¨ NAME β¨
pci_epf_test_data_transfer β a function that uses the dmaengine API to transfer data between PCIe EP and remote PCIe RC. that's it, that's her job, and she does it.
π¦ SYNOPSIS π¦
int pci_epf_test_data_transfer (struct pci_epf_test *epf_test ,
dma_addr_t dma_dst , dma_addr_t dma_src , size_t len , dma_addr_t
dma_remote , enum dma_transfer_direction dir );
like, six arguments, no cap. copy it exactly if you're calling her, okay? don't freestyle the parameter order, i'm begging. π
πΈ ARGUMENTS πΈ
epf_testβ the EPF test device that performs the data transfer operation. she's the one doing the work, the main character of this call, honestly. πdma_dstβ the destination address of the data transfer. it can be a physical address given bypci_epc_mem_alloc_addror DMA mapping APIs. so like, either-or, both valid, don't overthink it.dma_srcβ the source address of the data transfer. it can be a physical address given bypci_epc_mem_alloc_addror DMA mapping APIs. same energy asdma_dstbut the other end, iykyk. β¨lenβ the size of the data transfer. like how much stuff we're yeeting across.dma_remoteβ remote RC physical address. yes, the remote side's address, it's giving long-distance relationship. πdirβ DMA transfer direction.enum dma_transfer_direction, so pick a direction bestie, we're not staying still.
π₯ DESCRIPTION π₯
okay so real talk: this is the function that uses the dmaengine API to transfer data between PCIe EP and remote PCIe RC. the source and destination address can be a physical address given by pci_epc_mem_alloc_addr, or the one obtained using DMA mapping APIs. literally either works, the function is flexible like that. π«Ά
the function returns 0 on success and a negative value on failure. so when you see 0, celebrate β she ate. when you see a negative number, that's the function telling you something went wrong, and you should probably read the error instead of pretending you didn't see it. π
ngl, always check the return value. 0 is the slay, negative is the "girl what happened" moment. π
β SEE ALSO β
- Kernel file
./drivers/pci/endpoint/functions/pci-epf-test.c pci_epf_test_init_dma_chan(9)pci_epf_test_clean_dma_chan(9)
like obviously go read the source file, she's the blueprint. and the init/clean friends are right there β pci_epf_test_init_dma_chan(9) and pci_epf_test_clean_dma_chan(9) β the whole little friend group fr fr. π§
and that's the page bestie!! π this one lives over in ./drivers/pci/endpoint/functions, and the manual's dated October 2026 β yes, future vibes only. go forth, transfer that data, and remember: negative return values are not a personality trait, fix them. ππ
π¦ 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