[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] Bug in pbuf.c regarding PBUF_POOL
From: |
Goldschmidt Simon |
Subject: |
RE: [lwip-users] Bug in pbuf.c regarding PBUF_POOL |
Date: |
Mon, 13 Nov 2006 16:18:21 +0100 |
Uhm, that's exactly what I meant when starting this thread. I just think
the pbuf-pool-code NOT using SYS_LEIGHTWEIGHT_PROT should be removed
since I discovered it is buggy and wanted to protect other lwip-users
from running into this.
Of course, the SYS_LEIGHTWEIGHT_PROT must not be removed! This would
break the stack!
Simon
> -----Original Message-----
> From:
> address@hidden
> g
> [mailto:address@hidden
ongnu.org] On Behalf Of Pettinato, Jim
> Sent: Monday, November 13, 2006 2:55 PM
> To: Mailing list for lwIP users
> Subject: RE: [lwip-users] Bug in pbuf.c regarding PBUF_POOL
>
>
> I recall hashing this about previously; again I believe it is
> required when the OS does not provide a semaphore mechanism
> to assure the pbuf pool does not get corrupted. Whether a
> multi-threaded or single-threaded implementation, if the
> ethif interrupt routine is allocating and moving received
> packets using pbufs, there has to be a way to prevent that
> from happening in the middle of a critical section of the
> stack's code. THIS is why SYS_LIGHTWEIGHT_PROT exists and is needed.
>
> Read the comments in sys.h for more background... And someone
> correct me if I'm wrong, but I think this was Adam's original
> protection scheme and not something 'some programmer' added.
>
> I am using it and must also vote to retain this code.
>
> - Jim
>
>
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden
> On Behalf Of Peter Graf
> Sent: Sunday, November 12, 2006 5:25 AM
> To: Mailing list for lwIP users
> Subject: Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL
>
>
> Leon Woestenberg wrote:
>
> >> Thanks for the detailed post - good to see folks getting to grips
> >> with the stack. The above seemed to summarise quite nicely and I
> >> agree completely with that.
> >>
> > I completely agree with you; It's good to see there is
> interest in the
>
> > lwIP stack from developers that are concerned abouts its
> correctness.
> >
> > The SYS_LIGHTWEIGHT_PROT protection was introduced by one of the
> > developers using the stack to protect *ONLY* between
> interrupt context
>
> > and single-thread user-space context if I am not mistaken.
>
> I think you are mistaken.
>
> > I am all for removing it, because the locking solution does
> not scale
> > across different platforms.
>
> I have to use SYS_LIGHTWEIGHT_PROT in a _multithreaded_
> environment with interrupt-triggered device driver. Removing
> it would render lwIP unusable for me. I guess it lies in the
> nature of a simple locking mechanism to be platform specific,
> but that makes it "lightweight".
>
> I vote against a removal.
>
> All the best
> Peter
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
- Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL, (continued)
- Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL, Jonathan Larmour, 2006/11/19
- RE: [lwip-users] Bug in pbuf.c regarding PBUF_POOL, Pettinato, Jim, 2006/11/17
- Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL, Jonathan Larmour, 2006/11/17
- Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL, Peter Graf, 2006/11/18
Re: [lwip-users] Bug in pbuf.c regarding PBUF_POOL, Peter Graf, 2006/11/12