All of lore.kernel.org
 help / color / mirror / Atom feed
* If your networking is failing after updating to the latest git version of QEMU...
@ 2022-09-28  8:27 Thomas Huth
  2022-09-28 17:06 ` Philippe Mathieu-Daudé via
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Huth @ 2022-09-28  8:27 UTC (permalink / raw)
  To: QEMU Developers; +Cc: qemu-discuss


... it might have happened due to the removal of the "slirp" submodule from 
the git repository. For example if you see an error message like this:

  Parameter 'type' expects a netdev backend type

this likely means that the "user" mode backend type is not available in your 
binary anymore. To fix it, simply install "libslirp-devel" (or libslirp-dev 
or however it is called) from your OS distribution and recompile.

See also the commit message here:
  https://gitlab.com/qemu-project/qemu/-/commit/5890258aeeba303704

  Thomas



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-09-28  8:27 If your networking is failing after updating to the latest git version of QEMU Thomas Huth
@ 2022-09-28 17:06 ` Philippe Mathieu-Daudé via
  2022-09-29  2:32   ` Jason Wang
  0 siblings, 1 reply; 9+ messages in thread
From: Philippe Mathieu-Daudé via @ 2022-09-28 17:06 UTC (permalink / raw)
  To: Thomas Huth, Jason Wang, Marc-André Lureau
  Cc: qemu-discuss, QEMU Developers

On 28/9/22 10:27, Thomas Huth wrote:
> 
> ... it might have happened due to the removal of the "slirp" submodule 
> from the git repository. For example if you see an error message like this:
> 
>   Parameter 'type' expects a netdev backend type
> 
> this likely means that the "user" mode backend type is not available in 
> your binary anymore. To fix it, simply install "libslirp-devel" (or 
> libslirp-dev or however it is called) from your OS distribution and 
> recompile.

Thanks for the hint Thomas. I'm afraid many developers will miss your
email.

Jason, Marc-André, could we improve the buildsys check or display
a more helpful information from the code instead?

Thanks,

Phil.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-09-28 17:06 ` Philippe Mathieu-Daudé via
@ 2022-09-29  2:32   ` Jason Wang
  2022-09-29  6:34     ` Thomas Huth
  0 siblings, 1 reply; 9+ messages in thread
From: Jason Wang @ 2022-09-29  2:32 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Marc-André Lureau, qemu-discuss, QEMU Developers

On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On 28/9/22 10:27, Thomas Huth wrote:
> >
> > ... it might have happened due to the removal of the "slirp" submodule
> > from the git repository. For example if you see an error message like this:
> >
> >   Parameter 'type' expects a netdev backend type
> >
> > this likely means that the "user" mode backend type is not available in
> > your binary anymore. To fix it, simply install "libslirp-devel" (or
> > libslirp-dev or however it is called) from your OS distribution and
> > recompile.
>
> Thanks for the hint Thomas. I'm afraid many developers will miss your
> email.
>
> Jason, Marc-André, could we improve the buildsys check or display
> a more helpful information from the code instead?

It looks to me we need to improve the build.

Thanks

