• Shay Agroskin's avatar
    net: ena: aggregate stats increase into a function · 89dd735e
    Shay Agroskin authored
    Introduce ena_increase_stat() function to increase statistics by a
    certain number.
    The function includes the
        - lock aquire (on 32bit machines)
        - stat increase
        - lock release (on 32bit machines)
    
    line sequence that is ubiquitous across the driver.
    
    The function increases a single stat at a time and several stats which
    are increased together weren't put into a function to avoid
    calling the function several times for each stat which looks bad and
    might decrease performance.
    Signed-off-by: default avatarShay Agroskin <shayagr@amazon.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    89dd735e
ena_netdev.c 122 KB