From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 1/2] xen/kbdif: update protocol documentation Date: Wed, 11 Jan 2017 18:35:27 +0100 Message-ID: <1484156127.32021.143.camel@citrix.com> References: <1483695173-7600-1-git-send-email-andr2000@gmail.com> <1483695173-7600-2-git-send-email-andr2000@gmail.com> <527e8987-481b-4df0-b329-1f133b260fa4@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3754344744424503781==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cRMoE-0000lo-26 for xen-devel@lists.xenproject.org; Wed, 11 Jan 2017 17:35:38 +0000 In-Reply-To: <527e8987-481b-4df0-b329-1f133b260fa4@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Oleksandr Andrushchenko , Stefano Stabellini Cc: lars.kurth@citrix.com, vlad.babchuk@gmail.com, julien.grall@arm.com, andrii.anisov@gmail.com, olekstysh@gmail.com, al1img@gmail.com, JBeulich@suse.com, xen-devel@lists.xenproject.org, joculator@gmail.com List-Id: xen-devel@lists.xenproject.org --===============3754344744424503781== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-YaH4K/C53eWAdSzEQP5y" --=-YaH4K/C53eWAdSzEQP5y Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2017-01-10 at 09:21 +0200, Oleksandr Andrushchenko wrote: > On 01/07/2017 12:20 AM, Stefano Stabellini wrote: > > On Fri, 6 Jan 2017, Oleksandr Andrushchenko wrote: > > > |=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=A0reserved=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| > > > + * +-----------------+-----------------+-----------------+---- > > > -------------+ > > > + * > > > |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\ > > > /\/\/\/| > > > + * +-----------------+-----------------+-----------------+---- > > > -------------+ > > I guess this means that we are skipping some bytes because they are > > all > > reserved, right?=C2=A0=C2=A0If so, it would be useful to write the byte= count > > at this > > point. What's the total size of the event struct? > >=20 > IMO, we shouldn't put any sizes here because: > 1. Above we say "All event packets have the same > =C2=A0=C2=A0=C2=A0=C2=A0length (40 octets)" > 2. All the event structures are part of the > union xenkbd_in_event, which has > char pad[XENKBD_IN_EVENT_SIZE]; > which effectively regulates the size of the event. >=20 In which case, you can use either 40 or=C2=A0XENKBD_IN_EVENT_SIZE (probably the latter). It's indeed a repetition, but a good one, IMO: it helps the reader, as she won't have to go back to figure out how big the struct was, how the macro was call and to what value it was defined). Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-YaH4K/C53eWAdSzEQP5y Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJYdmzfAAoJEBZCeImluHPuG/oP/RVMQ1PxCCYop4cVVMvErMcD sg+uWKOpTdGhynz6vlJqYquaCMNfB1MLxvOyXBWVgVUJL+pWp62o/FKSves4zf3W qSoXNFb4BJOZLuGFEx6yuxnsfKBBPXiuq04OGRH9HvOUxf5Y8korWMo/jl82/ySI qP12hOAUuO//K86mpGTSHHVRzPlOjwhy/q29g0OIHzU+t3Wi65W7+R8YS24vhM74 OP4Dq+Q3JmcRo8pzaSGXJGPVEFoOhonCS/N0Vq20peUacMrQwgeX2/9WKn1sjB18 Nm2ByAgNlGPE2ZOr7hzgj2olbbDPmf/UZngLGie01jav9AAPD+FvzHU7Id83ik2a iqzFbF4HhOHVneSKIZ1c6zKOvOkzfrSIpq+/FRAztAtH6XfWDYD+CyJcsBv79leE o1mNe+r9la9ANPZIKucKefpHkRlkuAXF3ltPIRAr343W/uXJymcHvh3/OlDcTQo9 8/g0s6rOXpcusmVgW680V8RzECl81aOQqCN+bbFK5bkCP9gXrXLbN+J39g5FoibI Yr5f+plDmfVxG1NMPw/cRsOOBCTZpeM+N9eXFgod+JCzguWZjr7xhLj2vSFBXAO3 cFPR7bZsQQMJys+g3Q/650i+8J3oeHoaA4J2ar6OoT5IlRjEAc9iEkgLRAKARnvb ZKcbXGX9Uy3IwXxb4L1u =CJHD -----END PGP SIGNATURE----- --=-YaH4K/C53eWAdSzEQP5y-- --===============3754344744424503781== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============3754344744424503781==--