net: hns: Avoid Hip06 chip TX packet line bug
authorlipeng <lipeng321@huawei.com>
Sat, 1 Apr 2017 11:03:47 +0000 (12:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Apr 2017 21:48:43 +0000 (14:48 -0700)
commit820c90cb3e2e452c80824391953cab9d5b5af154
tree084e557cd36de868cc7094d3899a57170b9de5d7
parent76b588bc523bee796834ebd319f6a71ad3eddbae
net: hns: Avoid Hip06 chip TX packet line bug

There is a bug on Hip06 that tx ring interrupts packets count will be
clear when drivers send data to tx ring, so that the tx packets count
will never upgrade to packets line, and cause the interrupts engendered
was delayed.
Sometimes, it will cause sending performance lower than expected.

To fix this bug, we set tx ring interrupts packets line to 1 forever,
to avoid count clear. And set the gap time to 20us, to solve the problem
that too many interrupts engendered when packets line is 1.

This patch could advance the send performance on ARM  from 6.6G to 9.37G
when an iperf send thread on ARM and an iperf send thread on X86 for XGE.

Signed-off-by: lipeng <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns/hnae.c
drivers/net/ethernet/hisilicon/hns/hnae.h
drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c
drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h
drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
drivers/net/ethernet/hisilicon/hns/hns_ethtool.c