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

Re: [PATCH] include/public: add command result definitions to vscsiif.h


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 16 Mar 2022 10:09:51 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=cx4tnqs/wWARA+sl3FemMKoPttYmicbLY2XbWDuaZOA=; b=QQqZrs54yOKq/SFtgM0WzhhqHz80kiDO8HuX28ABIhXQQx543kVKHw1UbqkZvba7OhTor43dtE297RxCqnHkXpAoI+ERuSBwYQs3Uqv9PCj+oWcbJQf+vaAvBjYIiqT1FyQ4SC5UJYexJ73N2esoSjUExiWYqhqBh6wUXorIFXAtAsZfIPRUQqldySmxW8BmlYN99x0Ytb9gTWbDV0DIv0uHs2J8a7BS0zuc2fuPi5hw4+3EjPRvST1YXt8NsjGHALci87KEuZC/d/sdAu8+IcAFIquGdSqsd3OCGypyfrNMz9597nemJ1QyC38TjV7BWV5URsbM22l0GMHUhm6JqA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RxPRNIAxl+74KBMK76Rc6pP/LAckfDSFqhN6Y0py2JfHlhKifr3nOCW/Xo9G73Au2/xtlRKWYN8MiPSK+1JWE653SPvxlLqcclEDRv7haft5/xWUhHXUiKCF8AyqtBKudQ3A3cCHIuds5xGjutJx2MQir88wz4LtbM0+7vsROtzssz393AkFrgV3b1B6tU2p1CWZMwSoJl86ruCYSvuna89+WdxYVAGvIMTwtaaVUoHJiA6Gw4uEsDiqNxy0+tcuu1NTGW5ij2Ohk7HH6sIWhpGJtCou4nVoMSiiigC3V7WeAxIMVo2j9nZSJ2VRiEBe+uheFV/5St6wXqfIYLIjNQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 16 Mar 2022 09:10:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 16.03.2022 10:03, Juergen Gross wrote:
> On 14.03.22 10:55, Jan Beulich wrote:
>> On 28.02.2022 12:22, Juergen Gross wrote:
>>> +#define XEN_VSCSIIF_RSLT_HOST_OK         0
>>> +#define XEN_VSCSIIF_RSLT_HOST_NO_CONN    1 /* Couldn't connect before 
>>> timeout */
>>> +#define XEN_VSCSIIF_RSLT_HOST_BUS_BUSY   2 /* BUS busy through timeout */
>>> +#define XEN_VSCSIIF_RSLT_HOST_TIME_OUT   3 /* TIMED OUT for other reason */
>>> +#define XEN_VSCSIIF_RSLT_HOST_BAD_TARG   4 /* BAD target */
>>
>> Are the all-upper-case words really in need of mirroring this
>> aspect from Linux? To me it gives the impression of this being
>> acronyms of some sort at the first glance.
> 
> The backend can return all these values, so I think I need to define
> them here.

Oh, I realize I didn't say so explicitly and hence what I said
ended up being ambiguous: The remark was only about the all-
upper-case words in the comments. I would think they can be
spelled normally.

>>> +#define XEN_VSCSIIF_RSLT_HOST_ABORT      5 /* Abort for some other reason 
>>> */
>>> +#define XEN_VSCSIIF_RSLT_HOST_PARITY     6 /* Parity error */
>>> +#define XEN_VSCSIIF_RSLT_HOST_ERROR      7 /* Internal error */
>>> +#define XEN_VSCSIIF_RSLT_HOST_RESET      8 /* Reset by somebody */
>>> +#define XEN_VSCSIIF_RSLT_HOST_BAD_INTR   9 /* Unexpected interrupt */
>>> +#define XEN_VSCSIIF_RSLT_HOST_PASSTHR   10 /* Force command past mid-layer 
>>> */
>>> +#define XEN_VSCSIIF_RSLT_HOST_SOFT_ERR  11 /* Retry requested */
>>> +#define XEN_VSCSIIF_RSLT_HOST_IMM_RETR  12 /* Hidden retry requested */
>>> +#define XEN_VSCSIIF_RSLT_HOST_REQUEUE   13 /* Requeue command requested */
>>> +#define XEN_VSCSIIF_RSLT_HOST_DISRUPT   14 /* Transport error disrupted 
>>> I/O */
>>> +#define XEN_VSCSIIF_RSLT_HOST_FAILFAST  15 /* Transport class fastfailed */
>>> +#define XEN_VSCSIIF_RSLT_HOST_TARG_FAIL 16 /* Permanent target failure */
>>> +#define XEN_VSCSIIF_RSLT_HOST_NEX_FAIL  17 /* Permanent nexus failure on 
>>> path */
>>> +#define XEN_VSCSIIF_RSLT_HOST_NOMEM     18 /* Space allocation failed */
>>> +#define XEN_VSCSIIF_RSLT_HOST_MED_ERR   19 /* Medium error */
>>> +#define XEN_VSCSIIF_RSLT_HOST_MARGINAL  20 /* Transport marginal errors */
>>
>> Some of the name shortening that you did, comparing with the
>> Linux names, has gone a little too far for my taste. But you're
>> the maintainer ...
> 
> There are basically the following alternatives:
> 
> - use longer names (using the Linux names would end up in e.g.
>    XEN_VSCSIIF_RSLT_HOST_TRANSPORT_DISRUPTED, making it 10 chars longer
> - drop some part of the common prefix, e.g. the "RSLT_HOST_" part
> - keep it as is
> 
> I'm basically fine with any of those.

My personal preference would be in the order you named the
alternatives, perhaps with prepending them by "use longer names,
but in extreme cases not quite as long as Linux'es".

Jan




 


Rackspace

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