Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2783991imu; Mon, 19 Nov 2018 06:07:35 -0800 (PST) X-Google-Smtp-Source: AJdET5dE85GOjlokFQPVb7UqFU6cbX2tuwZpOulfg4H2QqHZva/R+goZF95YyX04sCg7RJ6x5XxT X-Received: by 2002:a62:16d6:: with SMTP id 205mr14911449pfw.256.1542636455814; Mon, 19 Nov 2018 06:07:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542636455; cv=none; d=google.com; s=arc-20160816; b=TNbns4lsYmqzNAuJ0Q/Ph7bIdUAzP2AQmpSA9Y0pKiMZcbA/JLBfSzw55QoWQA0mfL RcNUrn8LdMVWitZ/PoKyXSMwSAJE/CCrtpMzxpeaMkDE5d0pKZnQsFa5xqrZbR93Z402 r6/DErEk1El8rEu0yZvocw8/wXeJKmPTGlOnKt6CzOaYFD24d+IzkvmlNdMhwo5dnLId sefX7HXH2bU9+B3pl1AYTIimUKnDduTPtoUMuCMKuwI1KQgZZGI+T+VSofsnhvMQDxXa DmzviFvL4+5t8KaP++NogOFj06Sf6WV5uS8upsXfSWIYLpU6cLioyXW3xj1d929fc3xP RdtQ== 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=gMBiUGGbJ99DKFgdZE3lhY6dlBppzENkGGfAt/0M44n+fLs21JgwN0PN4Srjihxhef vZLRdp3V506oJvfH2/pHpSm0K+1XGcVg8TQ2zSWwBkaCB2uqxKN4/TJBuD2Y+DIE+aKJ aT9BotkxP45JH1PjXZFz+hGZuUhcvyS0frLFwnfmZ2ZwaAPISxYY0tgtQiorhA/+7oCS +EHlNaZBaaDBeJL9PV/Qkg193xUex/UjZqmO5/Ts2ChC/c3wcmsQ5Nul1tMtcl3rFZ31 WQOy6EUC7CVhwR3mS9CO6CYmdWJdpgQesC/UI2sRgsan0RjOBji/5yu4zQlg06S/cFA9 TWgg== 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 k72si37040977pge.310.2018.11.19.06.07.18; Mon, 19 Nov 2018 06:07:35 -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 S1729514AbeKTAaT (ORCPT + 99 others); Mon, 19 Nov 2018 19:30:19 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:15119 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729362AbeKTAaS (ORCPT ); Mon, 19 Nov 2018 19:30:18 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 799A4E21118A; Mon, 19 Nov 2018 22:06:30 +0800 (CST) Received: from localhost.localdomain (10.175.34.53) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.408.0; Mon, 19 Nov 2018 22:06:21 +0800 From: Xue Chaojing To: CC: , , , , , , , Subject: [PATCH 4/4] net-next/hinic: fix a bug in rx data flow Date: Mon, 19 Nov 2018 06:12:34 +0000 Message-ID: <20181119061234.12839-4-xuechaojing@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181119061234.12839-1-xuechaojing@huawei.com> References: <20181119061234.12839-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