summary refs log tree commit diff stats
path: root/rust/qemu-api
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2025-07-11 11:44:15 +0200
committerJason Wang <jasowang@redhat.com>2025-07-15 10:26:16 +0800
commitbdebcb49f459237c094a5b9cb084515cfe05e1bc (patch)
tree1f6df9a5486cbe0935da35ca100d74fa31c5d5b1 /rust/qemu-api
parentd38c5e0d0c206dc52421b8bb777cefdf47c13b7e (diff)
downloadfocaccia-qemu-bdebcb49f459237c094a5b9cb084515cfe05e1bc.tar.gz
focaccia-qemu-bdebcb49f459237c094a5b9cb084515cfe05e1bc.zip
net/af-xdp: Fix up cleanup path upon failure in queue creation
While testing, it turned out that upon error in the queue creation loop,
we never trigger the af_xdp_cleanup() handler. This is because we pass
errp instead of a local err pointer into the various AF_XDP setup functions
instead of a scheme like:

    bool fn(..., Error **errp)
    {
        Error *err = NULL;

        foo(arg, &err);
        if (err) {
            handle the error...
            error_propagate(errp, err);
            return false;
        }
        ...
    }

The same is true for the attachment probing with bpf_xdp_query_id(). With a
conversion into the above format, the af_xdp_cleanup() handler is called as
expected. Note the error_propagate() handles a NULL err internally.

Fixes: cb039ef3d9e3 ("net: add initial support for AF_XDP network backend")
Reviewed-by: Ilya Maximets <i.maximets@ovn.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Ilya Maximets <i.maximets@ovn.org>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Anton Protopopov <aspsk@isovalent.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'rust/qemu-api')
0 files changed, 0 insertions, 0 deletions