From nobody Mon Feb 9 08:00:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1650964118; cv=none; d=zohomail.com; s=zohoarc; b=kKJDBVQLZVb1ThX/FtmE+Dq/8UVdPf40y9E7RhnGdgG6FIWUOOMbAYOfBv9qWqPMkHXiUjeGVrE6NwDBwIfPTrE4Yv0qDGDCj0SPPQgZGC2qUq1JosQ1t/NhdqB8ZM1bkYqzh9s3HQtF4H6+FKJ05Swnv22/FNGWHBJfP4stl6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1650964118; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=5ePbnWGj078M5rHzgpCHA5ttcI0pSrUoZ/F8e+XsuHY=; b=f24d1zOQVZgSBsqE1mif0CjQ1iD9g/cnqUhlDHaLQcBBv/hk7/lY+R2+1yGjYgtO5djX+yvjccfGGhqcHzccsZoDXotDlHJ2GP1ve8vCValQXa5Gj1Y8aVwrOLs0hKElAUgHBtpMd2cWCd0cC+DMBtHnIADFX0NJDb5eLhmfaQU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1650964118492199.319419660309; Tue, 26 Apr 2022 02:08:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.313585.531191 (Exim 4.92) (envelope-from ) id 1njHB9-00079c-Bg; Tue, 26 Apr 2022 09:08:15 +0000 Received: by outflank-mailman (output) from mailman id 313585.531191; Tue, 26 Apr 2022 09:08:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njHB9-00079V-8M; Tue, 26 Apr 2022 09:08:15 +0000 Received: by outflank-mailman (input) for mailman id 313585; Tue, 26 Apr 2022 09:08:14 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1njHB8-00079N-78 for xen-devel@lists.xenproject.org; Tue, 26 Apr 2022 09:08:14 +0000 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 6690b280-c540-11ec-8fc2-03012f2f19d4; Tue, 26 Apr 2022 11:08:13 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BD7FF1F388; Tue, 26 Apr 2022 09:08:12 +0000 (UTC) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A26AB13223; Tue, 26 Apr 2022 09:08:12 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id dSArJny2Z2LbKwAAMHmgww (envelope-from ); Tue, 26 Apr 2022 09:08:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 6690b280-c540-11ec-8fc2-03012f2f19d4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1650964092; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=5ePbnWGj078M5rHzgpCHA5ttcI0pSrUoZ/F8e+XsuHY=; b=jaNJr2TbX//2L6PODaycWGPhMzLA+c7yMPSTeG2PmeD3Ms3q9WfqXGdqrdIX8LzlKySI2F 4NM3oHaXRaGsTJp0Khdae3nq3Wbzy3H1mb9Mua1J1l5sVory1vdiZbSmdESEiguaVimh1G hgLtqUN3ScKwXwUXAMg/lMPT53tyKok= From: Juergen Gross To: xen-devel@lists.xenproject.org Cc: Juergen Gross Subject: [PATCH] xen/public: add new macro to ring.h Date: Tue, 26 Apr 2022 11:08:10 +0200 Message-Id: <20220426090810.28616-1-jgross@suse.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @suse.com) X-ZM-MESSAGEID: 1650964120195100005 Content-Type: text/plain; charset="utf-8" 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 --- xen/include/public/io/ring.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xen/include/public/io/ring.h b/xen/include/public/io/ring.h index 277af36e61..3925d6ad95 100644 --- 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 =20 #define FRONT_RING_INIT(_r, _s, __size) FRONT_RING_ATTACH(_r, _s, 0, __siz= e) =20 +#define XEN_FRONT_RING_INIT(_r, _s, __size) do { \ + SHARED_RING_INIT(_s); \ + FRONT_RING_INIT(_r, _s, __size); \ +} while (0) + #define BACK_RING_ATTACH(_r, _s, _i, __size) do { \ (_r)->rsp_prod_pvt =3D (_i); \ (_r)->req_cons =3D (_i); \ --=20 2.34.1