[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] POSIX error names and codes in PV protocols



>>> On 26.01.17 at 18:28, <andr2000@xxxxxxxxx> 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).

Jan


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.