• David Howells's avatar
    rxrpc: Fix counting of new acks and nacks · 41b7fa15
    David Howells authored
    Fix the counting of new acks and nacks when parsing a packet - something
    that is used in congestion control.
    
    As the code stands, it merely notes if there are any nacks whereas what we
    really should do is compare the previous SACK table to the new one,
    assuming we get two successive ACK packets with nacks in them.  However, we
    really don't want to do that if we can avoid it as the tables might not
    correspond directly as one may be shifted from the other - something that
    will only get harder to deal with once extended ACK tables come into full
    use (with a capacity of up to 8192).
    
    Instead, count the number of nacks shifted out of the old SACK, the number
    of nacks retained in the portion still active and the number of new acks
    and nacks in the new table then calculate what we need.
    
    Note this ends up a bit of an estimate as the Rx protocol allows acks to be
    withdrawn by the receiver and packets requested to be retransmitted.
    
    Fixes: d57a3a15 ("rxrpc: Save last ACK's SACK table rather than marking txbufs")
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    cc: Marc Dionne <marc.dionne@auristor.com>
    cc: "David S. Miller" <davem@davemloft.net>
    cc: Eric Dumazet <edumazet@google.com>
    cc: Jakub Kicinski <kuba@kernel.org>
    cc: Paolo Abeni <pabeni@redhat.com>
    cc: linux-afs@lists.infradead.org
    cc: netdev@vger.kernel.org
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    41b7fa15
input.c 30.1 KB