>
> Thanks,
>
> Phil.
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-09-29  2:32   ` Jason Wang
@ 2022-09-29  6:34     ` Thomas Huth
  2022-10-03  8:58       ` Alex Bennée
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Huth @ 2022-09-29  6:34 UTC (permalink / raw)
  To: Jason Wang, Philippe Mathieu-Daudé
  Cc: Marc-André Lureau, qemu-discuss, QEMU Developers,
	Daniel P. Berrange, Mark Cave-Ayland

On 29/09/2022 04.32, Jason Wang wrote:
> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>
>> On 28/9/22 10:27, Thomas Huth wrote:
>>>
>>> ... it might have happened due to the removal of the "slirp" submodule
>>> from the git repository. For example if you see an error message like this:
>>>
>>>    Parameter 'type' expects a netdev backend type
>>>
>>> this likely means that the "user" mode backend type is not available in
>>> your binary anymore. To fix it, simply install "libslirp-devel" (or
>>> libslirp-dev or however it is called) from your OS distribution and
>>> recompile.
>>
>> Thanks for the hint Thomas. I'm afraid many developers will miss your
>> email.
>>
>> Jason, Marc-André, could we improve the buildsys check or display
>> a more helpful information from the code instead?
> 
> It looks to me we need to improve the build.

I'm not sure there is anything to improve in the build system - 
configure/meson.build are just doing what they should: Pick the default 
value for "slirp" if the user did not explicitly specify "--enable-slirp".

But the error message is not very helpful. It should rather say something 
like (partly suggested by Daniel in IRC yesterday already):

  Type 'user' is not a supported netdev backend by this QEMU build. Please 
check the spelling or whether it has been enabled at compilation time.

... or something like this.

Someone interested to write a patch?

  Thomas



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-09-29  6:34     ` Thomas Huth
@ 2022-10-03  8:58       ` Alex Bennée
  2022-10-03  9:26         ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Bennée @ 2022-10-03  8:58 UTC (permalink / raw)
  To: Thomas Huth
  Cc: Jason Wang, Philippe Mathieu-Daudé,
	Marc-André Lureau, QEMU Developers, Daniel P. Berrange,
	Mark Cave-Ayland, qemu-discuss


Thomas Huth <thuth@redhat.com> writes:

> On 29/09/2022 04.32, Jason Wang wrote:
>> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>>>
>>> On 28/9/22 10:27, Thomas Huth wrote:
>>>>
>>>> ... it might have happened due to the removal of the "slirp" submodule
>>>> from the git repository. For example if you see an error message like this:
>>>>
>>>>    Parameter 'type' expects a netdev backend type
>>>>
>>>> this likely means that the "user" mode backend type is not available in
>>>> your binary anymore. To fix it, simply install "libslirp-devel" (or
>>>> libslirp-dev or however it is called) from your OS distribution and
>>>> recompile.
>>>
>>> Thanks for the hint Thomas. I'm afraid many developers will miss your
>>> email.
>>>
>>> Jason, Marc-André, could we improve the buildsys check or display
>>> a more helpful information from the code instead?
>> It looks to me we need to improve the build.
>
> I'm not sure there is anything to improve in the build system -
> configure/meson.build are just doing what they should: Pick the
> default value for "slirp" if the user did not explicitly specify
> "--enable-slirp".

Shouldn't it be the other way round and fail to configure unless the
user explicitly calls --disable-slirp?

>
> But the error message is not very helpful. It should rather say
> something like (partly suggested by Daniel in IRC yesterday already):
>
>  Type 'user' is not a supported netdev backend by this QEMU build.
>  Please check the spelling or whether it has been enabled at
> compilation time.
>
> ... or something like this.
>
> Someone interested to write a patch?
>
>  Thomas


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-10-03  8:58       ` Alex Bennée
@ 2022-10-03  9:26         ` Peter Maydell
  2022-10-03 10:22           ` Alex Bennée
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2022-10-03  9:26 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Thomas Huth, Jason Wang, Philippe Mathieu-Daudé,
	Marc-André Lureau, QEMU Developers, Daniel P. Berrange,
	Mark Cave-Ayland, qemu-discuss

On Mon, 3 Oct 2022 at 10:09, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Thomas Huth <thuth@redhat.com> writes:
>
> > On 29/09/2022 04.32, Jason Wang wrote:
> >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >>> Jason, Marc-André, could we improve the buildsys check or display
> >>> a more helpful information from the code instead?
> >> It looks to me we need to improve the build.
> >
> > I'm not sure there is anything to improve in the build system -
> > configure/meson.build are just doing what they should: Pick the
> > default value for "slirp" if the user did not explicitly specify
> > "--enable-slirp".
>
> Shouldn't it be the other way round and fail to configure unless the
> user explicitly calls --disable-slirp?

Our standard pattern for configure options is:
 --enable-foo : check for foo; if it can't be enabled, fail configure
 --disable-foo : don't even check for foo, and don't build it in
 no option given : check for foo, decide whether to build in support if
                   it's present

-- PMM


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-10-03  9:26         ` Peter Maydell
@ 2022-10-03 10:22           ` Alex Bennée
  2022-10-03 10:36             ` Peter Maydell
  0 siblings, 1 reply; 9+ messages in thread
From: Alex Bennée @ 2022-10-03 10:22 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Thomas Huth, Jason Wang, Philippe Mathieu-Daudé,
	Marc-André Lureau, QEMU Developers, Daniel P. Berrange,
	Mark Cave-Ayland, qemu-discuss


Peter Maydell <peter.maydell@linaro.org> writes:

> On Mon, 3 Oct 2022 at 10:09, Alex Bennée <alex.bennee@linaro.org> wrote:
>>
>>
>> Thomas Huth <thuth@redhat.com> writes:
>>
>> > On 29/09/2022 04.32, Jason Wang wrote:
>> >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> >>> Jason, Marc-André, could we improve the buildsys check or display
>> >>> a more helpful information from the code instead?
>> >> It looks to me we need to improve the build.
>> >
>> > I'm not sure there is anything to improve in the build system -
>> > configure/meson.build are just doing what they should: Pick the
>> > default value for "slirp" if the user did not explicitly specify
>> > "--enable-slirp".
>>
>> Shouldn't it be the other way round and fail to configure unless the
>> user explicitly calls --disable-slirp?
>
> Our standard pattern for configure options is:
>  --enable-foo : check for foo; if it can't be enabled, fail configure
>  --disable-foo : don't even check for foo, and don't build it in
>  no option given : check for foo, decide whether to build in support if
>                    it's present

Don't we make a distinction between libs that are truly optional and
those you probably need. It seems missing working networking is one of
those things we should be telling the user about unless explicitly
disabled. It is after all how we worked before, we would silently
checkout libslirp and build it for you.

>
> -- PMM


-- 
Alex Bennée


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-10-03 10:22           ` Alex Bennée
@ 2022-10-03 10:36             ` Peter Maydell
  2022-10-03 11:03               ` Daniel P. Berrangé
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2022-10-03 10:36 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Thomas Huth, Jason Wang, Philippe Mathieu-Daudé,
	Marc-André Lureau, QEMU Developers, Daniel P. Berrange,
	Mark Cave-Ayland, qemu-discuss

On Mon, 3 Oct 2022 at 11:25, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Peter Maydell <peter.maydell@linaro.org> writes:
>
> > On Mon, 3 Oct 2022 at 10:09, Alex Bennée <alex.bennee@linaro.org> wrote:
> >>
> >>
> >> Thomas Huth <thuth@redhat.com> writes:
> >>
> >> > On 29/09/2022 04.32, Jason Wang wrote:
> >> >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> >> >>> Jason, Marc-André, could we improve the buildsys check or display
> >> >>> a more helpful information from the code instead?
> >> >> It looks to me we need to improve the build.
> >> >
> >> > I'm not sure there is anything to improve in the build system -
> >> > configure/meson.build are just doing what they should: Pick the
> >> > default value for "slirp" if the user did not explicitly specify
> >> > "--enable-slirp".
> >>
> >> Shouldn't it be the other way round and fail to configure unless the
> >> user explicitly calls --disable-slirp?
> >
> > Our standard pattern for configure options is:
> >  --enable-foo : check for foo; if it can't be enabled, fail configure
> >  --disable-foo : don't even check for foo, and don't build it in
> >  no option given : check for foo, decide whether to build in support if
> >                    it's present
>
> Don't we make a distinction between libs that are truly optional and
> those you probably need.

Yes. If something is truly mandatory then configure will always
fail. This is true for zlib and glib, for instance...

> It seems missing working networking is one of
> those things we should be telling the user about unless explicitly
> disabled. It is after all how we worked before, we would silently
> checkout libslirp and build it for you.

...but building without libslirp is perfectly reasonable for some
configurations, eg where you know you're going to be using QEMU
in a TAP network config, and you don't want to have libslirp in
your binary so you don't have to think about whether you need to
act on security advisories relating to it. "no slirp" isn't like
"no zlib", where you can't build a QEMU at all. I think it's more
like gtk support, where we will happily configure without gtk/sdl/etc
and only build in the VNC frontend -- that's a working configuration
in some sense, but for the inexperienced user a QEMU which doesn't
produce a GUI window is almost certainly not what they wanted.

So we could:
 * say that we will opt for consistency, and have the slirp
   detection behave like every other optional library
 * say that slirp is a special case purely because we used to
   ship it as a submodule and so users are used to it being present
 * say that slirp is a special case because it's "optional but
   only experts will want to disable it", and think about what
   other configure options (like GUI support) we might want to
   move into this category

I don't think there's an obvious right answer here...

thanks
-- PMM


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: If your networking is failing after updating to the latest git version of QEMU...
  2022-10-03 10:36             ` Peter Maydell
@ 2022-10-03 11:03               ` Daniel P. Berrangé
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel P. Berrangé @ 2022-10-03 11:03 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Alex Bennée, Thomas Huth, Jason Wang,
	Philippe Mathieu-Daudé,
	Marc-André Lureau, QEMU Developers, Mark Cave-Ayland,
	qemu-discuss

On Mon, Oct 03, 2022 at 11:36:36AM +0100, Peter Maydell wrote:
> On Mon, 3 Oct 2022 at 11:25, Alex Bennée <alex.bennee@linaro.org> wrote:
> >
> >
> > Peter Maydell <peter.maydell@linaro.org> writes:
> >
> > > On Mon, 3 Oct 2022 at 10:09, Alex Bennée <alex.bennee@linaro.org> wrote:
> > >>
> > >>
> > >> Thomas Huth <thuth@redhat.com> writes:
> > >>
> > >> > On 29/09/2022 04.32, Jason Wang wrote:
> > >> >> On Thu, Sep 29, 2022 at 1:06 AM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> > >> >>> Jason, Marc-André, could we improve the buildsys check or display
> > >> >>> a more helpful information from the code instead?
> > >> >> It looks to me we need to improve the build.
> > >> >
> > >> > I'm not sure there is anything to improve in the build system -
> > >> > configure/meson.build are just doing what they should: Pick the
> > >> > default value for "slirp" if the user did not explicitly specify
> > >> > "--enable-slirp".
> > >>
> > >> Shouldn't it be the other way round and fail to configure unless the
> > >> user explicitly calls --disable-slirp?
> > >
> > > Our standard pattern for configure options is:
> > >  --enable-foo : check for foo; if it can't be enabled, fail configure
> > >  --disable-foo : don't even check for foo, and don't build it in
> > >  no option given : check for foo, decide whether to build in support if
> > >                    it's present
> >
> > Don't we make a distinction between libs that are truly optional and
> > those you probably need.
> 
> Yes. If something is truly mandatory then configure will always
> fail. This is true for zlib and glib, for instance...
> 
> > It seems missing working networking is one of
> > those things we should be telling the user about unless explicitly
> > disabled. It is after all how we worked before, we would silently
> > checkout libslirp and build it for you.
> 
> ...but building without libslirp is perfectly reasonable for some
> configurations, eg where you know you're going to be using QEMU
> in a TAP network config, and you don't want to have libslirp in
> your binary so you don't have to think about whether you need to
> act on security advisories relating to it. "no slirp" isn't like
> "no zlib", where you can't build a QEMU at all. I think it's more
> like gtk support, where we will happily configure without gtk/sdl/etc
> and only build in the VNC frontend -- that's a working configuration
> in some sense, but for the inexperienced user a QEMU which doesn't
> produce a GUI window is almost certainly not what they wanted.
> 
> So we could:
>  * say that we will opt for consistency, and have the slirp
>    detection behave like every other optional library
>  * say that slirp is a special case purely because we used to
>    ship it as a submodule and so users are used to it being present
>  * say that slirp is a special case because it's "optional but
>    only experts will want to disable it", and think about what
>    other configure options (like GUI support) we might want to
>    move into this category
> 
> I don't think there's an obvious right answer here...

What I find particularly wierd about slirp, is how we have conditionalized
the behaviour of a bare 'qemu-system-XXX' invokation. In a fully featured
build, a no-args QEMU will be equiv to "-net nic,model=MODEL -net user",
but in a non-SLIRP build a no-args QEMU is merely "-net nic,model=MODEL".

If you specified "-net nic,model=MODEL" normally, you would get a message
printed:

   warning: hub 0 is not connected to host network

but we squelch this warning for the built-in default network, even though
the defaults are useless because of the missing backend.

I'm surprised we didn't just entirely remove the default NIC when no slirp
is present, given it can't do anything useful with the traffic. The
complete absence of a NIC would give a stronger sign to users that
something is different.

Ultimately it is only this 'no args' default case that is a significant
problem, as the explicit slirp args case we can report a clear error
message that explains the missing feature. Is 'no args' default important
enough that we need to make slirp diverge from normal configure/meson
practice for detecting libs ?

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-03 11:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28  8:27 If your networking is failing after updating to the latest git version of QEMU Thomas Huth
2022-09-28 17:06 ` Philippe Mathieu-Daudé via
2022-09-29  2:32   ` Jason Wang
2022-09-29  6:34     ` Thomas Huth
2022-10-03  8:58       ` Alex Bennée
2022-10-03  9:26         ` Peter Maydell
2022-10-03 10:22           ` Alex Bennée
2022-10-03 10:36             ` Peter Maydell
2022-10-03 11:03               ` Daniel P. Berrangé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.