[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [lwip-users] Zero Copy Ethernet interface

From: Goldschmidt Simon
Subject: RE: [lwip-users] Zero Copy Ethernet interface
Date: Thu, 20 Sep 2007 16:45:07 +0200

> Andrew Dennison wrote:
> >> [re andrew's mail:]
> >>
> >>> input_thread_loop:
> >>>     pbuf_alloc() 1514 bytes
> >>>     pass pbuf to driver and block waiting for packet then DMA from
> >> device
> >>>     pbuf_realloc() <- trim to actual length
> >>>     netif->input()
> [snip]
> > I'm interested to hear if you have ideas on how to improve 
> my implementation.
> I don't know if this is what Simon is alluding to, but if you 
> get two receives in quick succession (which is surely quite 
> likely), the way you describe your implementation would 
> result in the second having a good chance of getting dropped 
> because another pbuf wasn't ready yet. Point being, there's a 
> window where no packet buffer is available.

Yep, that's exactly the same problem I'm having, too. Although
our hardware has multiple onchip-buffers, we're sometimes still
not fast enough to receive at full wire-speed, resulting in TCP
retransmissions :-(

The only way to work around that is to start DMA'ing as fast as
possible after receiving the packet (e.g. at interrupt level, but
that is sometimes not possible, either).

Anyway, that's the downside of not having a DMA enabled MAC!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]