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

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



On 27.04.22 09:11, Jan Beulich wrote:
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 ...

I prefer the single macro, as it is less code and has the proper
name space.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


 


Rackspace

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