aboutsummaryrefslogtreecommitdiff
path: root/hw/net/virtio-net.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2024-10-23 09:51:03 +0100
committerJason Wang <jasowang@redhat.com>2024-10-28 14:37:25 +0800
commitae311fb31543ca4e9de38c8435ebbdf6eca664d9 (patch)
tree3296ab0901e8bf12baccf1456067a7dc99f0192c /hw/net/virtio-net.c
parentf5cae19d109b99ed48ad147fc6c6a641329119bd (diff)
downloadqemu-ae311fb31543ca4e9de38c8435ebbdf6eca664d9.zip
qemu-ae311fb31543ca4e9de38c8435ebbdf6eca664d9.tar.gz
qemu-ae311fb31543ca4e9de38c8435ebbdf6eca664d9.tar.bz2
hw/net: improve tracing of eBPF RSS setup
This adds more trace events to key eBPF RSS setup operations, and also distinguishes events from multiple NIC instances. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'hw/net/virtio-net.c')
-rw-r--r--hw/net/virtio-net.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index c08ae55..60e19bf 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -1241,6 +1241,7 @@ static bool virtio_net_attach_ebpf_to_backend(NICState *nic, int prog_fd)
return false;
}
+ trace_virtio_net_rss_attach_ebpf(nic, prog_fd);
return nc->info->set_steering_ebpf(nc, prog_fd);
}
@@ -1297,12 +1298,13 @@ static void virtio_net_commit_rss_config(VirtIONet *n)
}
}
- trace_virtio_net_rss_enable(n->rss_data.hash_types,
+ trace_virtio_net_rss_enable(n,
+ n->rss_data.hash_types,
n->rss_data.indirections_len,
sizeof(n->rss_data.key));
} else {
virtio_net_detach_ebpf_rss(n);
- trace_virtio_net_rss_disable();
+ trace_virtio_net_rss_disable(n);
}
}
@@ -1353,6 +1355,7 @@ static bool virtio_net_load_ebpf(VirtIONet *n, Error **errp)
bool ret = false;
if (virtio_net_attach_ebpf_to_backend(n->nic, -1)) {
+ trace_virtio_net_rss_load(n, n->nr_ebpf_rss_fds, n->ebpf_rss_fds);
if (n->ebpf_rss_fds) {
ret = virtio_net_load_ebpf_fds(n, errp);
} else {
@@ -1484,7 +1487,7 @@ static uint16_t virtio_net_handle_rss(VirtIONet *n,
virtio_net_commit_rss_config(n);
return queue_pairs;
error:
- trace_virtio_net_rss_error(err_msg, err_value);
+ trace_virtio_net_rss_error(n, err_msg, err_value);
virtio_net_disable_rss(n);
return 0;
}