From: David Miller <davem@davemloft.net>
To: avorontsov@mvista.com
Cc: linuxppc-dev@ozlabs.org, afleming@freescale.com,
Sandeep.Kumar@freescale.com, netdev@vger.kernel.org
Subject: Re: [PATCH] gianfar: Fix oversized packets handling
Date: Wed, 16 Jun 2010 18:09:49 -0700 (PDT) [thread overview]
Message-ID: <20100616.180949.258118943.davem@davemloft.net> (raw)
In-Reply-To: <20100611205103.GA4255@oksana.dev.rtsoft.ru>
From: Anton Vorontsov <avorontsov@mvista.com>
Date: Sat, 12 Jun 2010 00:51:03 +0400
> Issuing the following command on host:
>
> $ ifconfig eth2 mtu 1600 ; ping 10.0.0.27 -s 1485 -c 1
>
> Makes some boards (tested with MPC8315 rev 1.1 and MPC8313 rev 1.0)
> oops like this:
...
> Dumped buffer descriptors showed that eTSEC's length/truncation
> logic sometimes passes oversized packets, i.e. for the above ICMP
> packet the following two buffer descriptors may become ready:
>
> status=1400 length=1536
> status=1800 length=1541
>
> So, it seems that gianfar actually receives the whole big frame,
> and it tries to place the packet into two BDs. This situation
> confuses the driver, and so the skb_put() sanity check fails.
>
> This patch fixes the issue by adding an appropriate check, i.e.
> the driver should not try to process frames with buffer
> descriptor's length over rx_buffer_size (i.e. maxfrm and mrblr).
>
> Note that sometimes eTSEC works correctly, i.e. in the second
> (last) buffer descriptor bits 'truncated' and 'crcerr' are set,
> and so there's no oops. Though I couldn't find any logic when
> it works correctly and when not.
>
> Signed-off-by: Anton Vorontsov <avorontsov@mvista.com>
Applied, thanks Anton.
prev parent reply other threads:[~2010-06-17 1:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 20:51 [PATCH] gianfar: Fix oversized packets handling Anton Vorontsov
2010-06-17 1:09 ` David Miller [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=20100616.180949.258118943.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=Sandeep.Kumar@freescale.com \
--cc=afleming@freescale.com \
--cc=avorontsov@mvista.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.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).