[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] POSIX error names and codes in PV protocols
On 01/26/2017 05:44 PM, Jan Beulich wrote: On 26.01.17 at 15:40, <andr2000@xxxxxxxxx> 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? 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? Thank you, Oleksandr [1] https://github.com/freebsd/freebsd/blob/master/sys/xen/interface/errno.h [2] https://github.com/freebsd/freebsd/blob/master/sys/xen/error.h _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |