diff options
| author | Jason Wang <[email protected]> | 2018-07-31 17:43:38 +0800 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-07-31 10:02:01 -0700 |
| commit | ca9e83b4a55bfa1cc1395b48c3bf70381833526b (patch) | |
| tree | 799f43a467e6825725d957993154a84365411af7 /tools/perf/scripts/python/sctop.py | |
| parent | 6293e4d674d0f6cb01cd19307dd477988776c521 (diff) | |
virtio-net: correctly update XDP_TX counters
Commit 5b8f3c8d30a6 ("virtio_net: Add XDP related stats") tries to
count TX XDP stats in virtnet_receive(). This will cause several
issues:
- virtnet_xdp_sq() was called without checking whether or not XDP is
set. This may cause out of bound access when there's no enough txq
for XDP.
- Stats were updated even if there's no XDP/XDP_TX.
Fixing this by reusing virtnet_xdp_xmit() for XDP_TX which can counts
TX XDP counter itself and remove the unnecessary tx stats embedded in
rx stats.
Reported-by: [email protected]
Fixes: 5b8f3c8d30a6 ("virtio_net: Add XDP related stats")
Cc: Toshiaki Makita <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sctop.py')
0 files changed, 0 insertions, 0 deletions