qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: libvir-list@redhat.com, qemu-devel@nongnu.org,
	Luiz Capitulino <lcapitulino@redhat.com>,
	stefanha@redhat.com, Amos Kong <akong@redhat.com>,
	laine@laine.org
Subject: Re: [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information
Date: Fri, 24 May 2013 19:12:12 +0300	[thread overview]
Message-ID: <20130524161212.GA14700@redhat.com> (raw)
In-Reply-To: <87ip28mmky.fsf@blackfin.pond.sub.org>

On Fri, May 24, 2013 at 05:20:13PM +0200, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
> > On 05/24/2013 06:23 AM, Luiz Capitulino wrote:
> >>>> I don't think we need this argument. This command is quite simple in its
> >>>> response, let's do this filtering in HMP only.
> >>>
> >>> Event message contains the net client name, management might only want
> >>> to query the single net client.
> >> 
> >> The client can do the filtering itself.
> >
> > If we're arguing that we want this to be as responsive as possible, then
> > the less data we send over the wire, the faster management can react to
> > the guest's request for a particular NIC.  That is, if libvirt is
> > listening to events that says NIC2 wants to change rx-filter, libvirt
> > would rather do a filtered query where it knows the JSON array of 1
> > element matches NIC2 data, rather than do a global query and search
> > through the returned array until it finds NIC2.
> >
> > Filtering is relatively easy to add, whether you do it in QMP or make
> > every client add it.  Libvirt will survive if you don't have filtering,
> > but I don't see why we can't have it in QMP.  Also, if you DO decide to
> > rip filtering out of QMP, you STILL need to keep a per-NIC flag.  Since
> > the events say which NIC is requesting a change, even if the query reads
> > all nics, libvirt will only change the macvtap settings of the nic(s)
> > for which it has received an event (it doesn't make sense to waste time
> > requesting a (no-op) change to macvtap settings on a nic that hasn't
> > requested a change).  But if you argue that having no filtering in the
> > QMP command means that you can get away with a single flag instead of a
> > per-nic flag, then you will fail to emit an event for NIC2 if it changes
> > in between the time that NIC1 fired an event and libvirt finally does
> > the query, and libvirt wouldn't realize that NIC2 also needs a macvtap
> > change.
> 
> No disagreement on the need for a per-NIC flag.
> 
> I'm not sure I buy the responsiveness argument.  Sure, the fastest I/O
> is no I/O, but whether you read and parse 100 bytes or 1000 from a Unix
> domain socket once in a great while shouldn't make a difference.
> 
> My main concern is to keep the external interface simple.  I'm rather
> reluctant to have query commands grow options.
> 
> In a case where we need the "give me everything" query anyway, the "give
> me this particular part" option is additional complexity.  Needs
> justification, say arguments involving throughput, latency or client
> complexity.
> 
> Perhaps cases exist where we never want to ask for everything.  Then the
> "give me everything" query is useless, and the option should be
> mandatory.

We need the query for macvtap devices.  We don't need it
for tap devices. In that case you don't want tap device info.

Maybe some libvirt guys can tell us whether they prefer
a per device query or a global one with info for all NICs?

I think for HMP it's best to have nic optional.
Is it a good idea to make QMP match HMP closely?

-- 
MST

  reply	other threads:[~2013-05-24 16:12 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23  9:07 [Qemu-devel] [PATCH v3 0/2] mac programming over macvtap Amos Kong
2013-05-23  9:07 ` [Qemu-devel] [PATCH v3 1/2] net: introduce RX_FILTER_CHANGED event Amos Kong
2013-05-23 10:24   ` Michael S. Tsirkin
2013-05-23 14:28     ` Luiz Capitulino
2013-05-23 14:43       ` Michael S. Tsirkin
2013-05-23 14:52         ` Eric Blake
2013-05-23 14:57           ` Michael S. Tsirkin
2013-05-23 15:33             ` Luiz Capitulino
2013-05-24  3:20               ` Amos Kong
2013-05-23 12:01   ` Eric Blake
2013-06-26  6:54     ` Markus Armbruster
2013-06-26 13:53       ` Luiz Capitulino
2013-05-23  9:08 ` [Qemu-devel] [PATCH v3 2/2] net: introduce command to query rx-filter information Amos Kong
2013-05-23 10:23   ` Michael S. Tsirkin
2013-05-24  4:53     ` Amos Kong
2013-05-23 12:14   ` Eric Blake
2013-05-24  3:03     ` Amos Kong
2013-06-26  7:14     ` Markus Armbruster
2013-05-23 16:03   ` Luiz Capitulino
2013-05-24  3:08     ` Amos Kong
2013-05-24 12:23       ` Luiz Capitulino
2013-05-24 12:55         ` Eric Blake
2013-05-24 13:08           ` Luiz Capitulino
2013-05-24 13:23             ` Eric Blake
2013-06-26  9:35               ` Markus Armbruster
2013-05-24 15:20           ` Markus Armbruster
2013-05-24 16:12             ` Michael S. Tsirkin [this message]
2013-05-24 18:05               ` Eric Blake
2013-05-24 20:00                 ` Luiz Capitulino
2013-05-26  7:38                   ` Michael S. Tsirkin
2013-05-27  8:36                     ` Stefan Hajnoczi
2013-06-26  9:54   ` Markus Armbruster
2013-06-26 12:00     ` Markus Armbruster
2013-06-26 14:02       ` Luiz Capitulino
2013-06-26 14:15         ` Markus Armbruster
2013-06-28 14:04           ` Eric Blake
2013-06-28 17:27             ` Markus Armbruster
2013-07-01  3:24               ` Amos Kong
2013-07-02  6:33     ` Amos Kong
2013-07-02  9:05       ` Markus Armbruster
2013-07-02 10:40         ` Amos Kong
2013-07-02 13:27           ` Markus Armbruster
2013-07-04  3:31             ` Amos Kong
2013-07-04  6:28               ` Markus Armbruster
2013-07-11 14:05                 ` Amos Kong
2013-07-12  6:32                   ` Markus Armbruster
2013-07-12  7:07                     ` Amos Kong

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=20130524161212.GA14700@redhat.com \
    --to=mst@redhat.com \
    --cc=akong@redhat.com \
    --cc=armbru@redhat.com \
    --cc=laine@laine.org \
    --cc=lcapitulino@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).