virtio-net: Do not propagate ebpf-rss-fds errors
commit283be5966eb7ec18fda3e95c979be620dfb8c72a
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Sun, 28 Apr 2024 07:00:50 +0000 (28 16:00 +0900)
committerJason Wang <jasowang@redhat.com>
Tue, 4 Jun 2024 07:14:26 +0000 (4 15:14 +0800)
treea2c0a00268614c2d0cd1d8d26134225c1b42c674
parent77db537995be8bcab215a99bc9c1b51066b56557
virtio-net: Do not propagate ebpf-rss-fds errors

Propagating ebpf-rss-fds errors has several problems.

First, it makes device realization fail and disables the fallback to the
conventional eBPF loading.

Second, it leaks memory by making device realization fail without
freeing memory already allocated.

Third, the convention is to set an error when a function returns false,
but virtio_net_load_ebpf_fds() and virtio_net_load_ebpf() returns false
without setting an error, which is confusing.

Remove the propagation to fix these problems.

Fixes: 0524ea0510a3 ("ebpf: Added eBPF initialization by fds.")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c