From nobody Tue Feb 10 17:58:13 2026 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1677147779; cv=none; d=zohomail.com; s=zohoarc; b=EWehlbNBDcby8BJyNrBciPfxy90Sh4D730sNfKA3HLD3e2DJll/bhAlroEwplOiL0BHEy2wz1k9Uk9axRDjfBXEKC0RHTYhifTXS2dr1sxuqzz5mvonjRcm3mwuoNNahOSSJSQKlLQ2BtC/bsGxPNnzg8nX7QXqWPHHIFbqM7xk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677147779; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject; bh=ZbOxJlZ5tx8ymjfKgIQaBeKJIwscq3YDNrk13mRmwgU=; b=g/J8vuEvD6ZyeFafF+tGfib3P7dxX6M6EW46oNxJjJ1ZdrulII6FRecFrn+4w/1Xcw4cJdZMtynvur4BTdzdoF8UYUHI811azp6ow7Eza5lMG5r/qvgeLV7yjX5dg3x+Ez4HZBD3AZEZ0c62g8AKmii+MKt0+tR74EI1u1LM32I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677147779240656.6718368243373; Thu, 23 Feb 2023 02:22:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pV8kB-0008BJ-MB; Thu, 23 Feb 2023 05:22:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pV8kA-0008AR-EL for qemu-devel@nongnu.org; Thu, 23 Feb 2023 05:22:30 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pV8k9-0002pV-0M for qemu-devel@nongnu.org; Thu, 23 Feb 2023 05:22:30 -0500 Received: by mail-pl1-x62b.google.com with SMTP id s5so12156758plg.0 for ; Thu, 23 Feb 2023 02:22:28 -0800 (PST) Received: from alarm.flets-east.jp ([2400:4050:a840:1e00:4457:c267:5e09:481b]) by smtp.gmail.com with ESMTPSA id c20-20020a170902c1d400b00196217f1219sm4107734plc.70.2023.02.23.02.22.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 02:22:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZbOxJlZ5tx8ymjfKgIQaBeKJIwscq3YDNrk13mRmwgU=; b=yGzDYVIZan75Q1TULmnIM+OHRtLAl+79thJNdfKlGaY0lo7tvxZuJA49lxVWEzaLaX klauZJIN0w1iRqZfCuA0M1xocwqG6LP01fPMMY4Uk8ueZ7adHQKzxlkKzZHlrLpgZr4U y+kLzkE2kWWthYIhNwsJDpU8OrmNQNl+9HAq77c9w9lZzJR7Fp+0Ty4FHhLF0lmQQuwr zZm9D7R2wt0gf1LV8kAvpvZjBfYDANOUF6rpRuugAPl1+giMH4EfWiTTcrE/v0B+kVs9 5EMDcgyoI35f2rsgwhBfjZ19d/9+qhoGD/D5UX1BK/QBABzVIza0ZJB3VDdRn6nfWvgN D8Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZbOxJlZ5tx8ymjfKgIQaBeKJIwscq3YDNrk13mRmwgU=; b=blyAYUy0K1Po2M9Ih9Kx3Z/MTVbNxoZTEEH1+VABwPTj2/HwcSwEReFxkb0/E4aURA 57iRXUaQ5jx9kAduqjCJBtOyIYNkda05p4OJXcJcnKJu21MeHoWcYGhDVp4j96XU+hgx RxFxRA5nMLPEQSfsNXDWjRynpLo6O3DHp0MokgHQbC0IV0cmZBO+l9QxoYgXQXi8OQBG 9HNWPhPNb6eIa6Uzvd2vx4HcMV3kk0z2yu94m5pienSB/ikM0+58cRmA9KG3fOzfSwIV f0vPTjALhpADQafuvx1HvobTYJ6kdMs8W5VJ4V3kC/o0wvPYm5LAdvm6yUfXVqFt15+A v4Hg== X-Gm-Message-State: AO0yUKXsIjcg3DX4Zl+RFgzUh3UaFcdY8nVsKbAENqanqb2cmDs3l/OO IsKJrzLrATaJYZlwy6JmgCPDAw== X-Google-Smtp-Source: AK7set/7FuEml7ztYCWwhRSkyY8sNr4I8iGIlZxW2k2TcsxdqBcIlvYKYlI1vZKLD6TPt/C5Eh8psg== X-Received: by 2002:a17:902:e74f:b0:199:2e77:fe56 with SMTP id p15-20020a170902e74f00b001992e77fe56mr15263765plf.52.1677147747900; Thu, 23 Feb 2023 02:22:27 -0800 (PST) From: Akihiko Odaki To: Cc: Jason Wang , Dmitry Fleytman , Thomas Huth , Laurent Vivier , Paolo Bonzini , qemu-devel@nongnu.org, qemu-ppc@nongnu.org, "Michael S . Tsirkin" , Yan Vugenfirer , Yuri Benditovich , Sriram Yagnaraman , Alexander Bulekov , Akihiko Odaki Subject: [PATCH v6 31/34] e1000: Count CRC in Tx statistics Date: Thu, 23 Feb 2023 19:20:15 +0900 Message-Id: <20230223102018.141748-32-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223102018.141748-1-akihiko.odaki@daynix.com> References: <20230223102018.141748-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::62b; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x62b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20210112.gappssmtp.com) X-ZM-MESSAGEID: 1677147780270100005 Content-Type: text/plain; charset="utf-8" The Software Developer's Manual 13.7.4.5 "Packets Transmitted (64 Bytes) Count" says: > This register counts the number of packets transmitted that are > exactly 64 bytes (from through , > inclusively) in length. It also says similar for the other Tx statistics registers. Add the number of bytes for CRC to those registers. Signed-off-by: Akihiko Odaki --- hw/net/e1000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index c81d914a02..c8307984fc 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -571,7 +571,7 @@ e1000_send_packet(E1000State *s, const uint8_t *buf, in= t size) qemu_send_packet(nc, buf, size); } inc_tx_bcast_or_mcast_count(s, buf); - e1000x_increase_size_stats(s->mac_reg, PTCregs, size); + e1000x_increase_size_stats(s->mac_reg, PTCregs, size + 4); } =20 static void @@ -635,7 +635,7 @@ xmit_seg(E1000State *s) } =20 e1000x_inc_reg_if_not_full(s->mac_reg, TPT); - e1000x_grow_8reg_if_not_full(s->mac_reg, TOTL, s->tx.size); + e1000x_grow_8reg_if_not_full(s->mac_reg, TOTL, s->tx.size + 4); s->mac_reg[GPTC] =3D s->mac_reg[TPT]; s->mac_reg[GOTCL] =3D s->mac_reg[TOTL]; s->mac_reg[GOTCH] =3D s->mac_reg[TOTH]; --=20 2.39.1