net/hns3: support flow control
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Thu, 26 Sep 2019 14:01:58 +0000 (22:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:56 +0000 (15:00 +0200)
commit62e3ccc2b94c625d4b3ce55044b135c4ab0793db
tree3c4313b78e126a09891b408162a94fe99cabbf19
parentc37ca66f2b27473b31de12d3dff66808753949ca
net/hns3: support flow control

This patch adds support for MAC PAUSE flow control and priority flow
control(PFC).

MAC PAUSE flow control features:
All user priorities(up) are mapped to tc0. It supports settings of flow
mode and pause time.

DCB features:
Up can be mapped to other tc driver permits according to business
requirement. We can config DCB information and enable PFC by
rte_eth_dev_configure interface. Besides, enabling flow control of a
priority is supported by rte_eth_dev_priority_flow_ctrl_set interface.
we can also set flow mode and pause time by
rte_eth_dev_priority_flow_ctrl_set. we do not support manual setting of
ETS, but driver equally distributes bandwidth for each tc according to
number of used tc.

In addition, flow control function by default is turned off to ensure
that app startup state is the same each time.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Signed-off-by: Hao Chen <chenhao164@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
doc/guides/nics/features/hns3.ini
drivers/net/hns3/Makefile
drivers/net/hns3/hns3_dcb.c [new file with mode: 0644]
drivers/net/hns3/hns3_dcb.h [new file with mode: 0644]
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/meson.build