From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] eth_receive(): Do not assume that caller always wants full packet.
Date: Wed, 15 Jul 2009 11:05:44 -0400 [thread overview]
Message-ID: <200907151105.45474.vapier@gentoo.org> (raw)
In-Reply-To: <1247558915-26591-1-git-send-email-kosmo@semihalf.com>
On Tuesday 14 July 2009 04:08:35 Piotr Ziecik wrote:
> When packets arrive on the interface that are larger than the buffer
> being passed to U-Boot from a standalone application, then the
> eth_receive() returns -1 and leaves the packet saved. The next call to
> eth_receive() will find that same packet and can fail for the exact same
> reason. A typical scenario is the loader doing ARP with a buffer of 66
> bytes. The end result is that the ARP will fail and the loader panics.
>
> This patch fixes above problem by allowing partial packet read.
seems like it could easily introduce incorrect behavior in existing
applications. the code also sounds a bit risky ... your change would mean
people could read the leading part, but the rest is lost ?
probably better to add a new function with explicit semantics --
eth_receive_partial() or something.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090715/1fc7cdfc/attachment.pgp
next prev parent reply other threads:[~2009-07-15 15:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 8:08 [U-Boot] [PATCH] eth_receive(): Do not assume that caller always wants full packet Piotr Ziecik
2009-07-15 15:05 ` Mike Frysinger [this message]
2009-07-16 9:51 ` Piotr Zięcik
2009-07-16 12:39 ` Wolfgang Denk
2009-07-16 13:32 ` Piotr Zięcik
2009-07-16 15:08 ` Marcel Moolenaar
2009-07-16 15:39 ` Wolfgang Denk
2009-07-16 16:42 ` Marcel Moolenaar
2009-07-17 20:11 ` Wolfgang Denk
2009-07-16 17:32 ` Ben Warren
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=200907151105.45474.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/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