[dpdk-dev] [PATCH 11/22] net/hns3: add support for flow control of hns3 PMD driver

Wei Hu (Xavier) xavier.huwei at huawei.com
Sat Aug 31 10:04:15 CEST 2019



On 2019/8/30 23:07, Ferruh Yigit wrote:
> On 8/23/2019 2:47 PM, Wei Hu (Xavier) wrote:
>> This patch adds support for MAC PAUSE flow control and priority flow
>> control of hns3 PMD driver. All user priorities(up) must be mapped to
>> tc0 when MAC PAUSE flow control is enabled. Ups can be mapped to other
>> tcs driver permit when PFC is enabled. Flow control function by default
>> is turned off to ensure that app startup state is the same each time.
> As far as I can see the patch both enable DCB and flow control, can you please
> either split the patch or update the commit log to cover both features?
Hi, Ferruh Yigit

    Thanks for your comments.
    We will modify the commit log in patch V2 as follows:

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 at huawei.com>
>> Signed-off-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
>> Signed-off-by: Chunsong Feng <fengchunsong at huawei.com>
>> Signed-off-by: Min Hu (Connor) <humin29 at huawei.com>
>> Signed-off-by: Hao Chen <chenhao164 at huawei.com>
> <...>
>
>>  static const struct eth_dev_ops hns3_eth_dev_ops = {
>>  	.dev_close          = hns3_dev_close,
>>  	.mtu_set            = hns3_dev_mtu_set,
>>  	.dev_infos_get          = hns3_dev_infos_get,
>>  	.fw_version_get         = hns3_fw_version_get,
>> +	.flow_ctrl_get          = hns3_flow_ctrl_get,
>> +	.flow_ctrl_set          = hns3_flow_ctrl_set,
>> +	.priority_flow_ctrl_set = hns3_priority_flow_ctrl_set,
> Can you please update .ini file in this patch and mark following features as
> supported:
> Flow control
OK, We will fix it in patch V2.
>>  	.mac_addr_add           = hns3_add_mac_addr,
>>  	.mac_addr_remove        = hns3_remove_mac_addr,
>>  	.mac_addr_set           = hns3_set_default_mac_addr,
>> @@ -2753,6 +2949,7 @@ static const struct eth_dev_ops hns3_eth_dev_ops = {
>>  	.reta_update            = hns3_dev_rss_reta_update,
>>  	.reta_query             = hns3_dev_rss_reta_query,
>>  	.filter_ctrl            = hns3_dev_filter_ctrl,
>> +	.get_dcb_info           = hns3_get_dcb_info,
> Can you please update .ini file in this patch and mark following features as
> supported:
> DCB
>
OK, We will fix it in patch V2.

    Regards
Xavier




More information about the dev mailing list