]> git.itanic.dy.fi Git - linux-stable/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)
commit88b7c58c199dd231fd87703f4a6209eec60ab138
tree07a5cb0e1334c3bbded477faf9ffbb1ae0441ecf
parent0e02a53d64b470b96739189c015f6d9225c11587
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