From: Jun Sun <jsun@mvista.com>
To: linux-mips@oss.sgi.com, linux-mips@fnet.fr
Cc: dan@netx4.com
Subject: Re: trap handler for unaligned memory read/write
Date: Fri, 15 Sep 2000 15:31:24 -0700 [thread overview]
Message-ID: <39C2A33C.EF90FFDB@mvista.com> (raw)
In-Reply-To: 39C29018.9389FBCE@mvista.com
As usual, I am replying to my own question. Maybe I was asking to soon
... :-)
I found some drivers offer an copy-only-tiny-buffer which will copy
small packets (for what purpose?). Apparently after the copying the
misalignment disappears. So MIPS, you just set a high copy_break_size
so that a copying always happens.
In fact this is what is done for other non-x86 architectures in tulip
drivers.
Jun
Jun Sun wrote:
>
> I was trying to run some PCI ether drivers and always got bus error, at
> least when I use ipconfig bootp code.
>
> However, the problem seems to be generic.
>
> Ethernet device writes a whole packet in the memory. Driver and network
> stack code often directly dereference a pointer in to the packet.
> However, the ether header is 14 byte long. If you align packet from the
> beginning, then IP header will be off-aligned.
>
> Any suggestions?
>
> If this is a valid problem, I think the long term solution should be in
> network code, which should not assume they can dereference on an
> unaligned address.
>
> For short-term solutions, we can have trap handler that supports the
> unaligned read/write. Does anybody know if there is such a trap handler
> for MIPS?
>
> Thanks.
>
> Jun
next prev parent reply other threads:[~2000-09-15 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-09-15 21:09 trap handler for unaligned memory read/write Jun Sun
2000-09-15 22:31 ` Jun Sun [this message]
2000-09-15 23:28 ` Ralf Baechle
2000-09-16 0:02 ` Jun Sun
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=39C2A33C.EF90FFDB@mvista.com \
--to=jsun@mvista.com \
--cc=dan@netx4.com \
--cc=linux-mips@fnet.fr \
--cc=linux-mips@oss.sgi.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