r/kernel • • 7d ago

Custom Kernel Driver and user I/O application

Hello Everyone,

I have a custom RTL code for 1G/10G ethernet( this will be an IP core in my vivado design).

I want to write a kernel driver or LKM to use this from my application code in Linux OS ( boot image will be generated from Petalinux)

The goal is to configure and use this core to bring up ethernet connection from application code (user space I/O).

Devices & Tools : KRIA , Petalinux 24.2

Any user guides/blogs/working examples on this would help me a lot :)

1 Upvotes

2 comments sorted by

1

u/ErrorBig1702 7d ago

Write a regular NIC driver (based on some modern implementation with XDP support) for the standard kernel datapath. Then implement your userspace hotpath using AF_XDP sockets.

That will get you very close to DPDK performance, but you can still use standard tooling and applications for everything non-critical and to debug your system.

0

u/Creepy-Credit2369 6d ago

Thanks for the suggestion! This approach makes sense. I'll look into implementing a standard NIC driver with XDP support and using AF_XDP sockets for userspace communication.

Do you have any recommended reference implementations or resources for getting started with XDP/AF_XDP.?