public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Driver model Ethernet issue
@ 2015-03-26  3:10 Simon Glass
       [not found] ` <CANr=Z=aogNzMmgw1nD+W_L8P0L-ev6q0H4H_B01qWLMZfzNeGA@mail.gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Glass @ 2015-03-26  3:10 UTC (permalink / raw)
  To: u-boot

Hi Joe,

I think moving the packet processing into the uclass was a good idea,
but I did not think it through.

If you look at the designware driver, when it receives a packet it
processes it and then retires that buffer for later reuse. The few
others I have looked at are similar.

We can't retire it in the recv() method since the packet is still
needed at that point, and may be overwritten by a new packet if we
retire its buffer space.

I am wondering if we should have a new method, like:

int free_pkt(struct udevice *dev, uchar *packet, int len)

which is called by the uclass after the packet is processed (assuming
that recv() returns a packet). It would pass the packet pointer and
length to the driver.

This would allow the driver to do what it needs to do.

What do you think? I'd like to figure this out and send v2 of the
sunxi Ethernet conversion.

Regards,
Simon

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-04-07 18:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-26  3:10 [U-Boot] Driver model Ethernet issue Simon Glass
     [not found] ` <CANr=Z=aogNzMmgw1nD+W_L8P0L-ev6q0H4H_B01qWLMZfzNeGA@mail.gmail.com>
     [not found]   ` <CANr=Z=asoa5Y2PoMLkV_+pACeT-u6uE9ZPbjLuCWZFcApdYccg@mail.gmail.com>
2015-03-30 18:03     ` Simon Glass
2015-03-30 20:44       ` [U-Boot] [PATCH] dm: eth: Provide a way for drivers to manage packet buffers Joe Hershberger
2015-04-01  3:32         ` Simon Glass
2015-04-01 16:03           ` Joe Hershberger
2015-04-03 23:33             ` Simon Glass
2015-04-04  1:09               ` [U-Boot] [PATCH v2] " Joe Hershberger
2015-04-05 18:31                 ` Simon Glass
2015-04-07 18:39                   ` Simon Glass
2015-04-02  7:50       ` [U-Boot] Driver model Ethernet issue Albert ARIBAUD
2015-04-02 14:58         ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox