• Toshiaki Makita's avatar
    virtio_net: Make drop counter per-queue · 2c4a2f7d
    Toshiaki Makita authored
    Since when XDP was introduced, drop counter has been able to be updated
    much more frequently than before, as XDP_DROP increments the counter.
    Thus for performance analysis per-queue drop counter would be useful.
    
    Also this avoids cache contention and race on updating the counter. It
    is currently racy because napi handlers read-modify-write it without any
    locks.
    
    There are more counters in dev->stats that are racy, but I left them
    per-device, because they are rarely updated and does not worth being
    per-queue counters IMHO. To fix them we need atomic ops or some kind of
    locks.
    Signed-off-by: default avatarToshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2c4a2f7d
virtio_net.c 80.8 KB