diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2024-10-23 09:51:00 +0100 |
|---|---|---|
| committer | Jason Wang <jasowang@redhat.com> | 2024-10-28 14:37:25 +0800 |
| commit | 00b69f1d867ddcf8884c92f5647b424088e754e4 (patch) | |
| tree | 3f53103f187c3861380a18fba5fa216f6937037d /hw/net/virtio-net.c | |
| parent | 31efce1e311830431718536c6461815b04e08bf9 (diff) | |
| download | focaccia-qemu-00b69f1d867ddcf8884c92f5647b424088e754e4.tar.gz focaccia-qemu-00b69f1d867ddcf8884c92f5647b424088e754e4.zip | |
ebpf: add formal error reporting to all APIs
The eBPF code is currently reporting error messages through trace events. Trace events are fine for debugging, but they are not to be considered the primary error reporting mechanism, as their output is inaccessible to callers. This adds an "Error **errp" parameter to all methods which have important error scenarios to report to the caller. 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.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 7c050246ea..289fba8152 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -1265,7 +1265,8 @@ static bool virtio_net_attach_ebpf_rss(VirtIONet *n) rss_data_to_rss_config(&n->rss_data, &config); if (!ebpf_rss_set_all(&n->ebpf_rss, &config, - n->rss_data.indirections_table, n->rss_data.key)) { + n->rss_data.indirections_table, n->rss_data.key, + NULL)) { return false; } @@ -1336,7 +1337,7 @@ static bool virtio_net_load_ebpf_fds(VirtIONet *n) } } - ret = ebpf_rss_load_fds(&n->ebpf_rss, fds[0], fds[1], fds[2], fds[3]); + ret = ebpf_rss_load_fds(&n->ebpf_rss, fds[0], fds[1], fds[2], fds[3], NULL); exit: if (!ret) { @@ -1354,7 +1355,7 @@ static bool virtio_net_load_ebpf(VirtIONet *n) if (virtio_net_attach_ebpf_to_backend(n->nic, -1)) { if (!(n->ebpf_rss_fds && virtio_net_load_ebpf_fds(n))) { - ret = ebpf_rss_load(&n->ebpf_rss); + ret = ebpf_rss_load(&n->ebpf_rss, NULL); } } |