[U-Boot] [RFC PATCH v4 0/23] Add Driver Model support to network stack
Joe Hershberger
joe.hershberger at gmail.com
Wed Mar 4 00:32:25 CET 2015
Hi Simon,
On Tue, Mar 3, 2015 at 5:14 PM, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Joe,
>
> On 3 March 2015 at 15:29, Joe Hershberger <joe.hershberger at gmail.com>
wrote:
> > On Sun, Mar 1, 2015 at 10:13 AM, Simon Glass <sjg at chromium.org> wrote:
> >
> > [snip]
> >
> >> - I think the recv() method should change before long. The
> >> NetReceive() call should be made from the uclass since it is common to
> >> all drivers. Then the recv() method can return a packet if it finds
> >> one, but not submit it for processing
> >
> > I looked into doing this and I think it may be more of a step backward.
> > Currently devices can directly hand their DMA buffers to the network
stack.
> > With this change, most drivers would be forced to memcpy each packet
into
> > the supplied buffer.
>
> I don't see why. The uclass can request the address and length of the
buffer.
>
> int (*recv)(char **buffp, int **lenp);
That works... I think I'll return the length though. I don't see much value
in having a pointer to the length.
int (*recv)(uchar **packetp);
-Joe
More information about the U-Boot
mailing list