linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xue Chaojing <xuechaojing@huawei.com>
To: <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <xuechaojing@huawei.com>,
	<netdev@vger.kernel.org>, <wulike1@huawei.com>,
	<chiqijun@huawei.com>, <fy.wang@huawei.com>, <tony.qu@huawei.com>,
	<luoshaokai@huawei.com>
Subject: [PATCH 4/4] net-next/hinic: fix a bug in rx data flow
Date: Mon, 19 Nov 2018 06:12:34 +0000	[thread overview]
Message-ID: <20181119061234.12839-4-xuechaojing@huawei.com> (raw)
In-Reply-To: <20181119061234.12839-1-xuechaojing@huawei.com>

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>
---
 drivers/net/ethernet/huawei/hinic/hinic_rx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/huawei/hinic/hinic_rx.c b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
index 93e8f207f6da..f86f2e693224 100644
--- a/drivers/net/ethernet/huawei/hinic/hinic_rx.c
+++ b/drivers/net/ethernet/huawei/hinic/hinic_rx.c
@@ -229,9 +229,9 @@ static int rx_alloc_pkts(struct hinic_rxq *rxq)
 		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;
 }
 
-- 
2.17.1


  parent reply	other threads:[~2018-11-19 14:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19  6:12 [PATCH 1/4] net-next/hinic:replace multiply and division operators Xue Chaojing
2018-11-19  6:12 ` [PATCH 2/4] net-next/hinic:add rx checksum offload for HiNIC Xue Chaojing
2018-11-19  6:12 ` [PATCH 3/4] net-next/hinic:fix a bug in set mac address Xue Chaojing
2018-11-19  6:12 ` Xue Chaojing [this message]
2018-11-19 23:01 ` [PATCH 1/4] net-next/hinic:replace multiply and division operators David Miller
2018-11-20  2:21   ` 答复: " xuechaojing
2018-11-20  3:00     ` David Miller
2018-11-20  5:47 Xue Chaojing
2018-11-20  5:47 ` [PATCH 4/4] net-next/hinic: fix a bug in rx data flow Xue Chaojing
2018-11-20 18:38   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181119061234.12839-4-xuechaojing@huawei.com \
    --to=xuechaojing@huawei.com \
    --cc=chiqijun@huawei.com \
    --cc=davem@davemloft.net \
    --cc=fy.wang@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luoshaokai@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=tony.qu@huawei.com \
    --cc=wulike1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).