alexforencich / verilog-ethernet

Verilog Ethernet components for FPGA implementation
MIT License
2.29k stars 702 forks source link

Linux Device Driver Support #98

Open Yuan-Mao opened 3 years ago

Yuan-Mao commented 3 years ago

Hi,

Is there any Linux driver support for your Ethernet MAC?

Thanks!

alexforencich commented 3 years ago

What do you mean? It's a MAC, it doesn't really need a driver, at least as far as I am aware.

Yuan-Mao commented 3 years ago

For example has it ever been used in Linux before? Just want to cross comparing between different Ethernet device drivers for Linux in order to better understand how drivers for Ethernet are usually done in Linux.

alexforencich commented 3 years ago

Oh, you want a whole NIC in that case. Take a look at https://github.com/corundum/corundum .

alexforencich commented 3 years ago

But if you want to look at other device drivers, the place to go is here: https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet

Yuan-Mao commented 3 years ago

Got it. Thanks for the links!

GbGp commented 1 year ago

Hello, sorry to hijack this older issue but I have a similar question; I'm playing around with the 10Gbe MAC/phy on a zynq SoC. In principle I could just hook the TX/RX fifos to a DMA and have "raw" access to the link from the ARM CPU (running linux), but I'm trying to figure out how much work would be required to have actual net interface.

I imagine that I would need to write at least a net kernel driver (that is going to look similar to one of the modules in net/ethernet/xilinx). But I'm wondering if some work has already been done somewhere, maybe even in the form of very a generic net driver?

alexforencich commented 1 year ago

Take a look at: https://github.com/corundum/corundum

GbGp commented 1 year ago

Oh, I already read that but I didn't realize that some work on an axi interface was already in progress (after a quick search I can see https://github.com/corundum/corundum/pull/98 for example). I will study that repo more in dept. Thanks!

alexforencich commented 1 year ago

Yep, it's reasonably well-supported on Zynq devices; there are targets for petalinux and/or ubuntu on the ZCU102, ZCU106, and KR260.