From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) (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 CED504C63B for ; Tue, 26 Dec 2023 07:31:12 +0000 (UTC) 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 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=10;SR=0;TI=SMTPD_---0VzH-NVy_1703575863; Received: from localhost(mailfrom:xuanzhuo@linux.alibaba.com fp:SMTPD_---0VzH-NVy_1703575863) by smtp.aliyun-inc.com; Tue, 26 Dec 2023 15:31:04 +0800 From: Xuan Zhuo To: netdev@vger.kernel.org Cc: "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , virtualization@lists.linux.dev, Zhu Yanjun Subject: [PATCH net-next v1 0/6] virtio-net: support device stats Date: Tue, 26 Dec 2023 15:30:57 +0800 Message-Id: <20231226073103.116153-1-xuanzhuo@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Git-Hash: a7c967e04d1e Content-Transfer-Encoding: 8bit As the spec: https://github.com/oasis-tcs/virtio-spec/commit/42f389989823039724f95bbbd243291ab0064f82 The virtio net supports to get device stats. Please review. Thanks. v1: 1. fix some definitions of the marco and the struct Xuan Zhuo (6): virtio_net: introduce device stats feature and structures virtio_net: virtnet_send_command supports command-specific-result virtio_net: support device stats virtio_net: stats map include driver stats virtio_net: add the total stats field virtio_net: rename stat tx_timeout to timeout drivers/net/virtio_net.c | 533 ++++++++++++++++++++++++++++---- include/uapi/linux/virtio_net.h | 137 ++++++++ 2 files changed, 610 insertions(+), 60 deletions(-) -- 2.32.0.3.g01195cf9f