All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Thomas Huth" <thuth@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	qemu-devel@nongnu.org, philmd@linaro.org, wangyanan55@huawei.com,
	pbonzini@redhat.com, "Peter Maydell" <peter.maydell@linaro.org>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: The madness of ad hoc special IDs
Date: Sat, 27 May 2023 09:59:16 +0200	[thread overview]
Message-ID: <87a5xqyzl7.fsf@pond.sub.org> (raw)
In-Reply-To: <87353i1bnt.fsf@pond.sub.org> (Markus Armbruster's message of "Sat, 27 May 2023 09:22:30 +0200")

Markus Armbruster <armbru@redhat.com> writes:

> Thomas Huth <thuth@redhat.com> writes:
>
>> On 23/05/2023 14.31, Markus Armbruster wrote:
>> ...
>>> To stop creating more moles, we need to reserve IDs for the system's
>>> use, and let the system pick only reserved IDs going forward.
>>
>> Just something to add here: We already have a function for generating
>> internal IDs, the id_generate() function in util/id.c ... our

id_generate() generates IDs of the form #<subsystem><number>, where
<number> counts up.  Suitable for IDs that are not part of the stable
interface.

When a system-picked ID needs to be part of the stable interface, we
pick it in some other way.

>> convention is that we use "#" as prefix for those, so for new code
>> (which is not affected by migration backward compatibility problems),
>> we should maybe take care of always using that prefix for internal
>> IDs, too.
>
> Valid point.

I propose to move towards the QAPI naming rules for user-picked IDs:
must begin with a letter, and contain only ASCII letters, digits,
hyphen, and underscore.



  reply	other threads:[~2023-05-27  7:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 13:17 [PATCH] machine: do not crash if default RAM backend name has been stollen Igor Mammedov
2023-05-22 13:33 ` Philippe Mathieu-Daudé
2023-05-23  9:10 ` Shaoqin Huang
2023-05-23 12:31 ` The madness of ad hoc special IDs (was: [PATCH] machine: do not crash if default RAM backend name has been stollen) Markus Armbruster
2023-05-23 12:56   ` Igor Mammedov
2023-05-27  7:45     ` The madness of ad hoc special IDs Markus Armbruster
2023-05-23 13:06   ` The madness of ad hoc special IDs (was: [PATCH] machine: do not crash if default RAM backend name has been stollen) Thomas Huth
2023-05-27  7:22     ` The madness of ad hoc special IDs Markus Armbruster
2023-05-27  7:59       ` Markus Armbruster [this message]
2023-05-23 13:16 ` [PATCH] machine: do not crash if default RAM backend name has been stollen Thomas Huth
2023-06-09 14:06 ` Igor Mammedov
2023-06-10 20:47   ` Thomas Huth

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=87a5xqyzl7.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.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 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.