From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asWYz-0006dE-7f for qemu-devel@nongnu.org; Tue, 19 Apr 2016 10:23:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asWYt-0007bO-GR for qemu-devel@nongnu.org; Tue, 19 Apr 2016 10:23:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41383) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asWYt-0007aw-B0 for qemu-devel@nongnu.org; Tue, 19 Apr 2016 10:23:31 -0400 Date: Tue, 19 Apr 2016 17:23:21 +0300 From: "Michael S. Tsirkin" Message-ID: <20160419172014-mutt-send-email-mst@redhat.com> References: <33183CC9F5247A488A2544077AF19020B03164A0@SZXEMA503-MBS.china.huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33183CC9F5247A488A2544077AF19020B03164A0@SZXEMA503-MBS.china.huawei.com> Subject: Re: [Qemu-devel] [RFC v3] virtio-crypto specification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Gonglei (Arei)" Cc: "virtio-dev@lists.oasis-open.org" , "qemu-devel@nongnu.org" , Stefan Hajnoczi , Cornelia Huck , "Huangpeng (Peter)" , "Hanweidong (Randy)" , Jani Kokkonen , "Zhoujian (jay, Euler)" , Lingli Deng , Mihai Claudiu Caraman , "'Ola Liljedahl@arm.com'" , Crasta Denis-B22176 , Varun Sethi , "'Venkatesan, Venky'" , Catalin Vasile , =?iso-8859-1?Q?'Fran=E7ois-Fr=E9d=E9ric?= Ozog' , Luonengjun On Tue, Apr 19, 2016 at 08:37:13AM +0000, Gonglei (Arei) wrote: > Hi all, > > This is the specification (version 3) about a new virtio crypto device. > > Changes from v2: > - Reserve virtio device ID 20 for crypto device. [Cornelia] > - Drop all feature bits, those capabilities are offered by the device all the time. [Stefan & Cornelia] > - Add a new section 1.4.2 for driver requirements. [Stefan] > - Use definite type definition instead of enum type in some structure. [Stefan] In fact this is not how rest of spec does this: \begin{lstlisting} struct virtio_net_hdr { #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 u8 flags; #define VIRTIO_NET_HDR_GSO_NONE 0 #define VIRTIO_NET_HDR_GSO_TCPV4 1 #define VIRTIO_NET_HDR_GSO_UDP 3 #define VIRTIO_NET_HDR_GSO_TCPV6 4 #define VIRTIO_NET_HDR_GSO_ECN 0x80 u8 gso_type; le16 hdr_len; le16 gso_size; le16 csum_start; le16 csum_offset; le16 num_buffers; }; \end{lstlisting} the advantage is that field width is explicit. -- MST