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

Re: [Xen-devel] [PATCH 09/25] errno: add POSIX error codes EMSGSIZE, ECONNREFUSED to the ABI



On Mon, Dec 3, 2018 at 7:42 AM Jan Beulich <JBeulich@xxxxxxxx> wrote:
>
> >>> On 01.12.18 at 02:32, <christopher.w.clark@xxxxxxxxx> wrote:
> > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
> > describes these codes thus:
> >     EMSGSIZE     : "Message too large"
> >     ECONNREFUSED : "Connection refused".
>
> If you were to go solely by what POSIX mandates to have, more
> additions would be necessary afaict. We had limited ourselves to
> some basic set, so selective additions need further rationale put
> here. The more that for both added error codes the use case in
> the hypervisor isn't immediately obvious.

Thanks for reviewing the series and the previous iterations of this work.

I note your other message indicating a preference for including these
changes at point of first use and I will do so in the next revision.

An aside before the rationales below: part of the motivation for
selection of these error codes is to continue alignment with the
modern v4v implementation in uxen where possible.

EMSGSIZE:

This series proposes to return EMSGSIZE for a sendv operation (patch
#15) where an excess amount of data, across all iovs, has been
supplied, exceeding either the statically configured maximum size of a
transmittable message, or the (variable) size of the ring registered
by another domain.

If the new code EMSGSIZE is not wanted, an alternative error code
could be EINVAL, though that is returned for other errors in the same
operation, such as supplying incorrectly sized individual iovs.

ECONNREFUSED:

This series proposes to return ECONNREFUSED whenever a remote domain
is specified that either does not exist or is not argo-enabled.
This affects both the ring registration and sending data operations.
(register op, patch #13; sendv op, patch #15)

ECONNREFUSED seems plausible for this use as it is determined by the
remote domain state within the hypervisor.

Elsewhere, ENODEV is already used to indicate that the local sending
domain cannot perform the operation due to its own state.
ENOENT is used in the unregister operation to indicate that the
domain's own ring that it is attempting to unregister is not present.

ENXIO could work; ECONNREFUSED just seems more descriptive.

Are you OK with these new codes if they are used as described here,
and melded into the patches which first use them?

Christopher

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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