]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: minor optimization for barrier in IO path
authorYunsheng Lin <linyunsheng@huawei.com>
Sat, 19 Oct 2019 08:03:51 +0000 (16:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Oct 2019 16:22:09 +0000 (09:22 -0700)
commitbd35a8ef2a4e864781b79861898a40a15abdbacf
tree07a5cb0e1334c3bbded477faf9ffbb1ae0441ecf
parent25448640d23d06059ef16dd54238442c1de41553
net: hns3: minor optimization for barrier in IO path

Currently, the TX and RX ring in a queue is bounded to the
same IRQ, there may be unnecessary barrier op when only one of
the ring need to be processed.

This patch adjusts the location of rmb() in hns3_clean_tx_ring()
and adds a checking in hns3_clean_rx_ring() to avoid unnecessary
barrier op when there is nothing to do for the ring.

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