F-Stack / f-stack

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.
http://www.f-stack.org
Other
3.87k stars 898 forks source link

Bond4 is unfriendly in low traffic environment #678

Open tinboxw opened 2 years ago

tinboxw commented 2 years ago

在低流量环境下,bond4会出现 lacp 未及时发出的情况,导致网络中断。具体原因在dpdk官网有说明(下面有问题摘要) 原因: dpdk创建虚拟设备(bond4),会周期性的创建和接收lacp消息。默认情况下,定时器(dpdk使用的alarm触发)周期创建的lacp报文并放在发送队列中(队列名称:slave_0_tx),当应用程序显示调用rte_eth_rx_burst 时,bond4驱动中会从发送队列中拿出lacp报文,并发送到网卡中。 低流量环境下,若没有及时调用 rte_eth_rx_burst ,则lacp也不能及时发出,最后导致网络中断。

https://doc.dpdk.org/guides-19.11/prog_guide/link_bonding_poll_mode_drv_lib.html

DPDK implementation of this mode provide some additional requirements of the application.

It needs to call rte_eth_tx_burst and rte_eth_rx_burst with intervals period of less than 100ms.
Calls to rte_eth_tx_burst must have a buffer size of at least 2xN, where N is the number of slaves. This is a space required for LACP frames. Additionally LACP packets are included in the statistics, but they are not returned to the application.
jfb8856606 commented 2 years ago

You can see #680