From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 443763611F; Mon, 18 Mar 2024 11:06:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710759978; cv=none; b=Urf3fAhMnwbFGa9h9yit4abZFEh8Xfw1CIP8f/CRVpkaZll5mDMD1khc9dg+FJBy58aI/ia3UACgSxAR47iwHqHndDNFbjYZtaNMToCo+tM0aeHDGYYnQAnoBSdAmtjIQbIMPtFNr7+KcoIt1rLQVEKxWq8u0DKYTMVrWdrzCk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710759978; c=relaxed/simple; bh=eLxYlGuxzpYs8/cSlIg0rhch0iqATrxTHfG4/PJmc7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Z3D2sbbC+00QSxLENl0UKfSMDi/3ECCURB8fPkNUp3+k1s5wrgG0Q/JAG4B15F00FQ+fLE0fc7IkHcWg1ltFqz2ggeg8zGwTs1BxwxFjolrBKkWIu53B4T8X6I2t5fGTrlM1E/I2P/YKtozy38rXjDiRlIhVW6YvGcKQzbJMMsU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=ZywRgvcl; arc=none smtp.client-ip=115.124.30.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="ZywRgvcl" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1710759974; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=tguGPGsIW2PeFMRIh168TYQXB4IHEIyu5w8PQDwOMQE=; b=ZywRgvcletC49E0WuwN5lPgDapcW/ceiZD2qVC4f69ZoR2zpkGctv4yH/Ckhfngiur6pR7ZoJZBYQsnjcoYzFqqRtjnUMwSh36wl0dQcBWVxgkOB3AHvg4kzGfLy087IHC/ByMdrqAmxGFnQd104WY8WtMbEC8CQApI5XIZWO8k= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=xuanzhuo@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0W2mza3B_1710759971; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0W2mza3B_1710759971) by smtp.aliyun-inc.com; Mon, 18 Mar 2024 19:06:12 +0800 From: Xuan Zhuo To: netdev@vger.kernel.org Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Stanislav Fomichev , Amritha Nambiar , Larysa Zaremba , Sridhar Samudrala , Maciej Fijalkowski , virtualization@lists.linux.dev, bpf@vger.kernel.org, Jiri Pirko Subject: [PATCH net-next v5 7/9] virtio_net: rename stat tx_timeout to timeout Date: Mon, 18 Mar 2024 19:06:00 +0800 Message-Id: <20240318110602.37166-8-xuanzhuo@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f In-Reply-To: <20240318110602.37166-1-xuanzhuo@linux.alibaba.com> References: <20240318110602.37166-1-xuanzhuo@linux.alibaba.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Git-Hash: 0059ee1bd6b4 Content-Transfer-Encoding: 8bit Now, we have this: tx_queue_0_tx_timeouts This is used to record the tx schedule timeout. But this has two "tx". I think the below is enough. tx_queue_0_timeouts So I rename this field. Signed-off-by: Xuan Zhuo Reviewed-by: Jiri Pirko --- drivers/net/virtio_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 12dc1d0d8d2b..a24cfde30d08 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -87,7 +87,7 @@ struct virtnet_sq_stats { u64_stats_t xdp_tx; u64_stats_t xdp_tx_drops; u64_stats_t kicks; - u64_stats_t tx_timeouts; + u64_stats_t timeouts; }; struct virtnet_rq_stats { @@ -111,7 +111,7 @@ static const struct virtnet_stat_desc virtnet_sq_stats_desc[] = { VIRTNET_SQ_STAT("xdp_tx", xdp_tx), VIRTNET_SQ_STAT("xdp_tx_drops", xdp_tx_drops), VIRTNET_SQ_STAT("kicks", kicks), - VIRTNET_SQ_STAT("tx_timeouts", tx_timeouts), + VIRTNET_SQ_STAT("timeouts", timeouts), }; static const struct virtnet_stat_desc virtnet_rq_stats_desc[] = { @@ -2780,7 +2780,7 @@ static void virtnet_stats(struct net_device *dev, start = u64_stats_fetch_begin(&sq->stats.syncp); tpackets = u64_stats_read(&sq->stats.packets); tbytes = u64_stats_read(&sq->stats.bytes); - terrors = u64_stats_read(&sq->stats.tx_timeouts); + terrors = u64_stats_read(&sq->stats.timeouts); } while (u64_stats_fetch_retry(&sq->stats.syncp, start)); do { @@ -4568,7 +4568,7 @@ static void virtnet_tx_timeout(struct net_device *dev, unsigned int txqueue) struct netdev_queue *txq = netdev_get_tx_queue(dev, txqueue); u64_stats_update_begin(&sq->stats.syncp); - u64_stats_inc(&sq->stats.tx_timeouts); + u64_stats_inc(&sq->stats.timeouts); u64_stats_update_end(&sq->stats.syncp); netdev_err(dev, "TX timeout on queue: %u, sq: %s, vq: 0x%x, name: %s, %u usecs ago\n", -- 2.32.0.3.g01195cf9f