[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #59089] Optimisation of vj_uncompress_tcp breaks PPP

From: Ashley Duncan
Subject: [lwip-devel] [bug #59089] Optimisation of vj_uncompress_tcp breaks PPP
Date: Wed, 9 Sep 2020 20:28:25 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36


                 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



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")
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:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]