xdp-project / xdp-tutorial

XDP tutorial
2.33k stars 562 forks source link

for things like websocket which depends on the number of file descriptors, does AF_XDP have file descriptors per connection? #339

Open kolinfluence opened 1 year ago

kolinfluence commented 1 year ago

for things like websocket which depends on the number of file descriptors, does AF_XDP have file descriptors per connection?

sorry was just curious. i've tried out asavie/xdp repo but not sure about whether af_xdp will be using file descriptors per connection or otherwise.

tohojo commented 1 year ago

AF_XDP has no notion of a "connection", it just processes packets. If you want to run something "connection-based" on top (like TCP), you'll have to implement that yourself...

kolinfluence commented 1 year ago

ok thx! do u think it's difficult to do a connection based inside ebpf/af_xdp?

tohojo commented 1 year ago

ultperf @.***> writes:

ok thx! do u think it's difficult to do a connection based inside ebpf/af_xdp?

Yes. I don't know why you'd want to do that...