summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2026-03-24 11:15:54 -0400
committerJakub Kicinski <kuba@kernel.org>2026-03-26 20:07:45 -0700
commitfe3e54253f0b04ec9e85d46e10aadbdbb31d29b2 (patch)
tree2f0de70d672b30d9687957f7ba777b50f49e4467 /tools/perf/scripts/python/stackcollapse.py
parenta771cddbd6541587b2b423576a57e4217ec11a38 (diff)
virtio_net: sync RX buffer before reading the header
receive_buf() reads the virtio header through buf before page_pool_dma_sync_for_cpu() runs in receive_small() or receive_mergeable(). The header buffer is thus unsynchronized at the point where flags and, for mergeable buffers, num_buffers are consumed. Omar Elghoul reported that on s390x Secure Execution this showed up as greatly reduced virtio-net performance together with "bad gso" and "bad csum" messages in dmesg. This is because with SE sync actually copies data, so the header is uninitialized. Move the sync into receive_buf() so the header is synchronized before any access through buf. Tool use: Cursor with GPT-5.4 drafted the initial code move from prompt: "in drivers/net/virtio_net.c, move page_pool_dma_sync_for_cpu on receive path to before memory is accessed through buf". The result and the commit log were reviewed and edited manually. Fixes: 24fbd3967f3f ("virtio_net: add page_pool support for buffer allocation") Reported-by: Omar Elghoul <oelghoul@linux.ibm.com> Tested-by: Srikanth Aithal <sraithal@amd.com> Tested-by: Omar Elghoul <oelghoul@linux.ibm.com> Link: https://lore.kernel.org/r/20260323150136.14452-1-oelghoul@linux.ibm.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Vishwanath Seshagiri <vishs@meta.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://patch.msgid.link/f4caa9be9e5addae7851c012cab0a733be7f0974.1774365273.git.mst@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions