[U-Boot] [PATCH 1/5] net: ll_temac: Add LL TEMAC driver to u-boot
Wolfgang Denk
wd at denx.de
Mon Jan 16 09:14:46 CET 2012
Dear Stephan Linz,
In message <1326652166.18981.213.camel at keto> you wrote:
>
> > come code already declares PktBuf ... can't you use that ?
>
> Hm, what do you mean exactly here?
>
> These are the two DMA transfer buffers. I have no idea if there are
> buffers in the upper layer (NET) and how I can use it for DMA transfers.
It's a bad thing not to look at common code, but thnings like that
happen too easily.
However, now that this has been pointed out, you cannot simply ignore
such a request.
> Therfore I create my own rx/tx buffers and copy data. That reduce the
> performance a little bit, but it's OK. Furthermore I have to use DMA
> safe buffers here (no cache, 32 byte alignment).
I could imagine this to be a pretty common requirement.
> > this looks like a struct that should get allocated on the fly based on
> > arguments given to the driver's registration func
>
> OK, it wast a little bit RAM. We can optimize the code later. I want to
> see more testing results on differnet Microblaze and PPC platforms.
we can fix this now, right?
> > the memory is already zero-ed by the call to calloc, so this for loop is
> > useless (and if it wasn't, you'd still use memset())
>
> Sure, we can remove this part in one of the next code optimization.
No. Please fix this now, and then add a cleaned up driver. This is
what the peer review process is all about.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Whom the gods would destroy, they first teach BASIC.
More information about the U-Boot
mailing list