Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp701211imu; Tue, 20 Nov 2018 05:42:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/UcQWH4MTLzRgyZk/Jq6ccQeRyPH0tZ4mjr3mf3ir4JWGuInTqfY6+Pl2tHINAHQF3vv8dk X-Received: by 2002:a17:902:8607:: with SMTP id f7mr2219160plo.123.1542721361880; Tue, 20 Nov 2018 05:42:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542721361; cv=none; d=google.com; s=arc-20160816; b=j6PZAdEz3guoniswLwU3W04r5VroHd8Pmsftts30/blYR6TnQJ5Pn7HADjltTBSxRV pigBQPDxPMg+lxpL3CXPATHxwWSR0GjWbYjt9asVy59ViIfejRqhEwGC2vysmS5otvPO Hfnt0xFrCatSUHQL8lNu4u3KM55qejLqo2XXhQ5jKmUdyCqOwNuX3Z3vI3dBwToEHpx1 Bq4xhlzVS9bQl6xj8YiPT3doUss/CYT6ylQ4DWPhWenl3k1Tai5UsmCsz+48JTykAQvN sXHxBAPb47oXm2WI7yH4qSKY2WErupUr2Chk3A6dfJPZ4rR7mET1U67gzZmp8V3ihFmt xsmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=FXIHfaLYjPOFfu9Yr2AanL6SzLo2xCdS4R2ZQjED3Xs=; b=uHWSfbKJGya8uuspa1hP0LUFIs7PzgE/sSXeaBoZ96CahAd42Ofczu/RuDN8f1Ag5K La0MBZJ+TFcLLawmr38C6Eg34pUmZfXw/e7Yqja/rz7IUBFzrgOCJahqe34FCQvjLeAo 8gTrtjhCtYP2g3DFoUlYejb1HYii4a8Z+cJejqOJSewb8QL3iQqwJQMSqoM5BOEyWcx+ QO5cS2qGBtVWvgPZR62EBuxKd/XP+VG2A4xXylwGBiGvrzc6szSCRt/I+9oxOY9JT+Md gIRv68LaziS8tELHpL2N93538B/81Wf3wOfF5M4gmLMfvOyCmGzgzPFuPCqPB13DWvJr 1e3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l36-v6si38660006plg.436.2018.11.20.05.42.26; Tue, 20 Nov 2018 05:42:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729134AbeKUAKo (ORCPT + 99 others); Tue, 20 Nov 2018 19:10:44 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:58309 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726205AbeKUAKn (ORCPT ); Tue, 20 Nov 2018 19:10:43 -0500 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id DDFBA9FCA42F3; Tue, 20 Nov 2018 21:41:27 +0800 (CST) Received: from localhost.localdomain (10.175.34.53) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.408.0; Tue, 20 Nov 2018 21:41:18 +0800 From: Xue Chaojing To: CC: , , , , , , , Subject: [PATCH 4/4] net-next/hinic: fix a bug in rx data flow Date: Tue, 20 Nov 2018 05:47:34 +0000 Message-ID: <20181120054734.17360-4-xuechaojing@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181120054734.17360-1-xuechaojing@huawei.com> References: <20181120054734.17360-1-xuechaojing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.34.53] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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