[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] xen/public: add new macro to ring.h
- To: Juergen Gross <jgross@xxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Wed, 27 Apr 2022 09:11:55 +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=C+Itu8ukV/UjIqOAoynxGEAGLz9QbPd4mNuWdPdhqkY=; b=drWLndu5vYgesZOLyCY6/NGmZKjLZ2hJujTRFB0I0gsGZJ++wZv2lfNLSBqV14gBWWFqN6uH4bmKEfnTOaHH6KoJXQRhD9rTrfnNfhmpLw4ac9Sn9onR3OkcH6KQso+0Irip20tODG8IYNxK5qebubZ2GSqMeW6n7RFmsap4UAE0BxPjGDOl+T6lnfDINvR2EJULSUyHdDjxmOVKpNbKuYwl8Ye28+pwkQqJwqFcPWxcBQBXCqouaaF4e+tYXvykbLz6f0HVD3YQf8AqdXmpOhK3o29WAcdpAH4Op4RGzR/8wv9Gx1yT2d6Q8iHArPjketo/TRyEFRAqw6J8jsZKoQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QgGEMVaCXbKSkseTH0hmcDOoB5xLnTWfV1qZb/PPkhb2WvpX0yYZJTlMB3FiB9i7az5xxnQe3VM/XZaCViehn/Ofs6AUJMRO15vv1dAIYNJ60CuOX4OHaaJoxO0pvmRa3p83GUzerBiDeCmF9kXGopAze9Xtvm/Yfi2VpUMOSQ2wZqrUUdHy77wAt+2eMP+II/zkFTRIRKiHLwxc3IzBCaadlvMue76nuEYO1YDZ2ciegc/luWeqyWskPc23M68M2YArOJEz6mPo2JLpmHvZEAITk/f5fy9Reec9byc5Gq7dA7Kr4rZE3spflIIIhYQe2BX6VHSAoPIN/OYJjQ6yJA==
- 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, 27 Apr 2022 07:12:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 27.04.2022 09:03, Juergen Gross wrote:
> For the initialization of a ring page by the frontend two macros are
> available in ring.h: SHARED_RING_INIT() and FRONT_RING_INIT().
>
> All known users use always both of them in direct sequence.
>
> Add another macro XEN_FRONT_RING_INIT() combining the two macros.
>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit ...
> --- a/xen/include/public/io/ring.h
> +++ b/xen/include/public/io/ring.h
> @@ -95,9 +95,8 @@ typedef unsigned int RING_IDX;
> * of the shared memory area (PAGE_SIZE, for instance). To initialise
> * the front half:
> *
> - * mytag_front_ring_t front_ring;
> - * SHARED_RING_INIT((mytag_sring_t *)shared_page);
> - * FRONT_RING_INIT(&front_ring, (mytag_sring_t *)shared_page, PAGE_SIZE);
> + * mytag_front_ring_t ring;
> + * XEN_FRONT_RING_INIT(&ring, (mytag_sring_t *)shared_page, PAGE_SIZE);
... I had hoped for the original text to remain and the new macro
being suggested as a shorthand. But you're the maintainer ...
Jan
|