On 5/12/24 21:45, Andrew Melnychenko wrote: > 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 <andrew@xxxxxxxxxx> > --- > 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); > > - qemuOpenEbpfRssFds(net, qemuCaps); > - for (n = netpriv->ebpfrssfds; n; n = n->next) > - qemuFDPassDirectTransferCommand(n->data, cmd); > + if (cfg->allowEBPF) { > + qemuOpenEbpfRssFds(net, qemuCaps); > + for (n = netpriv->ebpfrssfds; n; n = n->next) > + qemuFDPassDirectTransferCommand(n->data, cmd); > + } > > if (!(hostnetprops = 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 privileged, > cfg->deprecationBehavior = g_strdup("none"); > cfg->storageUseNbdkit = USE_NBDKIT_DEFAULT; > > + cfg->allowEBPF = true; > + > return g_steal_pointer(&cfg); > } > > 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; > > virQEMUSchedCore schedCore; > + > + bool allowEBPF; > }; This structure should reflect knobs that are tunable in qemu.conf. If you need a temporary change of behaviour just for tests we use env vars for that. Michal