]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
ebpf: Clean up useless error check in ebpf_rss_set_all()
authorMarkus Armbruster <armbru@redhat.com>
Tue, 18 Nov 2025 15:47:17 +0000 (16:47 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 18 Nov 2025 18:59:36 +0000 (19:59 +0100)
ebpf_rss_set_all() is only called when the context has an eBPF program
loaded.  Replace the dead error check with an assertion.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20251118154718.3969982-3-armbru@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
ebpf/ebpf_rss.c

index e793786c1729180b1ea96d4c5ea687c4b83391c2..b64e9da3e36052524139d5017bab5b953e4b999a 100644 (file)
@@ -247,10 +247,8 @@ bool ebpf_rss_set_all(struct EBPFRSSContext *ctx, struct EBPFRSSConfig *config,
                       uint16_t *indirections_table, uint8_t *toeplitz_key,
                       Error **errp)
 {
-    if (!ebpf_rss_is_loaded(ctx)) {
-        error_setg(errp, "eBPF program is not loaded");
-        return false;
-    }
+    g_assert(ebpf_rss_is_loaded(ctx));
+
     if (config == NULL) {
         error_setg(errp, "eBPF config table is NULL");
         return false;