• Eric Dumazet's avatar
    net: gro: change GRO overflow strategy · 600adc18
    Eric Dumazet authored
    GRO layer has a limit of 8 flows being held in GRO list,
    for performance reason.
    
    When a packet comes for a flow not yet in the list,
    and list is full, we immediately give it to upper
    stacks, lowering aggregation performance.
    
    With TSO auto sizing and FQ packet scheduler, this situation
    happens more often.
    
    This patch changes strategy to simply evict the oldest flow of
    the list. This works better because of the nature of packet
    trains for which GRO is efficient. This also has the effect
    of lowering the GRO latency if many flows are competing.
    
    Tested :
    
    Used a 40Gbps NIC, with 4 RX queues, and 200 concurrent TCP_STREAM
    netperf.
    
    Before patch, aggregate rate is 11Gbps (while a single flow can reach
    30Gbps)
    
    After patch, line rate is reached.
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Jerry Chu <hkchu@google.com>
    Cc: Neal Cardwell <ncardwell@google.com>
    Acked-by: default avatarNeal Cardwell <ncardwell@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    600adc18
dev.c 173 KB