ethernet driver - without using DMA?

I am writing Ethernet driver.

I would like to do it in 2 steps:

  1. write it without DMA (simple memcpy)
  2. rewrite it using DMA.

I would like to ask if it is possible to do it first without using DMA (or is it that the kernel Ethernet framework insist that the driver shall use DMA) ?




Kernel's not stopping you do from doing anything. But specifically, I can't see it stopping you writing skbuffs. Nor mapping the device memory. Honestly you might have most difficulty if you want to find examples of network driver code that doesn't use DMA :-P. IIUC even Linux netpoll (for crash logging over network) doesn't avoid DMA in the drivers.

I wasn't sure memcpy() would work though...

You need to read your docs (e.g. and specifically)

Looks like you need to use memcpy_fromio() and memcpy_toio() on IO memory.

Category: networking Time: 2016-07-29 Views: 4

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.231 (s). 12 q(s)