]> 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)
commit556880f198bd4404bc5ab95f5f9408e389f67f40
tree07a5cb0e1334c3bbded477faf9ffbb1ae0441ecf
parent812d59b266c05b2df9e4435352e9408a53110974
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