From: Amos Kong <akong@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: mst@redhat.com, Michael Contreras <michael@inetric.com>,
jasowang@redhat.com, qemu-devel@nongnu.org,
qemu-stable@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH 46/60] e1000: Discard oversized packets based on SBP|LPE
Date: Wed, 27 Nov 2013 19:32:18 +0800 [thread overview]
Message-ID: <20131127113218.GA6758@amosk.info> (raw)
In-Reply-To: <20131127111430.GA4179@amosk.info>
On Wed, Nov 27, 2013 at 07:14:30PM +0800, Amos Kong wrote:
> On Mon, Feb 04, 2013 at 02:40:56PM +0400, Michael Tokarev wrote:
> > From: Michael Contreras <michael@inetric.com>
> >
> > Discard packets longer than 16384 when !SBP to match the hardware behavior.
> >
> > Signed-off-by: Michael Contreras <michael@inetric.com>
> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> > (cherry picked from commit 2c0331f4f7d241995452b99afaf0aab00493334a)
> >
> > Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> > ---
> > hw/e1000.c | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/e1000.c b/hw/e1000.c
> > index e22ba3d..87c798b 100644
> > --- a/hw/e1000.c
> > +++ b/hw/e1000.c
> > @@ -61,6 +61,8 @@ static int debugflags = DBGBIT(TXERR) | DBGBIT(GENERAL);
> >
> > /* this is the size past which hardware will drop packets when setting LPE=0 */
> > #define MAXIMUM_ETHERNET_VLAN_SIZE 1522
> > +/* this is the size past which hardware will drop packets when setting LPE=1 */
> > +#define MAXIMUM_ETHERNET_LPE_SIZE 16384
> >
> > /*
> > * HW models:
> > @@ -799,8 +801,9 @@ e1000_receive(VLANClientState *nc, const uint8_t *buf, size_t size)
> > }
> >
> > /* Discard oversized packets if !LPE and !SBP. */
> > - if (size > MAXIMUM_ETHERNET_VLAN_SIZE
> > - && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)
> > + if ((size > MAXIMUM_ETHERNET_LPE_SIZE ||
> > + (size > MAXIMUM_ETHERNET_VLAN_SIZE
> > + && !(s->mac_reg[RCTL] & E1000_RCTL_LPE)))
> > && !(s->mac_reg[RCTL] & E1000_RCTL_SBP)) {
> > return size;
>
>
> This change is correct. I have a related question to ask.
>
> I enabled E1000_DEBUG in qemu, and try to change nic MTU to >1500
> in Windows 7/ Windows 8 guest. I found RCTL register isn't changed.
>
> It mean E1000_RCTL_LPE bit is 0, so I ping guest from host with >
> 1500 size packet, the request ICMP packets will be dropped.
>
> It seems a e1000 driver bug of Windows?
In e1000 driver of Windows, there is a "Jumbo Packet" option, it's
used to enable LPE, after enabled Jumbo packet, I can ping guest with
large packet (>1500)
prev parent reply other threads:[~2013-11-27 11:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1359974470-17044-47-git-send-email-mjt@msgid.tls.msk.ru>
2013-11-27 11:14 ` [Qemu-devel] [PATCH 46/60] e1000: Discard oversized packets based on SBP|LPE Amos Kong
2013-11-27 11:32 ` Amos Kong [this message]
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=20131127113218.GA6758@amosk.info \
--to=akong@redhat.com \
--cc=jasowang@redhat.com \
--cc=michael@inetric.com \
--cc=mjt@tls.msk.ru \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=stefanha@redhat.com \
/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).