[bug #59089] Optimisation of vj_uncompress_tcp breaks PPP

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #59089] Optimisation of vj_uncompress_tcp breaks PPP

yuanjianmin
URL:
  <https://savannah.nongnu.org/bugs/?59089>

                 Summary: Optimisation of vj_uncompress_tcp breaks PPP
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ashesman
            Submitted on: Thu 10 Sep 2020 12:28:23 AM UTC
                Category: PPP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.1

    _______________________________________________________

Details:

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.




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59089>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #59089] Optimisation of vj_uncompress_tcp breaks PPP

yuanjianmin
Update of bug #59089 (project lwip):

                  Status:                    None => Confirmed              
             Assigned to:                    None => gradator              

    _______________________________________________________

Follow-up 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


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59089>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #59089] Optimisation of vj_uncompress_tcp breaks PPP

yuanjianmin
Follow-up Comment #2, bug #59089 (project lwip):

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


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59089>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #59089] Optimisation of vj_uncompress_tcp breaks PPP

yuanjianmin
Update of bug #59089 (project lwip):

                Severity:              3 - Normal => 1 - Wish              

    _______________________________________________________

Follow-up 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.


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?59089>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel