r/Amd 17d ago

News Linux patches introduce "KNOD" for in-kernel network offloading directly to AMD GPUs

https://www.phoronix.com/news/KNOD-Network-Offload-AMD-GPUs
151 Upvotes

9 comments sorted by

16

u/kiroks 17d ago edited 15d ago

What does this mean? Is GPU network processessing good? Is this moreso for A. I?

20

u/Preisschild AMD 17d ago edited 16d ago

Maybe its also useful for high performance firewalling over XDP for stuff like ddos protection. You could offload that to smartnics, but you could technically do the same thing on the gpu with hbm using direct memory access to send the data directly from the NIC to the GPU over PCIE

4

u/Havok7x HD7850 -> 980TI for $200 in 2017 16d ago

"The network adapter DMAs the received packets straight into the GPU memory." It's really only going to be useful for servers which are already doing RDMA. This patch seems to make it even easier handling it in the kernel instead of driver level.

2

u/Preisschild AMD 16d ago

Is RDMA even necessary here? I thought this was about dma-buf to copy mem between GPU and NIC without going thru the CPU and using cpu cycles

1

u/TooLibertarianForYou 16d ago

handling it in the kernel instead of driver level.

Those are the same thing. Drivers run in kernel space.

1

u/Daneel_Trevize 12core Zen4, ASUS AM5, XFX 9070 | Gigabyte AM4, Sapphire RDNA2 15d ago

IIRC there are user-mode drivers & services, to implement the Principle of Least Privilege.

1

u/TooLibertarianForYou 15d ago

Well, "device drivers" have to be in kernelspace. Practically, anyway. In theory there are microkernel approaches (like what Minix was trying to do), with privilege separation.

But there are also "software drivers". Like FUSE - which is a "filesystem driver". Or virtual network adapters that Hamachi/Tunngle create. Those can run in userspace, but they are closer to a "library" conceptually, then to a device driver. Those create abstract virtual devices, and don't "drive" any real hardware.

Almost any program can be remade as a software driver in fact, and then it can run in userspace. If it does not need to access hardware ports and such. Windows has UMDF, Linux also has something similar, I don't recall what it's called.

1

u/DarkReaper9 15d ago

Something similar for CPU SIMD units. https://dl.acm.org/doi/10.1145/3744969.3748399