luigirizzo / netmap

Automatically exported from code.google.com/p/netmap
BSD 2-Clause "Simplified" License
1.82k stars 532 forks source link

Thoughts on AF_XDP #496

Open lttlrck opened 6 years ago

lttlrck commented 6 years ago

Hi

I’m sure you are aware of the new AF_XDP socket type

https://lwn.net/Articles/745934/

I’m wondering if you have any thoughts on this? I assume this could primarily help with driver support, meaning that netmap could potentially support a NIC via AF_XDP rather than netmap specific patches? Is that about it or do you see other benefits or pitfalls?

Thanks!

vmaffione commented 5 years ago

Yes, my impression so far is that they are trying to rewrite something very similar to netmap, although they started from a different starting point (i.e. in-kernel BPF filtering). I'm not sure they already support zerocopy, though. Without that I don't think the performance can be significantly faster than just using the netmap emulated adapter. But I think they'll support zercopy soon, if they don't do already.

And yes, trying to make an XDP netmap_adapter would be a great idea to gain more device support. In this case the memory for the buffers would be provided by netmap instead of the userspace XDP application. In any case we should study the details of XDP to see if it's really feasible. Any patches or proposals would be welcome here.

lttlrck commented 5 years ago

FYI https://fosdem.org/2019/schedule/event/xdp_overview_and_update/

vmaffione commented 5 years ago

Yes, I'll be there.