public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: force PKTALIGN to ARCH_DMA_MINALIGN
Date: Fri, 16 Mar 2012 12:18:50 -0400	[thread overview]
Message-ID: <201203161218.51165.vapier@gentoo.org> (raw)
In-Reply-To: <4F62B542.7080502@boundarydevices.com>

On Thursday 15 March 2012 23:36:34 Eric Nelson wrote:
> I do see a potential problem with eth.c iff CONFIG_API is set, but I'm
> unfamiliar with this API. It appears to me that this declaration
> needs to be aligned, with or without the PKTALIGN change or it won't be
> usable with DMA since PKTSIZE is unlikely to be cache line or DMA friendly
> at 1518 (0x5EE) bytes.
> 
> 	static struct {
> 		uchar data[PKTSIZE];
> 		int length;
> 	} eth_rcv_bufs[PKTBUFSRX];
> 
> It appears that the CONFIG_API macro is only defined for PMC440. Is this
> supported for other machines?

CONFIG_API is the new standalone api.  it uses a syscall-like approach to 
maintaining compatibility unlike the current standalone api which breaks 
easily.

however, this struct is used only internally.  the exposed function calls are 
unchanged.  so changing the size of the buffer is OK generally speaking.

there is a slight behavior change though.  if you look at the funcs, they only 
accept buffers that are smaller than PKTSIZE bytes.  i'm not sure we care about 
this detail though.  i think the max size you can send is arbitrary and was 
designed just so you could get a frame's worth of data at a time, so as long 
as that ceiling isn't violated, it's OK.
-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/20120316/d9268c5d/attachment.pgp>

      reply	other threads:[~2012-03-16 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <http://lists.denx.de/pipermail/u-boot/2012-March/120205.html>
2012-03-14 21:35 ` [U-Boot] [PATCH] net: force PKTALIGN to ARCH_DMA_MINALIGN Eric Nelson
2012-03-14 22:57   ` Mike Frysinger
2012-03-16  2:50   ` Marek Vasut
2012-03-16  3:30     ` Mike Frysinger
2012-03-16  4:43       ` Marek Vasut
2012-03-16  3:36     ` Eric Nelson
2012-03-16 16:18       ` Mike Frysinger [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=201203161218.51165.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