• David Howells's avatar
    rxrpc: Clean up ACK handling · 530403d9
    David Howells authored
    Clean up the rxrpc_propose_ACK() function.  If deferred PING ACK proposal
    is split out, it's only really needed for deferred DELAY ACKs.  All other
    ACKs, bar terminal IDLE ACK are sent immediately.  The deferred IDLE ACK
    submission can be handled by conversion of a DELAY ACK into an IDLE ACK if
    there's nothing to be SACK'd.
    
    Also, because there's a delay between an ACK being generated and being
    transmitted, it's possible that other ACKs of the same type will be
    generated during that interval.  Apart from the ACK time and the serial
    number responded to, most of the ACK body, including window and SACK
    parameters, are not filled out till the point of transmission - so we can
    avoid generating a new ACK if there's one pending that will cover the SACK
    data we need to convey.
    
    Therefore, don't propose a new DELAY or IDLE ACK for a call if there's one
    already pending.
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: linux-afs@lists.infradead.org
    530403d9
misc.c 1.87 KB