Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BB89C433C1 for ; Mon, 22 Mar 2021 05:26:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C155761967 for ; Mon, 22 Mar 2021 05:26:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C155761967 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lOD4q-00051X-Qf for qemu-devel@archiver.kernel.org; Mon, 22 Mar 2021 01:26:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33222) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOD3T-0004R0-Jl; Mon, 22 Mar 2021 01:24:45 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:55525) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lOD3O-0001ab-A4; Mon, 22 Mar 2021 01:24:42 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 4F3jc10QbMz9sVt; Mon, 22 Mar 2021 16:24:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1616390673; bh=01/kUWaA2zNnOAbuaD/kcHU2fMH11hA9CdX4RlCAv9s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BtYGsl8QwODoz7OKRJpnTa3ARdV9uO4lpYmCEcjZ2CXRLu0ppoY07D1p6KdlXmkQk 6jwdug7MVGNLnzcpwq3nLY7ytfA7vOFB2X2Ya1huCtLj9lITf0UxgFl+GxQEKD9j+x Z46hJ9quq82QiXnPIpeLuQ0zI3Zg9aaDM2t02R1M= Date: Mon, 22 Mar 2021 16:17:17 +1100 From: David Gibson To: Bin Meng Subject: Re: [PATCH] hw/net: fsl_etsec: Tx padding length should exclude CRC Message-ID: References: <20210316081505.72898-1-bmeng.cn@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="H2QjMByJ8FD1gbVV" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=2401:3900:2:1::2; envelope-from=dgibson@ozlabs.org; helo=ozlabs.org X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: , Cc: Jason Wang , qemu-ppc , Greg Kurz , "qemu-devel@nongnu.org Developers" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --H2QjMByJ8FD1gbVV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 22, 2021 at 12:33:06PM +0800, Bin Meng wrote: > Hi David, >=20 > On Mon, Mar 22, 2021 at 12:11 PM David Gibson > wrote: > > > > On Tue, Mar 16, 2021 at 04:15:05PM +0800, Bin Meng wrote: > > > As the comment of tx_padding_and_crc() says: "Never add CRC in QEMU", > > > min_frame_len should excluce CRC, so it should be 60 instead of 64. > > > > Sorry, your reasoning still isn't clear to me. If qemu is not adding > > the CRC, what is? >=20 > No one is padding CRC in QEMU. QEMU network backends pass payload > without CRC in between. Ok, but the CRCs must be added if the packets are bridged onto a real device, yes? Where does that happen? >=20 > > Will it always append a CRC after this padding is complete? >=20 > No. If that's true, then won't the packets still be shorter than expected if we only pad to 60 bytes? --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --H2QjMByJ8FD1gbVV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAmBYKFsACgkQbDjKyiDZ s5LKVQ//Xy/EXxroivZvJzVJ36N0LcbLaHN3NjnjUpqxFM9cT5lt9OvBsMnkPsp+ cEMzFIBZl34Mt7H/FEsXZZMcOd8or/Ag7eOV85TUMZ//TU4UxlP4dE0D9ahJ19U4 CFaiTIgfODHmwNNbW+hQ+kE4NvzRzEBtov4TbuTS3bQavDR8HiUAQcuhNjoNk7G5 RUIfKPsi+6C9CVl4LssSLAEwaiN0T7tevly7ChfsqgcGuAhxbtdlSXfKlCAkGl3t YsaqFM3x1ArF+WRHUbqEv8a1VWCR0PsHD29/Xm2vq/ohwE42EXkw8sTC87cKRK7y xenxlWeQjqw77ym8tdyUaWbI3ku2QOCpeLr2WDVp593wPxMCCI8WJfAw64DkKfC2 5lZ7O/9UTEVKolLacPz/V+HhpizX+3xODAhY2QWie8O6qacGwAKvKgNdozl544sP LEUgQhYorgB0KfSHefN9LX5unIeQB9yPT8DKxpdNwf6cMG3lnxONSw6K/grmc9fR XcnTiHNKRCDdyFYyptojBvUaZ9pR75G1/SmhfDp365pMMjCC7K/kTkEbaSoHb8Dm n523A4svpU24wR2bsZTZv+tz7LzRHPSj/g81/HuN7YiEtOhDFa+hLVtfSn/regA/ +qcRAxG3Or+qmR1t/i1CocauuxLxGcrbHOtF5jYQtiz4/3tVxQ0= =oGiS -----END PGP SIGNATURE----- --H2QjMByJ8FD1gbVV--