All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Jürgen Groß" <jgross@suse.com>
Cc: xen-devel@lists.xenproject.org,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Julien Grall" <julien@xen.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>
Subject: Re: [PATCH v3] docs: specify numerical values of Xenstore commands
Date: Thu, 13 Mar 2025 10:16:36 +0000	[thread overview]
Message-ID: <Z9Kwgqe9FUgrpSUs@l14> (raw)
In-Reply-To: <ade9e905-f9d5-468c-bad6-acc996378f06@suse.com>

On Thu, Mar 13, 2025 at 10:51:06AM +0100, Jürgen Groß wrote:
> On 12.03.25 17:46, Anthony PERARD wrote:
> > On Wed, Mar 12, 2025 at 09:41:43AM +0100, Juergen Gross wrote:
> > > diff --git a/docs/misc/xenstore.txt b/docs/misc/xenstore.txt
> > > index 7e1f031520..72db73deef 100644
> > > --- a/docs/misc/xenstore.txt
> > > +++ b/docs/misc/xenstore.txt
> > > @@ -86,6 +86,67 @@ parts of xenstore inaccessible to some clients.  In any case passing
> > > +XS_CONTROL               0    optional
> > > +    If not supported, xenstore-control command will not work.
> > > +    XS_DEBUG is a deprecated alias of XS_CONTROL.
> > > +XS_DIRECTORY             1
> > > +XS_READ                  2
> > > +XS_GET_PERMS             3
> >
> > This new table prefix message type names with "XS_", but the rest of the
> > document describe each type without the prefix. Isn't it going to be
> > confusing, and make it slightly harder to link this table to rest of the
> > document? (I often search by full word, like '\<GET_PERMS\>', because
> > that one key stroke in vim '*', so having different prefix makes it
> > harder to search)
>
> Question is, should I change the table to drop "XS_", or the rest document
> to add "XS_" instead? After all xs_wire.h is defining the names with "XS_".
>
> I'm slightly leaning towards a preparatory patch adding "XS_".

Well, I'm actually for dropping the prefix from the table. The prefix is
more of a C specific namespace than anything else. The ocaml
implementation in tree doesn't use this prefix, but a different one (if
we ignore the different case:
> Xenbus.Xb.Op.Watch
https://elixir.bootlin.com/xen/v4.20.0/source/tools/ocaml/xenstored/process.ml#L632
And have a link to a string without the prefix:
> | Watch			-> "WATCH"
https://elixir.bootlin.com/xen/v4.20.0/source/tools/ocaml/libs/xb/op.ml#L49

There's also a version in Rust which also use a different prefix,
"XsMessageType::".
https://github.com/Wenzel/xenstore/blob/f82bd45cbcd1aa98306c57d35847e3d77f7cc8ee/src/wire.rs#L55

So the prefix is really programming language specific and I don't think
introducing it to this document would be useful.

Thanks,

--

Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech



  reply	other threads:[~2025-03-13 10:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12  8:41 [PATCH v3] docs: specify numerical values of Xenstore commands Juergen Gross
2025-03-12 16:46 ` Anthony PERARD
2025-03-13  9:51   ` Jürgen Groß
2025-03-13 10:16     ` Anthony PERARD [this message]
2025-03-13 10:19       ` Jürgen Groß

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=Z9Kwgqe9FUgrpSUs@l14 \
    --to=anthony.perard@vates.tech \
    --cc=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.