]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net-next/hinic: fix a bug in rx data flow
authorXue Chaojing <xuechaojing@huawei.com>
Tue, 20 Nov 2018 05:47:34 +0000 (05:47 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:30 +0000 (08:51 +0100)
[ Upstream commit b1a200484143a727ce293e0f200a543cc7584152 ]

In rx_alloc_pkts(), there is a loop call of tasklet, which causes
100% cpu utilization, even no packets are being received. This patch
fixes this bug.

Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/huawei/hinic/hinic_rx.c

index 4c0f7eda1166c5df202c3b9a71cc2e43516531fb..06b24a92ed7d4438a4740ac7f4b0dcd27bf951c8 100644 (file)
@@ -207,9 +207,9 @@ skb_out:
                wmb();  /* write all the wqes before update PI */
 
                hinic_rq_update(rxq->rq, prod_idx);
+               tasklet_schedule(&rxq->rx_task);
        }
 
-       tasklet_schedule(&rxq->rx_task);
        return i;
 }