All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: ZhiPeng Lu <lu.zhipeng@zte.com.cn>
Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command
Date: Wed, 19 Apr 2017 13:41:47 +0200	[thread overview]
Message-ID: <20170419134147.458e4eb7.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <1492621028-16280-1-git-send-email-lu.zhipeng@zte.com.cn>

On Thu, 20 Apr 2017 00:57:08 +0800
ZhiPeng Lu <lu.zhipeng@zte.com.cn> wrote:

> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> index a02dbf2..60111dc 100644
> --- a/qga/qapi-schema.json
> +++ b/qga/qapi-schema.json
> @@ -1042,3 +1042,37 @@
>    'data':    { 'path': 'str', '*arg': ['str'], '*env': ['str'],
>                 '*input-data': 'str', '*capture-output': 'bool' },
>    'returns': 'GuestExec' }
> +##
> +# @GuestNetworkInterfaceStat:
> +#
> +# @rx_bytes: received bytes of interface
> +#
> +# @rx_packets: received packets of interface
> +#
> +# @rx_errs: received error packets of interface
> +# @rx_drop: received drop packets of interface
> +#
> +# Since: 2.10
> +##
> +{ 'struct': 'GuestNetworkInterfaceStat',
> +  'data': {'rx_bytes': 'uint64',
> +            'rx_packets': 'uint64',
> +            'rx_errs': 'uint64',
> +            'rx_drop': 'uint64',
> +            'tx_bytes': 'uint64',
> +            'tx_packets': 'uint64',
> +            'tx_errs': 'uint64',
> +            'tx_drop': 'uint64'
> +           } }
> +##
> +# @guest-network-get-interface-stat:
> +#
> +# Get list of interface stat
> +#
> +# Returns: List of GuestNetworkInterfaceStat on success.
> +#
> +# Since: 2.10
> +##
> +{ 'command': 'guest-network-get-interface-stat',
> +  'data':    {'bus': 'int64', 'slot': 'int64', 'function': 'int64','netname':'str'},
> +  'returns': ['GuestNetworkInterfaceStat'] }

Disregarding the question whether this command should be added to the
guest agent (I'll leave that to others to discuss), I don't think it's
a good idea to enshrine pci identifiers here, as it means that we would
need to add a new interface for every non-pci network device.

Can you use a more general device identifier interface? It's fine to
only support pci for now (as that is likely your use case anyway), but
there should be a way to extend this in the future.

  parent reply	other threads:[~2017-04-19 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-19 16:57 [Qemu-devel] [PATCH] qemu-ga: add guest-network-get-interface-stat command ZhiPeng Lu
2017-04-19  9:21 ` Daniel P. Berrange
2017-04-19 11:41 ` Cornelia Huck [this message]
2017-04-19 11:50   ` Daniel P. Berrange
2017-04-19 11:57     ` Cornelia Huck
2017-04-19 13:34 ` Eric Blake

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=20170419134147.458e4eb7.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=lu.zhipeng@zte.com.cn \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.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 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.