Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1019502ybg; Sat, 26 Oct 2019 11:25:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEP8EjLEGrw6/E3LIc/69w6vL5lM70XYIqtDMBRHo4ZvqupMwuH5F0dQwpABmZan5Dt7Nk X-Received: by 2002:a17:906:6087:: with SMTP id t7mr9261877ejj.58.1572114332550; Sat, 26 Oct 2019 11:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572114332; cv=none; d=google.com; s=arc-20160816; b=Tza6dUxsib1x6TGmdAKBNvuJybiLZNp6BqeXGSSK834tchjP1gLL+5y6DlLd5ZQ//8 Cj61g/7eO9gESCXYSQMM1sPTaRsCbVARRzOZxQvB57kzSJaAR3kLsjn3ISGSCjeUxUZ6 hvyTVcI52ilxjZfRwQATVLmiiKLDauG3s+WbjdpglnbjOrs4d6qpU+wHLIxoDU8pOzea Db+D+Lyatp9+sV0LHqk52Zl97RqmO0uO4qjwfqlbmInJ3ZnVWv4s/jUMx+OUN3R9CzIC ux45s0fYXQa5BmKtqT0Xt4xUqqIVnVDYaZxlpeLgmdqPqksWYNKXunYiMbbJGR7dJthr fang== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=PjuxWu1j5zJD4BxxA6mrNvDcfLNV7zdLrA3zYfncH4U=; b=klcOZR3fwe01UACYYN1wrjRBIUlR0G5WTBxb8aujHtv+5MKbhIz8O90tQB5Toq+eDD JDwF7hE2TMzTyk+Niw5rkSnJf7BWi2wYK0qJ/Pa2czwbXgG5FxKbL13f+lnyhIMzbxfh vcwBVHQHRr3jxhzccFWVuVJHIyb6dyqYr6O9rPcxq1Zpf0kOmCnXMaTihOEL4rKbtrVT 9hDNMq1x0bTRYtqO49ZPqIXhurrE0P4shBd1GRz55i3iYB3nX2hPm/RBqIoaErd1MM6y RrKCzgje4HyY1AnSBdEJIn4BdyZEZ7UitycZRuNvyRhiNK4NUqfftBmw9racTf3OsZ9C J1EQ== 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 k10si3600136ede.132.2019.10.26.11.25.09; Sat, 26 Oct 2019 11:25:32 -0700 (PDT) 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 S1726494AbfJZSWh (ORCPT + 99 others); Sat, 26 Oct 2019 14:22:37 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:47836 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbfJZSWg (ORCPT ); Sat, 26 Oct 2019 14:22:36 -0400 Received: from localhost (unknown [IPv6:2601:601:9f00:1e2::d71]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id EA13614DE9796; Sat, 26 Oct 2019 11:22:35 -0700 (PDT) Date: Sat, 26 Oct 2019 11:22:35 -0700 (PDT) Message-Id: <20191026.112235.711416398803098524.davem@davemloft.net> To: xiaojiangfeng@huawei.com Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, leeyou.li@huawei.com, zhanghan23@huawei.com, nixiaoming@huawei.com, zhangqiang.cn@hisilicon.com, dingjingcheng@hisilicon.com Subject: Re: [PATCH] net: hisilicon: Fix ping latency when deal with high throughput From: David Miller In-Reply-To: <1572079779-76449-1-git-send-email-xiaojiangfeng@huawei.com> References: <1572079779-76449-1-git-send-email-xiaojiangfeng@huawei.com> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 26 Oct 2019 11:22:36 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiangfeng Xiao Date: Sat, 26 Oct 2019 16:49:39 +0800 > diff --git a/drivers/net/ethernet/hisilicon/hip04_eth.c b/drivers/net/ethernet/hisilicon/hip04_eth.c > index ad6d912..78f338a 100644 > --- a/drivers/net/ethernet/hisilicon/hip04_eth.c > +++ b/drivers/net/ethernet/hisilicon/hip04_eth.c > @@ -575,7 +575,7 @@ static int hip04_rx_poll(struct napi_struct *napi, int budget) > struct hip04_priv *priv = container_of(napi, struct hip04_priv, napi); > struct net_device *ndev = priv->ndev; > struct net_device_stats *stats = &ndev->stats; > - unsigned int cnt = hip04_recv_cnt(priv); > + static unsigned int cnt_remaining; There is no way a piece of software state should be system wide, this is a per device instance value.