]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: optimize converting dscp to priority process of hns3_nic_select_queue()
authorGuangbin Huang <huangguangbin2@huawei.com>
Fri, 16 Sep 2022 02:38:01 +0000 (10:38 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 21 Sep 2022 21:32:21 +0000 (14:32 -0700)
commitce2061a6c990a0442fe1960cf53c67332c2fd5c9
tree843897ef95fedb5164335b0e23227cedaa67da38
parenta56160076521fa9b0034954ac43b62fbcf775a25
net: hns3: optimize converting dscp to priority process of hns3_nic_select_queue()

Currently, when function hns3_nic_select_queue() converts dscp to priority,
it calls an indirect callback ae_algo->ops->get_dscp_prio to get priority.

However as function hns3_nic_select_queue() is in fast path, the indirect
call may cause degradation of performance. For optimization, this patch
moves dscp_app_cnt and dscp_prio from struct hclge_tm_info to struct
hnae3_knic_private_info, so they can be used in both hclge and hns3 layers.

Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_dcb.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.h
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c