0

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?

jianxi sun
  • 340
  • 1
  • 19

1 Answers1

0

kernel tun will use four tuple hash key to identify one flow. So iperf3 will be only in one queue.

jianxi sun
  • 340
  • 1
  • 19