]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: optimize the code when update the tc info
authorGuoJia Liao <liaoguojia@huawei.com>
Fri, 5 Feb 2021 08:32:46 +0000 (16:32 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 6 Feb 2021 22:36:05 +0000 (14:36 -0800)
commitbcc9522ac48550570bf020454726712fce2c4b64
treee6da2098268b04724c3253ea0d2f4d931520f4f6
parentdcca0be8bbf51a223628ab7280f7d94a27402d2d
net: hns3: optimize the code when update the tc info

When update the TC info for NIC, there are some differences
between PF and VF. Currently, four "vport->vport_id" are
used to distinguish PF or VF. So merge them into one to
improve readability and maintainability of code.

Signed-off-by: GuoJia Liao <liaoguojia@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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