[En-Nut-Discussion] PPP/AHDLC logic problems...

Brett Abbott Brett.Abbott at digital-telemetry.com
Sun Apr 17 01:16:14 CEST 2005


Vesa

The more solid PPP becomes, the better!  Eduardo's code appears stable 
but Im not 100% sure of the memory management/frees as you have 
suggested.  It may also pay for us to pull together a sample test 
harness (perhaps pppc.c) which ensures we all use the adaptor the same way.

Any additional suggestions are welcomed.  Im more than happy to code 
review and test a new version of adhlcavr.c/PPP.

Eduardo, have you found any issues with memory loss?

Cheers
Brett
Vesa Jääskeläinen wrote:

> Brett Abbott wrote:
>
>> Vesa, Harald
>>
>> I think this is the same problem already resolved by Eduardo Serantes 
>> but not released formally into NutOS.  He published his patch on 14th 
>> Jan 2005 to this discussion group for review.  Have a look at this, 
>> it is quite thorough.
>
>
> But that patch doesn't solve all problems in there. Additional 
> initialization is a good thing there after connection.
>
> This code however is a bit odd:
> ----
>         /* Added by Edu */
>           if (nb) {
>            NutHeapFree(nb);
>            nb=0;
>            }
>       /* End */
> ----
>
> Shouldn't "(*ifn->if_recv) (netdev, nb)" handle all free's ? If it 
> doesn't then there is bug elsewhere.
>
> There seems to be same fix for exiting loop. But other problems 
> remains there that I was talking about. I am little worried about the 
> fact that sometimes if I do HDLC_SETIFNET with value 0, it will reboot 
> whole system.
>
>> Ernst Stippl, Eduardo and I have tested this and in the words of 
>> Ernst (Jan 27), "In my opinion, it should be released".
>
>
> Most parts of the modifications is OK in my opinion, but it still 
> needs more work elsewhere.
>
>> I suspect there is still a minor memory leak associated with closing 
>> PPP (which was there since ppp was first release) surrounding routes 
>> not being removed - only an issue if you open and close it alot.
>
>
> Hmm... Perhaps I need to "reverse engineer" that state machine to 
> debug more these problems.
>
>> Im working (slowly) on a small mod to allow you to suspend PPP to 
>> issue short AT commands without disconnecting the PPP session but 
>> this isnt related to your issue.
>
>
> This is probably a good idea, but about that MUX case, I think 
> separate driver for it would be a better idea than using hack after a 
> hack :). But real option for pausing PPP would still be needed.
>
> Thanks,
> Vesa Jääskeläinen
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
>

-- 
-----------------------------------------------------------------
Brett Abbott, Managing Director, Digital Telemetry Limited
Email: Brett.Abbott at digital-telemetry.com
PO Box 24 036 Manners Street, Wellington, New Zealand
Phone +64 (4) 5666-860  Mobile +64 (21) 656-144
------------------- Commercial in confidence --------------------






More information about the En-Nut-Discussion mailing list