|
From: | EVS Hardware Dpt |
Subject: | Re: [lwip-users] pbuf len field equal zero |
Date: | Tue, 13 Dec 2005 18:18:39 +0100 |
lwip-users-bounces+christiaan.simons= address@hidden wrote on 13-12-2005
14:36:22:
> In the
> middle of a pbuf chain I get a pbuf with a len field being 0. If I
> skip it, then I broke the chain and I my ISR when calling pbuf_free,
> I suspect that the whole chain is not freed correctly.
You may not rechain / mangle pbuf-chain parts like you do with
> q->next = q->next->next;
then chain gets corrupted is such a way it cannot be freed properly.
> I have some difficulties to understand the signification of a pbuf
> wich len field is 0. Is it normal ?
Uh, no. If your driver creates this empty pbuf,
there is something wrong with that.
Especially when it is half-way the packet.
Maybe your driver must block until it gets a full ethernet frame.
Maybe it returns early. Some hardware has an 'early' interrupt,
so you could in theory check the headers before reading the packet payload.
Unfortunatly lwIP currently doesn't support this smart packet handling.
> Can I simply remove this entry
> and rebuild the chain without it ? For example :
No.
> This code is just for illustration, if it appears that I must
> rebuild the chain, then there are a lot of things to double check.
It shouldn't be needed to 'rebuild' a chain,
the chain should evenly and completely filled when the driver returns it.
Bye,
Christiaan Simons
Hardware / Software Engineer
Axon Digital Design
+31 (0)13 511 66 66
+31 (0)13 511 41 51
http://www.axon.tv
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee you should not
disseminate, distribute or copy this e-mail.
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |