Re: [RFC PATCH v3 5/6] qemu_conf: Added configuration to optionally disable eBPF loading.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

On Fri, May 17, 2024 at 5:00 PM Michal Prívozník <mprivozn@xxxxxxxxxx> wrote:
>
> 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.

Yes, I need it only for tests. I'll work on it in the next version of patches.


>
> Michal
>




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux