Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Jun 2014 21:01:51 -0700
From:      John-Mark Gurney <jmg@funkthat.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-arm@freebsd.org" <arm@freebsd.org>
Subject:   Re: arm alignment faults...
Message-ID:  <20140629040150.GO1560@funkthat.com>
In-Reply-To: <CAJ-VmokxO5vfOOSvPrTfnda6gSKOPpJQF3kto3AdgUhvbFgNYg@mail.gmail.com>
References:  <20140629033823.GN1560@funkthat.com> <CAJ-VmokxO5vfOOSvPrTfnda6gSKOPpJQF3kto3AdgUhvbFgNYg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Adrian Chadd wrote this message on Sat, Jun 28, 2014 at 20:44 -0700:
> On 28 June 2014 20:38, John-Mark Gurney <jmg@funkthat.com> wrote:
> > So, one of the little projects I'd like to see is the removal of
> > ETHER_ALIGN from the tree..  This bogosity can (and does) cause the use
> > of bouncing durning DMA ops on all ethernet frames...

Now that I think about it, total removal may not be necessary, just
the requirement to use it...  If the ethernet dma engine can do half
word aligned dma, then there would be benifit on those to keep
ETHER_ALIGN...

> Well, as long as you're not doing it by forcing the various CPUs to
> handle unaligned accesses.

Hard to do on armv4 which I don't believe supports unaligned access...

> The cost of those unaligned accesses on some CPUs that support them is
> not trivial. We benchmarked some of the ARM cores at Qualcomm back
> when looking to migrate stuff to ARM and it wasn't very quick.

I plan on fixing the TCP/IP stack to copy data to an aligned buffer
(maybe only if the original buffer isn't aligned) on the stack when
__NO_STRICT_ALIGNMENT is not defined...  I can't see how copying the
entire packet is cheaper than copying 20 bytes or so...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140629040150.GO1560>