All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: Re: POSIX error names and codes in PV protocols
Date: Fri, 27 Jan 2017 10:03:39 +0200	[thread overview]
Message-ID: <e6f59032-68ba-6e79-f931-71d94818cc9d@gmail.com> (raw)
In-Reply-To: <588B0C660200007800134757@prv-mh.provo.novell.com>

On 01/27/2017 10:01 AM, Jan Beulich wrote:
>>>> On 26.01.17 at 18:28, <andr2000@gmail.com> wrote:
>> The problem is that it is not exposed to Linux, but I can see it
>> in FreeBSD [1] and the helper to convert error codes [2] there as well.
>> Is there any reason these are not available in Linux?
> Well, the header should eventually get added there (but see also
> Julien's reply as to why no-one may have cared so far).
>
>> Besides this fact,
>> Konrad, Stefano, are you ok that we say in the protocol file that
>> these are the error codes used?
>> As error codes are unsigned ints, what should be used in packets?
>> uint16_t or uint32_t?
> Conventionally error codes are signed ints, and the width you
> need should be mostly dictated by other structure size constraints
> (i.e. if you have ample of space, int32_t may be more efficient to
> access, but if you have space restrictions, then int16_t should be
> fine as it can represent quite a bit larger a range than error codes
> will cover in the foreseeable future).
yes, what I put in sndif now is:
/*
  * STATUS RETURN CODES.
  *
  * Status return code is zero on success and -XEN_EXX on failure.
  */
...
  * status - int32_t, response status, zero on success and -XEN_EXX on 
failure
...
> Jan
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

      reply	other threads:[~2017-01-27  8:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26 14:40 POSIX error names and codes in PV protocols Oleksandr Andrushchenko
2017-01-26 15:44 ` Jan Beulich
2017-01-26 17:28   ` Oleksandr Andrushchenko
2017-01-26 17:38     ` Julien Grall
2017-01-26 17:38     ` Roger Pau Monné
2017-01-26 18:14       ` Oleksandr Andrushchenko
2017-01-26 18:16         ` Roger Pau Monné
2017-01-26 18:40           ` Oleksandr Andrushchenko
2017-01-27  8:01     ` Jan Beulich
2017-01-27  8:03       ` Oleksandr Andrushchenko [this message]

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=e6f59032-68ba-6e79-f931-71d94818cc9d@gmail.com \
    --to=andr2000@gmail.com \
    --cc=JBeulich@suse.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.