net/hns3: add free threshold in Rx
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Thu, 9 Jan 2020 03:15:53 +0000 (11:15 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:46:26 +0000 (19:46 +0100)
commitffd0ec015b9f51d3f39e320a02448fc5d43932be
tree54accefa8fe6da261126a9c4b96b83a05bebcc8e
parent5cf7a75b2c3b33c4c3579eba6716a4c7ca02ec5b
net/hns3: add free threshold in Rx

This patch optimizes the Rx performance by adding the rx_free_thresh
related process in the '.rx_pkt_burst' ops implementation function named
hns3_recv_pkts. The related change as follows:
1. Adding the rx_free_thresh related process to reduce the number of
   writing the HNS3_RING_RX_HEAD_REG register.
2. Adjusting the internal macro named DEFAULT_RX_FREE_THRESH to 32 and
   adjusting HNS3_MIN_RING_DESC to 64 to make the effect of the thresh
   more obvious.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
drivers/net/hns3/hns3_rxtx.c
drivers/net/hns3/hns3_rxtx.h