pci_epf_test_data_transfer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 by pci_epc_mem_alloc_addr or 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 by pci_epc_mem_alloc_addr or DMA mapping APIs. same energy as dma_dst but 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 ⭐

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