bytedance / libtpa

Libtpa(Transport Protocol Acceleration), a DPDK based userspace TCP stack implementation.
https://bytedance.github.io/libtpa/
BSD 3-Clause "New" or "Revised" License
76 stars 7 forks source link

Is it possible for libtpa to take dpdk xdp as driver? #1

Closed SoonyangZhang closed 6 months ago

SoonyangZhang commented 6 months ago

Hello: Is it possible for libtpa to take dpdk xdp as driver? With XDP, dpdk app can also coexist with linux kernel stack.

yuanhanliu commented 6 months ago

Yes, it is. And we are working on it. It should come out soon.

SoonyangZhang commented 6 months ago

I have got packets by testing dpdk-testpmd (https://doc.dpdk.org/dts/test_plans/af_xdp_test_plan.html) with a virtio_net device. In libtpa, I build dpdk with af xdp lib. But when I test it with techo, I got an error: EAL:failed to parse device net_af_xdp0. It seems the executable file is not linked with librte_af_xdp.a.

yuanhanliu commented 6 months ago

Right. The pmd is not linked because it's not compiled: we used to compile mlx5 pmd only as that's the only one we support. You could check the next branch though: I have changed the dpdk build, to let it build all pmds by default.

Missing xdpf driver is one thing. The most important part is to write an ebpf program to steer some flows to libtpa. We have finished the initial work. I just haven't got the time to do some final cleanups to make it public. Hopefully, I could make it by the end of this week so that you can try it out.

SoonyangZhang commented 6 months ago

With cmake, I link libtpa with net_xdp, but when a tcp client sends syn, libtpa can send syn + ack. But the three handshake can not be established. The syn + ack packet seems dropped by kernel (tcp client).

yuanhanliu commented 6 months ago

It's now pushed. You might want to have a try. FYI, you can find a quick guide at doc/howto_xdp.rst

SoonyangZhang commented 6 months ago

nice job