qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
	qemu-devel@nongnu.org, "Paul Durrant" <paul@xen.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Greg Kurz" <groug@kaod.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Eric Blake" <eblake@redhat.com>,
	xen-devel@lists.xenproject.org,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Laine Stump" <laine@redhat.com>
Subject: Re: [PATCH v13 17/17] net: stream: add QAPI events to report connection state
Date: Mon, 24 Oct 2022 14:04:31 +0200	[thread overview]
Message-ID: <20221024140431.2e93dd2b@elisabeth> (raw)
In-Reply-To: <87tu3tsczq.fsf@pond.sub.org>

On Mon, 24 Oct 2022 13:00:09 +0200
Markus Armbruster <armbru@redhat.com> wrote:

> Markus Armbruster <armbru@redhat.com> writes:
> 
> > Cc: Stefano Brivio
> >
> > Laurent Vivier <lvivier@redhat.com> writes:
> >  
> >> On 10/21/22 07:48, Markus Armbruster wrote:  
> >>> Laurent Vivier <lvivier@redhat.com> writes:
> >>>   
> >>>> The netdev reports NETDEV_STREAM_CONNECTED event when the backend
> >>>> is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected.  
> >>>
> >>> Use cases?  
> >>
> >> This is asked by Stefano Brivio to allow libvirt to detect if connection to passt is lost and to restart passt.  
> 
> [...]
> 
> >>> Could similar event signalling be useful for other kinds of netdev
> >>> backends?  
> >>
> >> I was wondering, but it becomes more complicated to be generic.  
> >
> > Making something complicated and generic where a simpler special
> > solution would do is the worst.
> >
> > Not quite as bad (but still plenty bad) is making a few special
> > solutions first, then replace them all with a generic solution.
> >
> > I believe we should have a good, hard think on possible applications of
> > a generic solution now.
> >
> > There is no need to hold back this series for that.
> >
> > If we conclude a generic solution is called for, we better replace this
> > special solution before it becomes ABI.  Either by replacing it before
> > we release it, or by keeping it unstable until we replace it.  
> 
> Stefano, any thoughts on this?

Actually, to me, it already looks as generic as it can be: stream
back-ends are the only ones connecting and disconnecting.

I quickly tried to think about possible, similar events for other
back-ends:

- user: handled by libslirp, there's no connection, and probably not
  much we can or want to export from libslirp itself

- tap, bridge: the closest equivalent would be interfaces changing
  states, but that's something that's also externally observable with a
  netlink socket, in case one needs to know. And in any case, it's
  logically very different from a connection or disconnection. If we
  want events for that, they should have different names

- vhost-user, vde: we could implement something similar if the need
  arises, but it should logically have a different name

- l2tpv3: stateless, same as datagram-oriented socket. No states, no
  events to report, I guess.

All in all, to me, NETDEV_STREAM_{,DIS}CONNECTED events here don't look
very "special" or hackish.

-- 
Stefano



  reply	other threads:[~2022-10-24 12:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 16:25 [PATCH v13 00/17] qapi: net: add unix socket type support to netdev backend Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 04/17] qapi: net: introduce a way to bypass qemu_opts_parse_noisily() Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 05/17] net: introduce qemu_set_info_str() function Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 07/17] net: socket: Don't ignore EINVAL on netdev socket connection Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 09/17] net: stream: add unix socket Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 10/17] net: dgram: make dgram_dst generic Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 12/17] net: dgram: add unix socket Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 14/17] qemu-sockets: update socket_uri() and socket_parse() to be consistent Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 15/17] net: stream: move to QIO to enable additional parameters Laurent Vivier
2022-10-20 16:25 ` [PATCH v13 17/17] net: stream: add QAPI events to report connection state Laurent Vivier
2022-10-21  5:48   ` Markus Armbruster
2022-10-21  8:13     ` Laurent Vivier
2022-10-21  9:12       ` Markus Armbruster
2022-10-21  9:36         ` Laurent Vivier
2022-10-21  9:41           ` Markus Armbruster
2022-10-21  9:40         ` Stefano Brivio
2022-10-21 10:55           ` Markus Armbruster
2022-10-24 11:00         ` Markus Armbruster
2022-10-24 12:04           ` Stefano Brivio [this message]
2022-10-24 12:29             ` Markus Armbruster
2022-10-21  5:49 ` [PATCH v13 00/17] qapi: net: add unix socket type support to netdev backend Jason Wang
2022-10-21  6:46   ` Markus Armbruster
2022-10-21  6:50     ` Jason Wang
2022-10-21  8:43       ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221024140431.2e93dd2b@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=groug@kaod.org \
    --cc=jasowang@redhat.com \
    --cc=laine@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=sstabellini@kernel.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).