All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Oleksandr Andrushchenko <andr2000@gmail.com>,
	Jan Beulich <JBeulich@suse.com>,
	"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: POSIX error names and codes in PV protocols
Date: Thu, 26 Jan 2017 17:38:14 +0000	[thread overview]
Message-ID: <62050071-f146-c0b6-0ee8-27f8b46c53b3@arm.com> (raw)
In-Reply-To: <5a87b588-867a-d5e8-9ca0-e0af58151f80@gmail.com>

Hi,

On 26/01/2017 17:28, Oleksandr Andrushchenko wrote:
> On 01/26/2017 05:44 PM, Jan Beulich wrote:
>>>>> On 26.01.17 at 15:40, <andr2000@gmail.com> wrote:
>>> There is some work happening on new PV protocols: sndif [1],
>>>
>>> displif [2], PV calls [3] and the common part of those is that
>>>
>>> error/status codes must be returned as a part of a response packet.
>>>
>>> For that Konrad suggested [1] (and Stefano already used in [3]) POSIX
>>>
>>> to be employed here instead of defining protocol specific error codes.
>>>
>>> The problem I see here is that POSIX only defines names of the errors,
>>>
>>> but not values [4]. So, in order to use POSIX one still needs to define
>>>
>>> the values (names must be the same, but values may differ for different
>>> OSes).
>>>
>>> So, the question is what would be the best option to
>>>
>>> a) have those numbers defined in OS agnostic way
>>>
>>> b) have those defined for all PV protocols
>>>
>>> Stefano has already defined the error code values in his work [3],
>>>
>>> but for other protocols this should be reimplemented again.
>> Aren't these simply what public/errno.h provides? Why would any
>> Xen specific protocol want to define their own, now that we have
>> this base set?
>>
>> Jan
> Indeed, thank you
> 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?

This is because Linux and Xen are using the exact same error codes. The 
one in FreeBSD differs a bit, hence the helper to convert errors.

Strictly speaking Linux should have a converter, but it is not necessary 
today.

Cheers,

-- 
Julien Grall

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

  reply	other threads:[~2017-01-26 17:38 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 [this message]
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

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=62050071-f146-c0b6-0ee8-27f8b46c53b3@arm.com \
    --to=julien.grall@arm.com \
    --cc=JBeulich@suse.com \
    --cc=andr2000@gmail.com \
    --cc=konrad.wilk@oracle.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.