From: David Gibson <david@gibson.dropbear.id.au>
To: Bin Meng <bmeng.cn@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>, qemu-ppc <qemu-ppc@nongnu.org>,
Greg Kurz <groug@kaod.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH] hw/net: fsl_etsec: Tx padding length should exclude CRC
Date: Tue, 23 Mar 2021 11:08:13 +1100 [thread overview]
Message-ID: <YFkxbegInaEHdqwG@yekko.fritz.box> (raw)
In-Reply-To: <CAEUhbmUrJYx-yOyVTVOV4M-+9gS5VtaSbTzMzvHVTvDqEkb8Lg@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]
On Mon, Mar 22, 2021 at 01:48:07PM +0800, Bin Meng wrote:
> Hi David,
>
> On Mon, Mar 22, 2021 at 1:24 PM David Gibson
> <david@gibson.dropbear.id.au> wrote:
> >
> > On Mon, Mar 22, 2021 at 12:33:06PM +0800, Bin Meng wrote:
> > > Hi David,
> > >
> > > On Mon, Mar 22, 2021 at 12:11 PM David Gibson
> > > <david@gibson.dropbear.id.au> 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?
> > >
> > > 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?
>
> I've never used it like that before. What's the command line to test that?
>
> > >
> > > > Will it always append a CRC after this padding is complete?
> > >
> > > No.
> >
> > If that's true, then won't the packets still be shorter than expected
> > if we only pad to 60 bytes?
>
> In QEMU packets are transmitted without CRC between network backends,
> and when a NIC receives a packet, the minimum required payload length
> is 60 bytes without a CRC.
Ok, I see what you're saying, and indeed it already pads to 60 bytes,
rather than 64 on the Rx side.
--
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-03-23 0:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 8:15 [PATCH] hw/net: fsl_etsec: Tx padding length should exclude CRC Bin Meng
2021-03-22 1:29 ` Bin Meng
2021-03-22 3:22 ` David Gibson
2021-03-22 3:22 ` David Gibson
2021-03-22 4:33 ` Bin Meng
2021-03-22 5:17 ` David Gibson
2021-03-22 5:48 ` Bin Meng
2021-03-23 0:08 ` David Gibson [this message]
2021-03-23 0:08 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YFkxbegInaEHdqwG@yekko.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=bmeng.cn@gmail.com \
--cc=groug@kaod.org \
--cc=jasowang@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).