From nobody Sun Feb 8 22:07:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1554391290665836.2735133098953; Thu, 4 Apr 2019 08:21:30 -0700 (PDT) Received: from localhost ([127.0.0.1]:56343 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hC4BC-0003HV-PG for importer@patchew.org; Thu, 04 Apr 2019 11:21:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hC49i-0001Cr-1t for qemu-devel@nongnu.org; Thu, 04 Apr 2019 11:19:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hC49h-0002cz-5G for qemu-devel@nongnu.org; Thu, 04 Apr 2019 11:19:54 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:40778) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hC49g-0002Wh-P4 for qemu-devel@nongnu.org; Thu, 04 Apr 2019 11:19:53 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x34F8x7f034625 for ; Thu, 4 Apr 2019 15:19:47 GMT Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2130.oracle.com with ESMTP id 2rhwydfym9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 04 Apr 2019 15:19:47 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x34FJP5V196179 for ; Thu, 4 Apr 2019 15:19:47 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserp3020.oracle.com with ESMTP id 2rm9mjpmp6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 04 Apr 2019 15:19:47 +0000 Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x34FJjFX011775 for ; Thu, 4 Apr 2019 15:19:46 GMT Received: from mhkanda-aus-1.us.oracle.com (/10.135.188.192) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Apr 2019 08:19:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id; s=corp-2018-07-02; bh=edGw1WK6VcZOMhikhb+V038deAZalNwjjNrApu6Et6I=; b=l28T+q/faK+Gybu5y+4UNtHo8KOrswsrzY+vLSMBDQXlSOFBWuq5q0wIp6DWa1YTYPwX 95M1U9EyD48oWOxCIgrEBBxrqJbwkJo+eH18FtInUIxO+tqYeQ/QgUUdfgV7hPMkEwU/ 5MDG8oT5lNA7ZxdHElwluewogygrHNsaFdClq/rSOg784E5kBha2/Wf7UFs7/L0Prmid LQ7lPWWcxF4pDGlMZgugv33qeI06cwn1o4evAkQcFvbQligoSWXyoy6HEW8awuy82HPw msX7Lxz59cjttC7/AEteweI/9D2cFXKRy3pIw4jpwkGj6/HlRQArdEpcaV07ccoNirW5 9w== From: Mark Kanda To: qemu-devel@nongnu.org Date: Thu, 4 Apr 2019 10:21:26 -0500 Message-Id: <1554391286-26981-1-git-send-email-mark.kanda@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9216 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=795 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904040098 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9216 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=827 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904040098 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.79 Subject: [Qemu-devel] [PATCH] e1000: Never increment the RX undersize count register X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bhavesh.davda@oracle.com, Chris Kenna Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Chris Kenna In situations where e1000 receives an undersized Ethernet frame, QEMU increments the emulated "Receive Undersize Count (RUC)" register when padding the frame. This is incorrect because this an expected scenario (e.g. with VLAN tag stripping) and not an error. As such, QEMU should not increment the emulated RUC. Fixes: 3b2743017749 ("e1000: Implementing various counters") Reviewed-by: Mark Kanda Reviewed-by: Bhavesh Davda Signed-off-by: Chris Kenna Reviewed-by: Stefano Garzarella --- hw/net/e1000.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/net/e1000.c b/hw/net/e1000.c index 9b39bcc..121452d 100644 --- a/hw/net/e1000.c +++ b/hw/net/e1000.c @@ -901,7 +901,6 @@ e1000_receive_iov(NetClientState *nc, const struct iove= c *iov, int iovcnt) if (size < sizeof(min_buf)) { iov_to_buf(iov, iovcnt, 0, min_buf, size); memset(&min_buf[size], 0, sizeof(min_buf) - size); - e1000x_inc_reg_if_not_full(s->mac_reg, RUC); min_iov.iov_base =3D filter_buf =3D min_buf; min_iov.iov_len =3D size =3D sizeof(min_buf); iovcnt =3D 1; --=20 1.8.3.1