tech-net archive

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

MP-safe pppoe(4)


My co-worker Shoichi YAMAGUCHI and I implement pppoe(4) MP-safe.
# Nearly all parts is written by him, thanks :)
Here is the patch.

At first, we try to use pserialize/psref, however pppoe would update
softc members in softint context of control packet processing. As their
update is higher priority than data packet, the control packet
processing cannot be modified to deferred processing such as
Furthermore, some packet processing path, that is, sppp_input() and
sppp_outout() write their softc members for keepalive.
So, we give up to use pserialize/psref...

Therefore, we use rwlock and mutex, the lock design of above patch
is below
    + for if_pppoe.c
      - "pppoe_softc_list_lock" rwlock
        => global lock for pppoe softc list
      - "softc->sc_session_lock" rwlock
        => per softc lock for some members which is frequently read by
           data packet processing path
      - "softc->sc_lock" mutex
        => per softc lock for other members which is read/written by
           control packet processing and ioctl
    + for if_spppsubr.c
      - "spppq_lock" mutex
        => global lock for sppp keep alive list
      - "sppp->pp_lock" mutex
        => per struct sppp mutex for whole sppp include write-mostly

Could you comment this patch?


Internet Initiative Japan Inc.

Device Engineering Section,
IoT Platform Development Department,
Network Division,
Technology Unit


Home | Main Index | Thread Index | Old Index