From nobody Fri Dec 19 21:56:00 2025 Delivered-To: importer@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+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1688720866; cv=none; d=zohomail.com; s=zohoarc; b=QmXBlkSp7di569W+GfyfGCbMCSw8EXRxD6OPSiDKdfVZymk4SknmgZ4zXemypNfoAfaYu/HjNqCUVomfbruEBCcEetE7MW5JIGV+m6+SF5Vevw+vcrqzrjOeb64NBW+C/empey60qodjikalSl+6/f4c7aJb49kmX2GwUGK0Fno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688720866; h=Content-Type: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:To; bh=wkkd2+6mfpGp/rdPGjFFqST3r3xW2cynU0HSIT2B4pY=; b=QnyJQV338f56JtzdjcO4H4hhtG0merQIy8U1X5Npt174g6pUIwIIcv8YGTQP2xaRm1yrV1cLIxAHcu1a448zahH4T6IeK98dykgt7JG1zWsSupqFRhdPp7K8XvUcZy9E/ZUuSnJXapE7yiG1mBFu4n0XlkbhPn76wy1wrQ3iNvc= 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+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1688720866518933.4189643180986; Fri, 7 Jul 2023 02:07:46 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHhQR-00037n-EC; Fri, 07 Jul 2023 05:06:51 -0400 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 1qHhQP-000373-4u for qemu-devel@nongnu.org; Fri, 07 Jul 2023 05:06:49 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHhQN-0006Of-JB for qemu-devel@nongnu.org; Fri, 07 Jul 2023 05:06:48 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-519-Msidr2MPMNqLngjI5b9zgQ-1; Fri, 07 Jul 2023 05:06:42 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CA793809F8F; Fri, 7 Jul 2023 09:06:41 +0000 (UTC) Received: from hp-dl380pg8-01.lab.eng.pek2.redhat.com (hp-dl380pg8-01.lab.eng.pek2.redhat.com [10.73.8.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id A17511121330; Fri, 7 Jul 2023 09:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688720806; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wkkd2+6mfpGp/rdPGjFFqST3r3xW2cynU0HSIT2B4pY=; b=IZT8GIS1lzyJr27wLAF/udKSUlss8OxKHg+wD6j3rK0lRJwyl3YMOtkQDCgCUiQlW1XPXA l3u9Hp/7jdcDernmK7Xo60U8UZOqlZFqqmlEaHDuLSMjrZEcnBV6/h9Hg1r2NNrMbAXSRv hyBVzZTpf+RIUIU/lLXimZK9S7a8jFk= X-MC-Unique: Msidr2MPMNqLngjI5b9zgQ-1 From: Jason Wang To: qemu-devel@nongnu.org, richard.henderson@linaro.org, peter.maydell@linaro.org Cc: Bin Meng , Jason Wang Subject: [PULL 03/15] hw/net: vmxnet3: Remove the logic of padding short frames in the receive path Date: Fri, 7 Jul 2023 05:06:16 -0400 Message-Id: <20230707090628.2210346-4-jasowang@redhat.com> In-Reply-To: <20230707090628.2210346-1-jasowang@redhat.com> References: <20230707090628.2210346-1-jasowang@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=jasowang@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1688720867269100009 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Bin Meng Now that we have implemented unified short frames padding in the QEMU networking codes, remove the same logic in the NIC codes. This actually reverts commit 40a87c6c9b11ef9c14e0301f76abf0eb2582f08e. Signed-off-by: Bin Meng Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 18b9edf..5dfacb1 100644 --- a/hw/net/vmxnet3.c +++ b/hw/net/vmxnet3.c @@ -40,7 +40,6 @@ =20 #define PCI_DEVICE_ID_VMWARE_VMXNET3_REVISION 0x1 #define VMXNET3_MSIX_BAR_SIZE 0x2000 -#define MIN_BUF_SIZE 60 =20 /* Compatibility flags for migration */ #define VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS_BIT 0 @@ -1977,7 +1976,6 @@ vmxnet3_receive(NetClientState *nc, const uint8_t *bu= f, size_t size) { VMXNET3State *s =3D qemu_get_nic_opaque(nc); size_t bytes_indicated; - uint8_t min_buf[MIN_BUF_SIZE]; =20 if (!vmxnet3_can_receive(nc)) { VMW_PKPRN("Cannot receive now"); @@ -1990,14 +1988,6 @@ vmxnet3_receive(NetClientState *nc, const uint8_t *b= uf, size_t size) size -=3D sizeof(struct virtio_net_hdr); } =20 - /* Pad to minimum Ethernet frame length */ - if (size < sizeof(min_buf)) { - memcpy(min_buf, buf, size); - memset(&min_buf[size], 0, sizeof(min_buf) - size); - buf =3D min_buf; - size =3D sizeof(min_buf); - } - net_rx_pkt_set_packet_type(s->rx_pkt, get_eth_packet_type(PKT_GET_ETH_HDR(buf))); =20 --=20 2.7.4