rust-e1000
rust-e1000 copied to clipboard
fetch data from dma to memory before uploading it to upper layers
After spending some time, I figure out why the e1000 driver cannot run on the physical machine. First, the arp protocol is not implemented in the driver. Meanwhile, the current e1000 driver does not have the dma_sync_single_for_cpu
function. Thus the received data will be random. After adding this function, I can run the rust_e1000 driver on a physical e1000 nic.
But the ptr
of the PCI::device
is private. The driver can not access it. The safety abstraction of DMA and PCI needs to be changed to eliminate the unsafe block of this PR.
This PR is currently a draft. It still needs some work on the RFL side.