[Top][All Lists]

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

[lwip-commits] [SCM] UNNAMED PROJECT branch, ppp-new, updated. cf3162cff

From: Sylvain Rochet
Subject: [lwip-commits] [SCM] UNNAMED PROJECT branch, ppp-new, updated. cf3162cff14365eada20bd4d1196c3ed83160b6b
Date: Fri, 26 Apr 2013 20:01:22 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "UNNAMED PROJECT".

The branch, ppp-new has been updated
       via  cf3162cff14365eada20bd4d1196c3ed83160b6b (commit)
       via  2350d941a510a25c4872e97c43b64b7c9f230287 (commit)
       via  25f9f55878f008113bc1f4a0068d4827ed4595b9 (commit)
      from  07540f33869a8b4522003ee27e950516807935f2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit cf3162cff14365eada20bd4d1196c3ed83160b6b
Author: Sylvain Rochet <address@hidden>
Date:   Fri Apr 26 21:55:30 2013 +0200

    PPP, moved PPP_INPROC_MULTITHREADED compile time option from ppp.h to opt.h

commit 2350d941a510a25c4872e97c43b64b7c9f230287
Author: Sylvain Rochet <address@hidden>
Date:   Fri Apr 26 21:51:15 2013 +0200

    PPP, added PPP_USE_PBUF_RAM compile time option
    pbuf_type PPP is using for LCP, PAP, CHAP, EAP, IPCP and IP6CP packets.
    Memory allocated must be single buffered for PPP to works, it requires pbuf
    that are not going to be chained when allocated. This requires setting
    PBUF_POOL_BUFSIZE to at least 512 bytes, which is quite huge for small 
    Setting PPP_USE_PBUF_RAM to 1 makes PPP use memory from heap where 
    buffers are required, allowing you to use a smaller PBUF_POOL_BUFSIZE.

commit 25f9f55878f008113bc1f4a0068d4827ed4595b9
Author: Sylvain Rochet <address@hidden>
Date:   Fri Apr 26 20:30:01 2013 +0200

    PPP, removed PPP_INPROC_OWNTHREAD feature, which almost only make things 
    I consider to remove the PPP_INPROC_OWNTHREAD crap in ppp-new,
    as said in bugs #37278 and #37353.
    1. It requires the ppp_input_thread() function to be modified to match
    user system, like some did by adding the vTaskDelete(NULL); FreeRTOS
    call at the end of the function, for example.
    This is a tiny-tiny fonction that should be, in my opinion, on the user
    port, like the Ethernet input thread we see in many Ethernet port.
    2. It is actually not that thread safe.
    2.1. pcb->phase IS modified by the lwIP core thread so it should at
    least be set to volatile, otherwise the pcb->phase copy may live
    indefinitely in CPU register. It works because of the sio_read()
    function call which without doubt flush pcb->phase copy from CPU
    register. I dont want to set ppp_pcb struct to volatile for obvious
    performance reasons.
    2.2. This function assume PCB still exists whatever is happening, which
    is not the case after you called ppp_delete() function outside of this
    thread. If sio_read() is blocking waiting data and pcb destroyed, it is
    going to read a deallocated pcb which luckily should still have
    pcb->phase set to 0 (=PHASE_DEAD) due to preallocated "control block"
    structures of lwIP. Even with sio_read_abort(), there might be timings
    issue due to a lack of a synchronization mechanism.
    3. I dislike the sys_msleep(1), it means that systems should have at
    least a 11 chr buffer at 115200/10 byte/s, and bigger with higher serial
    speed, for example with 3G/HSDPA modems accessed through SPI, at 20
    Mbits/s this is a ~2000 bytes buffer required to keep incoming data
    during this sleep, I don't see why we require systems to do so,
    sio_read() should obviously be a blocking call. I cannot easily
    remove this sleep because some systems might have wrongfully used this
    call as a CPU idle feature with a non blocking sio_read() call.


Summary of changes:
 src/include/lwip/opt.h           |   48 ++++++++---------
 src/include/netif/ppp/ppp.h      |   53 +-----------------
 src/include/netif/ppp/ppp_impl.h |   15 +++++-
 src/netif/ppp/chap-new.c         |    6 +-
 src/netif/ppp/eap.c              |   16 +++---
 src/netif/ppp/fsm.c              |    4 +-
 src/netif/ppp/lcp.c              |    2 +-
 src/netif/ppp/ppp.c              |  111 +++++++-------------------------------
 src/netif/ppp/upap.c             |    4 +-
 9 files changed, 74 insertions(+), 185 deletions(-)


reply via email to

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