[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 15:10:11 +0200

> I'm using PBUF_POOL, as I started my driver from scratch 
> based on ethernetif.c. My issue was I wanted to locate my 
> ethernet driver in my rtos kernel but keep the rest of lwip 
> in userspace. Preallocating a max size pbuf to pass to the 
> driver then adjusting it's size on return seemed like the 
> cleanest implementation to get started with LWIP.
> I'm really just using pbuf_realloc to rewrite the length and 
> truncate the pbuf chain. Even with a PBUF_RAM realloc doesn't 
> truncate the payload any more.
> To balance memory usage and number of bpufs I've set 
> PBUF_POOL_BUFSIZE to 512 so an ethernet frame will be 1-3 
> pbufs, but for now I'm happy that it works at all.

OK, so that only works because you have an advanced DMA controller
at hand, I suppose. I thought the 'pbuf_alloc() 1514 bytes' were
in one piece, which is the only thing supported by most DMA-aware
MACs (which I have used so far, at least).

> I'm interested to hear if you have ideas on how to improve my 
> implementation.

Hmm, I'd say you have a very high latency here because you have no
real queue (or at least didn't describe it, so far?).

Other than that, it's king of that I do, too, so no more improvements
from my side ;-)


reply via email to

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