• Paolo Abeni's avatar
    mptcp: avoid atomic bit manipulation when possible · e9d09bac
    Paolo Abeni authored
    Currently the msk->flags bitmask carries both state for the
    mptcp_release_cb() - mostly touched under the mptcp data lock
    - and others state info touched even outside such lock scope.
    
    As a consequence, msk->flags is always manipulated with
    atomic operations.
    
    This change splits such bitmask in two separate fields, so
    that we use plain bit operations when touching the
    cb-related info.
    
    The MPTCP_PUSH_PENDING bit needs additional care, as it is the
    only CB related field currently accessed either under the mptcp
    data lock or the mptcp socket lock.
    Let's add another mask just for such bit's sake.
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    e9d09bac
subflow.c 49.7 KB