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

Re: [PATCH] xen/public: add new macro to ring.h


  • To: Juergen Gross <jgross@xxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 26 Apr 2022 11:43:28 +0200
  • 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=aBsKKHlyLqmSn2knHH9wbNuOYlQtIABaamErmqRjfhA=; b=RRVdTnwLy95u3ADtpxuDRlgYHfAQ+9xuuh4NBMu2nDV4rAa/KdKfbr/AbfpRhiBCj8pbcDjiGmvjXPhx2Fvd76A79u7M17/wukuPN5sIy3D3YnDAot4O5VCVPePPlokXSTJ4O+otRNBX/XDySyS24MGL63uyIL5gSpwiopddZF4zlUCbHU0BLMDdUyMfjrKx1omZ5x5jUk2pR1Awbp5Elbig3iz+/FdG8wi2RvN5PFIuFvOdYdQ344rxGbNqkxjYl2ubQbvU/JgZXF4QR9jNvc7QlnJvHMFHOw9zhpNYYzWn7Z3k5cZe0OtwhtvsTV9fN9UdWhtoujPSoQW4VUsMsQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m0LkS7shb2rF/UkJXwtsY5DImXpZ6zWwq2DQcty4kg44wTpE+nfZ4LlPjrDjST6C5pYwnEALufqW3TCzUhx7BDn4+jqrF4jXDOWQwBe+bUFigGmfANpdjHgiFzzfGGyG4ff8hSiGHcN238KLmonjv1VVBUgK1sJWhRk98S8rYf9GforyncLcG/c1K/L/8gv6DGxCwIhoQE/qGBEBI25KP1vnx9sIQegynldK9g18ugc7mIS7/fwj4Kh1hgOSiQEp1n4UqYxY6vlnZCCyK6fhrCchyhCT5exsBOUDrM9nrnz82iuiImK6o2B926I0dYIU60JilKoP/6+JLya1GZG41w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Tue, 26 Apr 2022 09:43:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26.04.2022 11:08, Juergen Gross wrote:
> --- a/xen/include/public/io/ring.h
> +++ b/xen/include/public/io/ring.h
> @@ -184,6 +184,11 @@ typedef struct __name##_back_ring __name##_back_ring_t
>  
>  #define FRONT_RING_INIT(_r, _s, __size) FRONT_RING_ATTACH(_r, _s, 0, __size)
>  
> +#define XEN_FRONT_RING_INIT(_r, _s, __size) do {                        \
> +    SHARED_RING_INIT(_s);                                               \
> +    FRONT_RING_INIT(_r, _s, __size);                                    \
> +} while (0)

I think it would be good for the comment around line 100 to also
have a reference to this.

As to style: Could I talk you into not further proliferating the
inappropriate use of underscore-prefixed names as macro parameters?
Even more so one with a double underscore?

As to functionality: I take it that it is not viewed as an issue
that many of the macros here evaluate their arguments multiple
times?

Jan




 


Rackspace

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