From nobody Sat Nov 23 14:51:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1715545119432538.0101007995569; Sun, 12 May 2024 13:18:39 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5E2F61A93; Sun, 12 May 2024 16:18:38 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 442CD1C0A; Sun, 12 May 2024 16:13:12 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 0E7D11A50; Sun, 12 May 2024 16:12:51 -0400 (EDT) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8283C1A57 for ; Sun, 12 May 2024 16:12:49 -0400 (EDT) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4200ee78e56so9543515e9.3 for ; Sun, 12 May 2024 13:12:49 -0700 (PDT) Received: from localhost.localdomain ([162.213.65.233]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42014f563adsm22354735e9.38.2024.05.12.13.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 13:12:47 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715544768; x=1716149568; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=R2KnnX4g/OlsSxeqsIhCc4AMelcK5O5t/4mY9Jv1keM=; b=rmgmTZbdRxSgmpP/N827OlyFsoUQwHryVCG5NxkYUj70RjX32VLkkbeQmv+Wl4nvqF JqMaiYQcrGcKo4n/BBVq4dZ2rSorIJq2frr+o2pc/eCS9x9C2+HcZP4Dw/GFZXTi6oqf Asqwg+yZhk/lHmeyv/epMPSwJQXQ+ugPAnbjFWCmTVEm4U52pqXV8fKlc5tSGhahwJl/ 0dqqRursRiSF7aQisSagFEUM9gsHJSn4n5NANy01bmd+eE12Dr/Z9DsKxYOXNjJRz93Q 8yiheB6W+RMDN4R3sntyjBEsmzEE+hNjpkOtvyDX5v+eNDArT4svdvT0gvutO7Tg3VpH eNeg== X-Gm-Message-State: AOJu0YwlnPPASmpJSZMYSxUNiTWcmunzRDHJiGzrR4tK3b+bXvWQ1J4G SUj30oKQ4SornMyV5DHYlcn1s3rpzc/BHSR2eSgkFPStUdj7sxFtYaJWUFadErZOfMzzpLmjIy3 d X-Google-Smtp-Source: AGHT+IGUiDz8cYm35R24rtsceBsX/Cu6TOJQ3x1LJ7OYkVqY3T5QdmpQQlfjoJ1AyJ9kfVEa9wHeJg== X-Received: by 2002:a05:600c:450e:b0:41b:d8ef:8dcd with SMTP id 5b1f17b1804b1-41feac59ea0mr60348485e9.28.1715544768020; Sun, 12 May 2024 13:12:48 -0700 (PDT) From: Andrew Melnychenko To: devel@lists.libvirt.org Subject: [RFC PATCH v3 5/6] qemu_conf: Added configuration to optionally disable eBPF loading. Date: Sun, 12 May 2024 22:45:47 +0300 Message-ID: <20240512194550.5023-6-andrew@daynix.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240512194550.5023-1-andrew@daynix.com> References: <20240512194550.5023-1-andrew@daynix.com> MIME-Version: 1.0 Message-ID-Hash: HCYPIQ5WMSPGKTKKAKZI6PZJXN6LN2L5 X-Message-ID-Hash: HCYPIQ5WMSPGKTKKAKZI6PZJXN6LN2L5 X-MailFrom: andrew@daynix.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0 CC: yuri.benditovich@daynix.com, yan@daynix.com X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1715545120355100001 Currently, there is no way to control that config through qemu.conf file. This optional is required for future eBPF tests. Signed-off-by: Andrew Melnychenko --- src/qemu/qemu_command.c | 8 +++++--- src/qemu/qemu_conf.c | 2 ++ src/qemu/qemu_conf.h | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 77715cf6fe..0d41d34c3b 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -8917,9 +8917,11 @@ qemuBuildInterfaceCommandLine(virQEMUDriver *driver, qemuFDPassDirectTransferCommand(netpriv->slirpfd, cmd); qemuFDPassTransferCommand(netpriv->vdpafd, cmd); =20 - qemuOpenEbpfRssFds(net, qemuCaps); - for (n =3D netpriv->ebpfrssfds; n; n =3D n->next) - qemuFDPassDirectTransferCommand(n->data, cmd); + if (cfg->allowEBPF) { + qemuOpenEbpfRssFds(net, qemuCaps); + for (n =3D netpriv->ebpfrssfds; n; n =3D n->next) + qemuFDPassDirectTransferCommand(n->data, cmd); + } =20 if (!(hostnetprops =3D qemuBuildHostNetProps(vm, net))) goto cleanup; diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 4050a82341..79168c3e54 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -287,6 +287,8 @@ virQEMUDriverConfig *virQEMUDriverConfigNew(bool privil= eged, cfg->deprecationBehavior =3D g_strdup("none"); cfg->storageUseNbdkit =3D USE_NBDKIT_DEFAULT; =20 + cfg->allowEBPF =3D true; + return g_steal_pointer(&cfg); } =20 diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 36049b4bfa..778897bd40 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -233,6 +233,8 @@ struct _virQEMUDriverConfig { bool storageUseNbdkit; =20 virQEMUSchedCore schedCore; + + bool allowEBPF; }; =20 G_DEFINE_AUTOPTR_CLEANUP_FUNC(virQEMUDriverConfig, virObjectUnref); --=20 2.44.0 _______________________________________________ Devel mailing list -- devel@lists.libvirt.org To unsubscribe send an email to devel-leave@lists.libvirt.org