Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8875049imu; Thu, 15 Nov 2018 20:05:23 -0800 (PST) X-Google-Smtp-Source: AJdET5ca2V9oixNbSOsVrebqNeaDAZZu7jtStey/d+GoQTLO9PrzybSVnUmleCTGQiXWOgMPH0cW X-Received: by 2002:a62:714a:: with SMTP id m71-v6mr9824291pfc.89.1542341123103; Thu, 15 Nov 2018 20:05:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542341123; cv=none; d=google.com; s=arc-20160816; b=TglOu4CXW5yu/mOePlkkvewNd93/j0qpIitrr7kxtJ9i7cjGeJW43OcC+r8J3K8qUn sHpFdrHJL0IE/DqGoeDKVzPkQTzWTLgFf5p4Bk1SQAfgvxbKVmZ+nBARo+OxMIABk7l+ f91/5WX/WzbOabL7nmvTVVMiv9N0pxyVa2ShvPJSk+83y434TivLzIELt7PYIOeyMbLl 1Rk3oBnn9lWyx1skP5e0MYqFA3oC+pSvMaS4pwV3mFFKoxZKqHS7SMDGi9fAYckK+Vea 9JLF/aGaQXvnKdg7HYv47aPx1Q+ARpNlsJ3Uh/mzMg9uBquEX1cg+e16Mk4mpqkM5cVa 6z+A== 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=L+6K1qO4N1BvLynRe2kpd+6Wus2+LgCzlatmJ0xQTtrrzv8HfXRTCBq8Mw4iAalV1e dy3zPD5JDV5hipp0NKmjmNzRMNBV30tCfQiTqc55E+uZDcl5e8jqnfrngs5oMNpjxXlS BN9z4DgXxLIS5e+6Zm3BoD+nL3RutCnVKlYOSGCQ8HCA9F9KLaH1wHxpu5NeOV8l5B4K TDbmNVwcA6t+iO0z5vI6vwv20seYGoWwNEYcwJENiD75IU5Z74/9fxoLRCnp6fk118mX Y1adMvU1ZZ2TuXp5hEno7vqQJvj0em2G9XmM65DN1Fvox2SfHVXLBPSH1RdGEQQAh6fT EuDQ== 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 h16si28335565pgj.203.2018.11.15.20.05.08; Thu, 15 Nov 2018 20:05:23 -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 S2389083AbeKPOK5 (ORCPT + 99 others); Fri, 16 Nov 2018 09:10:57 -0500 Received: from szxga07-in.huawei.com ([45.249.212.35]:36587 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727142AbeKPOK5 (ORCPT ); Fri, 16 Nov 2018 09:10:57 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id EB46B6FF4EEB; Fri, 16 Nov 2018 12:00:10 +0800 (CST) Received: from localhost.localdomain (10.175.34.53) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Fri, 16 Nov 2018 12:00:04 +0800 From: Xue Chaojing To: CC: , , , , , , , Subject: [PATCH 3/3] net-next/hinic: fix a bug in rx data flow Date: Thu, 15 Nov 2018 20:05:48 +0000 Message-ID: <20181115200548.5326-3-xuechaojing@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181115200548.5326-1-xuechaojing@huawei.com> References: <20181115200548.5326-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