提交 3c116ca1 编写于 作者: F fukaige 提交者: Xie XiuQi

tun: Increase tap device default txqueuelen to 5000

hulk inclusion
category: bugfix
bugzilla: 8110
CVE: NA

-------------------------------------------------

The original read queue size for Tap dev is only 500, this will cause to
drop some packets when send huge number packets:

tap3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::fc16:3eff:fe06:be1c  prefixlen 64  scopeid 0x20<link>
        ether fe:16:3e:06:be:1c  txqueuelen 500  (Ethernet)
        RX packets 37  bytes 4004 (3.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5100871  bytes 7712457890 (7.1 GiB)
        TX errors 0  dropped 1213 overruns 0  carrier 0  collisions 0

It shows that the tap3's packets loss rate reach 0.2%(1213/5100871),
when we make the read queue size more bigger, it will not drop any packets,
it means that the small read queue size is not suitable for high-speed
network, so increase the number to 5000, and it will also useful for
macvlan dev.
Signed-off-by: Nfukaige <fukaige@huawei.com>
Reviewed-by: NZhaoshenglong <zhaoshenglong@huawei.com>
Signed-off-by: NDing Tianhong <dingtianhong@huawei.com>
[Ding: modify the commit message]
Signed-off-by: NHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: NWei Li <liwei391@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 f72ddcb4
......@@ -22,7 +22,7 @@
#include <linux/filter.h>
/* Read queue size */
#define TUN_READQ_SIZE 500
#define TUN_READQ_SIZE 5000
/* TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. */
#define TUN_TUN_DEV IFF_TUN
#define TUN_TAP_DEV IFF_TAP
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册