buglwIP - A Lightweight TCP/IP stack - Bugs: bug #59089, Optimisation of vj_uncompress_tcp...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #59089: Optimisation of vj_uncompress_tcp breaks PPP

Submitter:  Ashley Duncan <ashesman>
Submitted:  Thu 10 Sep 2020 12:28:23 AM UTC
   
 
Category:  PPP Severity:  1 - Wish
Item Group:  Faulty Behaviour Status:  Confirmed
Privacy:  Public Assigned to:  gradator
Open/Closed:  Open Planned Release:  None
lwIP version:  2.1.1

Fri 16 Oct 2020 11:38:01 PM UTC, comment #3: 

As a temporary measure (that is without doubt going to be permanent given how useful VJ compression is today ;-) ) I have disabled VJ support by default.

I added a comment on the feature enable flag that it is known to be broken.

And I'm lowering the bug priority to "Wish" because I doubt anyone need VJ compression today.

Sylvain Rochet <gradator>
Group Member
Thu 10 Sep 2020 01:24:56 AM UTC, comment #2: 

LOL, thanks.  Not what I wanted to hear after days of debugging!  Damn and I searched for known issues and didn't find anything. 

I agree with your comment about disabling by default.  Or completely removing it as if only used by dial up modems then what is the point...

Regards

Ashley

Ashley Duncan <ashesman>
Thu 10 Sep 2020 12:36:54 AM UTC, comment #1: 

Hi Ashley,

Yeah, I am aware of that. Thank you for creating the bug report, I really should have done it myself.

https://lists.nongnu.org/archive/html/lwip-users/2019-12/msg00034.html

Sylvain

Sylvain Rochet <gradator>
Group Member
Thu 10 Sep 2020 12:28:23 AM UTC, original submission:  

Context: Embedded project, STM32H7, GCC Arm V9, using PPP to communicate with a ublox Nina W152 WiFi module.  Lwip V2.1.2.

We have the need to build our code size optimised (-Os).  We use a debug build (Og) and a release build with Os.  We have had very robust and reliable communications on debug build.  Unfortunately since building a release build, the PPP connection to the module seemed unstable and erratic and communications was unreliable.

After several days of debugging it was traced down to a single function vj_uncompress_tcp in vj.c.  By disabling size optimisation of just this function (leaving it at Og). communications is excellent.  Compiling this function with Os breaks communication.  This is completely repeatable.

I have not delved into exactly what happens inside this function causing it to become an issue.

To fix the problem (when the entire project is built with Os):

#pragma GCC push_options
#pragma GCC optimize ("Og")
int
vj_uncompress_tcp(struct pbuf **nb, struct vjcompress *comp)
{
  ...
}
#pragma GCC pop_options

For now we have disabled VJ_SUPPORT in lwipopts.h as was not really required for this use case anyway.

Ashley Duncan <ashesman>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gradator (Posted a comment)
  • -email is unavailable- added by ashesman (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-10-16 gradator Severity3 - Normal 1 - Wish
    2020-09-10 gradator StatusNone Confirmed
        Assigned toNone gradator

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code