All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Joaquin de Andres" <me@xcancerberox.com.ar>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-arm@nongnu.org, "Cédric Le Goater" <clg@kaod.org>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Joel Stanley" <joel@jms.id.au>
Subject: Re: [RFC PATCH 2/5] hw/misc/led: Add LED_STATUS_CHANGED QAPI event
Date: Thu, 06 Aug 2020 10:17:20 +0200	[thread overview]
Message-ID: <87o8no89yn.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <87v9jsc1ih.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Mon, 15 Jun 2020 07:59:50 +0200")

Markus Armbruster <armbru@redhat.com> writes:

> Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
[...]
>> Commits f544d174dfc and 7f1e7b23d5 refers to the qmp-events.txt
>> for documentation on rate-limiting QMP events, but I can't find
>> it in the codebase. Two files matches 'qmp-events' but don't have
>> documentation: qapi/qmp-event.c and include/qapi/qmp-event.h.
>>
>> Last trace of it is in commit 231aaf3a8217. Apparently it was
>> somehow split qapi/event.json, then later c09656f1d392 move it
>> to qapi-schema.json, finally eb815e248f50 moved it to qapi/.
>>
>> Is the referred documentation now in docs/devel/qapi-code-gen.txt?
>> There is only one occurence of 'limit' but it is unrelated to
>> rate-limit.
>
> Commit 231aaf3a8217 is part of Marc-André's herculean QAPI/QMP doc
> reorganization: use only schema doc comments instead of spreading the
> knowledge over schema and several other files, with duplicated contents,
> confused readers, and annoyed writers.
>
> Before the reorganization, docs/qmp-events.txt listed the QMP events,
> and rate-limited events carried a
>
>     Note: this event is rate-limited.
>
> The reorganization moved this note into its event's doc comment.
> Example:
>
>     ##
>     # @WATCHDOG:
>     #
>     # Emitted when the watchdog device's timer is expired
>     #
>     # @action: action that has been taken
>     #
>     # Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
>     #       followed respectively by the RESET, SHUTDOWN, or STOP events
>     #
> --> # Note: This event is rate-limited.
>     #
>     [...]
>     ##
>     { 'event': 'WATCHDOG',
>       'data': { 'action': 'WatchdogAction' } }
>
> The QMP *protocol* is still documented in docs/interop/qmp-spec.txt.
> Relevant part:
>
>     2.5 Asynchronous events
>     -----------------------
>
>     As a result of state changes, the Server may send messages unilaterally
>     to the Client at any time, when not in the middle of any other
>     response. They are called "asynchronous events".
>
>     The format of asynchronous events is:
>
>     { "event": json-string, "data": json-object,
>       "timestamp": { "seconds": json-number, "microseconds": json-number } }
>
>      Where,
>
>     - The "event" member contains the event's name
>     - The "data" member contains event specific data, which is defined in a
>       per-event basis, it is optional
>     - The "timestamp" member contains the exact time of when the event
>       occurred in the Server. It is a fixed json-object with time in
>       seconds and microseconds relative to the Unix Epoch (1 Jan 1970); if
>       there is a failure to retrieve host time, both members of the
>       timestamp will be set to -1.
>
>     For a listing of supported asynchronous events, please, refer to the
>     qmp-events.txt file.
>
>     Some events are rate-limited to at most one per second.  If additional
>     "similar" events arrive within one second, all but the last one are
>     dropped, and the last one is delayed.  "Similar" normally means same
>     event type.  See qmp-events.txt for details.
>
> The reorganization neglected to update it for the removal of
> qmp-events.txt.  Should point to
> docs/interop/qemu-qmp-ref.{7,html,info,pdf,txt} now.
>
> Event rate-limiting is defined in monitor_qapi_event_conf[].  To
> rate-limit an event, add it to monitor_qapi_event_conf[], and also add
> the "Note: This event is rate-limited." to its schema doc comment.
>
> Doc bug: commit e2ae6159de "virtio-serial: report frontend connection
> state via monitor" neglected to add the note.
>
> Patches welcome!

Subject: [PATCH 1/3] docs/interop/qmp-spec: Point to the QEMU QMP reference manual
Message-Id: <20200806081147.3123652-2-armbru@redhat.com>

Subject: [PATCH 2/3] qapi: Document event VSERPORT_CHANGE is rate-limited
Message-Id: <20200806081147.3123652-3-armbru@redhat.com>



  reply	other threads:[~2020-08-06 11:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 12:34 [RFC PATCH 0/5] hw/misc: Add LED device Philippe Mathieu-Daudé
2020-06-09 12:34 ` [RFC PATCH 1/5] hw/misc: Add a " Philippe Mathieu-Daudé
2020-06-09 12:34 ` [RFC PATCH 2/5] hw/misc/led: Add LED_STATUS_CHANGED QAPI event Philippe Mathieu-Daudé
2020-06-09 14:29   ` Eric Blake
2020-06-12 15:51     ` Philippe Mathieu-Daudé
2020-06-15  5:59       ` Markus Armbruster
2020-08-06  8:17         ` Markus Armbruster [this message]
2020-06-09 12:34 ` [RFC PATCH 3/5] hw/misc/led: Add create_led_by_gpio_id() helper Philippe Mathieu-Daudé
2020-06-09 12:34 ` [RFC PATCH 4/5] hw/arm/microbit: Add a fake LED to use as proof-of-concept with Zephyr Philippe Mathieu-Daudé
2020-06-09 12:34 ` [RFC PATCH 5/5] hw/arm/tosa: Use LED device for the Bluetooth led Philippe Mathieu-Daudé

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=87o8no89yn.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=clg@kaod.org \
    --cc=f4bug@amsat.org \
    --cc=joel@jms.id.au \
    --cc=marcandre.lureau@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=me@xcancerberox.com.ar \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --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.