Received: by 10.192.165.148 with SMTP id m20csp4237804imm; Mon, 30 Apr 2018 14:31:23 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqDrgrj01Me61RGAA3VAZxxNMSREIRMLTN70LvxgbY7Y2PRhKwizz57kstesZ6k76Ea8o14 X-Received: by 2002:a63:6d81:: with SMTP id i123-v6mr11072613pgc.319.1525123883671; Mon, 30 Apr 2018 14:31:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525123883; cv=none; d=google.com; s=arc-20160816; b=hp55jknwKupp37gOopZ2jwgGVpmEgvK/aaoZ0NHbH610fz/vGlhaY+MRbaNJT57e/L Rx2dMaBGEmn7aTiW3X8GZSG/T4/AYwkZUb099wlLnuV+3x4JjpJcOb59GZNwJBOVhGpc kU4Qcy+/Hs0JBt81ArRh1YeAJ+1f1YnRDTssvC5YN7LzJRqOQyHiIOStQnLS2zC82AAd gRxvskv08bRKGsVGtZPC9FBD/HajO8BDBctfEKmaIZlsU+hZJhNGXQ307+bth4cFOSid 5u3g9ScrZRG1wAHADBxH6dSk5OxtX5mDh4ypGclRQ0j0JmE+YYmtJW0zsTV+SKRsuGVa PDiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=G1aFSIztCD7RPqqB2GcOFRGkgl8c29S1CBYLigFPnJs=; b=ICZDAT1Vh/fmC2efXtEE6RkLyFTVT0RNwtmphSSUsglwa8+FabaHELiNCccC6iMKWh O54XD2quX578B3/1zpclOXIMjBbpW4IN9eGLrqQmoKn6LPRfz45dcbEYqObhSE3w7JDY fJIroGtO3q1orG46Ic0bmKHB0loCscUrI3ZxjDoYVNfTGKvb4ub4Q18ggsjyGmVscwwz i68tqT61Zefa593cE3rQXScDlezt9Qb0kywB6CaQOoyX1pt+hQS/UmTkK6OD17TqG+6O UdzBsJjJAkgfoiVzfiXP6Za9eZnjoOpqfAmNDAueyGVqcDjCiVnXBv2h+DYdpH9iWa5q FJVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=CrYROQ41; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207-v6si6923550pgg.29.2018.04.30.14.31.09; Mon, 30 Apr 2018 14:31:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=CrYROQ41; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755179AbeD3Vaq (ORCPT + 99 others); Mon, 30 Apr 2018 17:30:46 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:41329 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbeD3Vao (ORCPT ); Mon, 30 Apr 2018 17:30:44 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 25DC222A4C; Mon, 30 Apr 2018 17:30:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 30 Apr 2018 17:30:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=G1aFSIztCD7RPqqB2GcOFRGkgl8c2 9S1CBYLigFPnJs=; b=CrYROQ41wMTn2VedkkPGwl6l6kljWNue28Zt+8BSftH96 mIq+sZVxyIW4nNnfE8IWTVUy6GufLLUyMVR2dPcmHGXC9uYfpoiVwfQP/w2lEPIy rQwqv+scaDe/W/yWb5JCzxqyErVuImX9LVJbpDsStq37AqQIxz5JvMPqLwCBXBDb WKIeuCWBgI2yvlXhC/85TaeOWUZB3nwQ/BF3ZXsXHlqNthO1S+U16RuFy+CgkTpm LIbDvW+kg40SESh/XOBj8mNqmyuedJEjGnN9idGwYlXR7TeETCMaBpoKfd0ZnU0U hKkrZtsL1/SL026EvxjsB77F4/vbUsp1dmaoOXx3Q== X-ME-Sender: Received: from mail-itl (ip5b40bfaa.dynamic.kabel-deutschland.de [91.64.191.170]) by mail.messagingengine.com (Postfix) with ESMTPA id 07A83E4488; Mon, 30 Apr 2018 17:30:42 -0400 (EDT) Date: Mon, 30 Apr 2018 23:27:19 +0200 From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= To: Boris Ostrovsky Cc: xen-devel@lists.xenproject.org, stable@vger.kernel.org, Juergen Gross , Stefano Stabellini , Greg Kroah-Hartman , open list Subject: Re: [PATCH 1/6] xen: Add RING_COPY_RESPONSE() Message-ID: <20180430212719.GF1124@mail-itl> References: <7bd2ff07-9d29-8dea-6f55-5ff24ddd433c@oracle.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sfyO1m2EN8ZOtJL6" Content-Disposition: inline In-Reply-To: <7bd2ff07-9d29-8dea-6f55-5ff24ddd433c@oracle.com> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --sfyO1m2EN8ZOtJL6 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 30, 2018 at 05:25:52PM -0400, Boris Ostrovsky wrote: > Also, perhaps the two can be collapsed together, along the lines of >=20 > #define RING_COPY_(action, _r, _idx, _msg) do {=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 /* Use volatile to force the c= opy into _msg. */=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 *(_msg) =3D *(volatile typeof(= _msg))RING_GET_##action(_r, _idx);=C2=A0=C2=A0 \ > } while (0) >=20 > #define RING_COPY_REQUEST(_r, _idx, _req)=C2=A0 RING_COPY_(REQUEST, _r, _= idx, > _req) > #define RING_COPY_RESPONSE(_r, _idx, _rsp)=C2=A0 RING_COPY_(RESPONSE, _r, > _idx, _rsp) >=20 >=20 > (I have not tried to compile this so it may well be wrong) It works, thanks :) I'll wait with v2 until I get feedback on other patches. --=20 Best Regards, Marek Marczykowski-G=C3=B3recki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? --sfyO1m2EN8ZOtJL6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAlrnijYACgkQ24/THMrX 1ywe5wf/ZbvSaUrZdwxhc0FnZ+2VY0DWPXMMvBQIYdQWgdQ9mQGDaSyNcDGhasBc Rotc1hjHj1BoCwuzCs4K7VsN6nqQ6oiMawL2LQnYUx4EFulZIXWHDYitJzKPvaot IxnaF+98TvRX1UMLLeSZ/V6iJtp6GxoEi6iAynqUxly/F8vF4WjQjBx81TRBpULJ tcdFdML8GhndBMU4KP27n7+0JXeaAPOWcXC2YZ9F0cWugTf69ZU7xIItcoq57RD7 nBaBi2BqnhkV3G4lWKJp19alhwWErhqDAMqTU32hf8g2hz1+kzbSc+G5BegQPfWk UKLpd7zXgf/d5I/Xtx8cDfYUGO6xaw== =iFoD -----END PGP SIGNATURE----- --sfyO1m2EN8ZOtJL6--