]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: minor optimization for datapath
authorYunsheng Lin <linyunsheng@huawei.com>
Thu, 4 Apr 2019 08:17:53 +0000 (16:17 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Apr 2019 17:20:39 +0000 (10:20 -0700)
commit67bcbe2f77530f94ec3688405b5eedbd78545cfd
tree9c07f6e5302ae1977ffed5a2abfc10d11e43df2b
parenta3495e5961de8492580681498b224fa60d47bad4
net: hns3: minor optimization for datapath

This patch adds a likely case for hns3_fill_desc and
limits the local variables' scope as much as possible,
also avoid div operation when the tqp_vector->num_tqps
is one.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c