summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2019-03-21 06:28:43 +0300
committerDavid S. Miller <davem@davemloft.net>2019-03-21 23:59:24 +0300
commit5f543a54eec08228ab0cc0a49cf5d79dd32c9e5e (patch)
tree8766e7d7a2619c06d7e81391db73b02f9db2c2ab /tools/perf/scripts/python/export-to-postgresql.py
parent408f13ef358aa5ad56dc6230c2c7deb92cf462b1 (diff)
downloadlinux-5f543a54eec08228ab0cc0a49cf5d79dd32c9e5e.tar.xz
net: hns3: fix for not calculating tx bd num correctly
When there is only one byte in a frag, the current calculation using "(size + HNS3_MAX_BD_SIZE - 1) >> HNS3_MAX_BD_SIZE_OFFSET" will return zero, because HNS3_MAX_BD_SIZE is 65535 and HNS3_MAX_BD_SIZE_OFFSET is 16. So it will cause tx error when a frag's size is one byte. This patch fixes it by using DIV_ROUND_UP. Fixes: 3fe13ed95dd3 ("net: hns3: avoid mult + div op in critical data path") Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions