From nobody Wed Nov 19 13:39:27 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615962879; cv=none; d=zohomail.com; s=zohoarc; b=kCQMYu6jb8WX7eLlNFBeGOp0lV+YiEJ/ZAJ2TleDLmeUpIbTRvGYU1EWpfGhRUGA1Yjqw9TJWYxdmcZXX9ME9k2ysytfrROJ09xjpfiAmWUWHEOxd4SUuTBUQx+kSpNk1y7EpADhfEhwvaZEDERo9JQJTBlLNEv0xLJ8nSUaEgg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615962879; h=Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=p/MLTxeMfbETxV9ik8tSzu3enBcQaEzeh7XBZdElKyw=; b=mu+mnzrAAA6ac6sWGLh1bP0RlkK/3aWLEW3TuxCRGR2gk4DxJzex5p4U+1fPFkLyu+WGuYmCGtXwRsqnhx+qT1+cUK19+dj2ThzOhQybFgQAkuKkrV5dYOWrFb6xUTon3psoXGtw1w4XvPB5dMu8yjVuy2CemALVamHjkAxkATA= 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) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615962879356144.18709196441068; Tue, 16 Mar 2021 23:34:39 -0700 (PDT) Received: from localhost ([::1]:38952 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lMPlO-0000RE-7c for importer@patchew.org; Wed, 17 Mar 2021 02:34:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lMPe9-0003mA-06 for qemu-devel@nongnu.org; Wed, 17 Mar 2021 02:27:09 -0400 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]:39700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lMPe7-00007Y-Eu for qemu-devel@nongnu.org; Wed, 17 Mar 2021 02:27:08 -0400 Received: by mail-ed1-x530.google.com with SMTP id bf3so848315edb.6 for ; Tue, 16 Mar 2021 23:27:07 -0700 (PDT) Received: from pek-vx-bsp9.wrs.com (ec2-44-242-66-180.us-west-2.compute.amazonaws.com. [44.242.66.180]) by smtp.gmail.com with ESMTPSA id d1sm10751349eje.26.2021.03.16.23.27.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 23:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=p/MLTxeMfbETxV9ik8tSzu3enBcQaEzeh7XBZdElKyw=; b=ac81lsF39C6zWWoNcl1GlU0y1qy2QJA5z8flh/m75x/O8CjfH2/lFPJNW5SG/+FxyH GB/AmZkz78y1fLJVq7lwHPuBmPomdamBeWMig6BsPMTCxQWDv3IglxZBshRgIU//xN2g 3o29bre0b9RhL2CC5S9Iov0e7CPkvEk/TrGtiDqNH3O4iHXy3Vz2qFccVC4ya87NCzlx OhZgjkzzyvGPIofTbKfsIZapmdNAFN1sI0hbM4miC4+9jGaozzbEwyPMdhfVPJ5zCj9R vse0d7UUwekveXHkn1RJCtrqhqSQBfnkf8pkdy+pDVa+fk3LL8LsfsRgf9+ba7nGE7zn L6IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=p/MLTxeMfbETxV9ik8tSzu3enBcQaEzeh7XBZdElKyw=; b=PesXYL2DyJuaSIZXvTe7sl6JaFo2HfL2Nr538xg/0sL9WaQNoVaIxxAVPtmghYvQyB ShBlAXSTvq83XqvdaESn4rOz10LqzvDSyEMMqKJXceLYGaYpfNPpr6qryuFOjuUDe11c bM1cY0c2H0bWQLy+K6jODS0y4i45mgNpryfgrEHdzTbrUOLdVccServcibgZQBbuebMx scPG4glYpD0+ypTjSScLgcUGnp+mXh+yWfBNTeLpn2prl2E3otN7GO9IfHOUv0SfxOsx Sef/rmGnt7SAajkKgZURVIUHfsoYFCQq/fs4m1+OuCKmoeduysX4kbo0mcVw28F/0Ctt 5y5A== X-Gm-Message-State: AOAM532tIWYJ1Mc4hjmJeQx5Cd4R7Qmnd76RMNBk1IRwaiiE+b+ezvgo qTRS2qTGz53c0M5FXzfJOy4= X-Google-Smtp-Source: ABdhPJytTjzVoklcyp5+MN3BrKkr/y+gWNzl2oabBklAgEyqY0aIwbedalNWokV7WJKSm0jt0VfvLQ== X-Received: by 2002:aa7:db95:: with SMTP id u21mr39909160edt.152.1615962426369; Tue, 16 Mar 2021 23:27:06 -0700 (PDT) From: Bin Meng To: Jason Wang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , qemu-devel@nongnu.org Subject: [PATCH v5 04/12] hw/net: virtio-net: Initialize nc->do_not_pad to true Date: Wed, 17 Mar 2021 14:26:30 +0800 Message-Id: <20210317062638.72626-5-bmeng.cn@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210317062638.72626-1-bmeng.cn@gmail.com> References: <20210317062638.72626-1-bmeng.cn@gmail.com> 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=2a00:1450:4864:20::530; envelope-from=bmeng.cn@gmail.com; helo=mail-ed1-x530.google.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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 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" X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" For virtio-net, there is no need to pad the Ethernet frame size to 60 bytes before sending to it. Signed-off-by: Bin Meng --- (no changes since v1) hw/net/virtio-net.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 96a3cc8357..66b9ff4511 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3314,6 +3314,10 @@ static void virtio_net_device_realize(DeviceState *d= ev, Error **errp) object_get_typename(OBJECT(dev)), dev->id, n= ); } =20 + for (i =3D 0; i < n->max_queues; i++) { + n->nic->ncs[i].do_not_pad =3D true; + } + peer_test_vnet_hdr(n); if (peer_has_vnet_hdr(n)) { for (i =3D 0; i < n->max_queues; i++) { --=20 2.17.1