refer: tuntap
I have create multithread for each tun/tap queue. And each thread use their own libev loop. And when use ping
to create low-speed flow, every queue will be awakened. But when use iperf3
create high-speed flow, all packet will be distributed to one thread.
below is the ping
log, thread 140213476759296
and 140213468366592
will receive packet cross.
(140213476759296) tapsw.c +171 tap_recv_cb()
(140213468366592) tapsw.c +171 tap_recv_cb()
(140213476759296) tapsw.c +171 tap_recv_cb()
(140213468366592) tapsw.c +171 tap_recv_cb()
But with iperf3
:
(140213468366592) tapsw.c +171 tap_recv_cb()
(140213468366592) tapsw.c +171 tap_recv_cb()
(140213468366592) tapsw.c +171 tap_recv_cb()
(140213468366592) tapsw.c +171 tap_recv_cb()
Why tun/tap multiqueue can not balance between each queue?