From: Stefan Hajnoczi <stefanha@gmail.com>
To: sfeldma@gmail.com
Cc: jiri@resnulli.us, qemu-devel@nongnu.org, dsahern@gmail.com
Subject: Re: [Qemu-devel] [PATCH v3 4/4] qmp/hmp: add rocker device support
Date: Tue, 2 Jun 2015 16:07:06 +0100 [thread overview]
Message-ID: <20150602150706.GC8199@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1432908109-31559-5-git-send-email-sfeldma@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1145 bytes --]
On Fri, May 29, 2015 at 07:01:49AM -0700, sfeldma@gmail.com wrote:
> +void hmp_rocker_of_dpa_flows(Monitor *mon, const QDict *qdict)
> +{
> + RockerOfDpaFlowList *list, *info;
> + const char *name = qdict_get_str(qdict, "name");
> + uint32_t tbl_id = qdict_get_try_int(qdict, "tbl_id", -1);
> + Error *errp = NULL;
> +
> + list = qmp_query_rocker_of_dpa_flows(name, tbl_id != -1, tbl_id, &errp);
> + if (errp != NULL) {
> + hmp_handle_error(mon, &errp);
> + return;
> + }
> +
> + monitor_printf(mon, "prio tbl hits key(mask) --> actions\n");
> +
> + for (info = list; info; info = info->next) {
> + RockerOfDpaFlow *flow = info->value;
> + RockerOfDpaFlowKey *key = flow->key;
> + RockerOfDpaFlowMask *mask = flow->mask;
> + RockerOfDpaFlowAction *action = flow->action;
> +
> + if (flow->hits) {
> + monitor_printf(mon, "%-4d %-3d %-4ld",
> + key->priority, key->tbl_id, flow->hits);
flow->hits is uint64_t so I changed the format string to use %-4" PRIu64
when merging the patches. This way it compiles cleanly on 32-bit hosts.
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-02 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 14:01 [Qemu-devel] [PATCH v3 0/4] rocker device updates sfeldma
2015-05-29 14:01 ` [Qemu-devel] [PATCH v3 1/4] rocker: Add support for phys name sfeldma
2015-06-02 16:27 ` Eric Blake
2015-05-29 14:01 ` [Qemu-devel] [PATCH v3 2/4] rocker: update tests using hw-derived interface names sfeldma
2015-05-29 14:01 ` [Qemu-devel] [PATCH v3 3/4] rocker: bring link up/down on PHY enable/disable sfeldma
2015-05-29 14:01 ` [Qemu-devel] [PATCH v3 4/4] qmp/hmp: add rocker device support sfeldma
2015-06-02 15:07 ` Stefan Hajnoczi [this message]
2015-06-02 16:32 ` Eric Blake
2015-06-02 15:09 ` [Qemu-devel] [PATCH v3 0/4] rocker device updates Stefan Hajnoczi
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=20150602150706.GC8199@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=dsahern@gmail.com \
--cc=jiri@resnulli.us \
--cc=qemu-devel@nongnu.org \
--cc=sfeldma@gmail.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).