net: hns3: avoid mult + div op in critical data path
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 23 Feb 2019 09:22:09 +0000 (17:22 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Feb 2019 04:27:50 +0000 (20:27 -0800)
commit3fe13ed95dd3c4aede3313a2dd2d589c207b51d0
tree6bb9e7f4f133e2b47bfa76ac67a08a0095a5b9b7
parent2a73ac3e6c9d7cd80af731bcb699c180d95c8166
net: hns3: avoid mult + div op in critical data path

This patch uses shift offset to avoid doing mult and div operation.

Signed-off-by: Yunsheng Lin <linyunsheng@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
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h