• Eric Dumazet's avatar
    gve: fix gve_get_stats() · 2f57d497
    Eric Dumazet authored
    gve_get_stats() can report wrong numbers if/when u64_stats_fetch_retry()
    returns true.
    
    What is needed here is to sample values in temporary variables,
    and only use them after each loop is ended.
    
    Fixes: f5cedc84 ("gve: Add transmit and receive support")
    Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
    Cc: Catherine Sullivan <csully@google.com>
    Cc: Sagi Shahar <sagis@google.com>
    Cc: Jon Olson <jonolson@google.com>
    Cc: Willem de Bruijn <willemb@google.com>
    Cc: Luigi Rizzo <lrizzo@google.com>
    Cc: Jeroen de Borst <jeroendb@google.com>
    Cc: Tao Liu <xliutaox@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2f57d497
gve_main.c 41.4 KB