Return-Path: virtio-comment-return-1381-cohuck=redhat.com@lists.oasis-open.org Sender: List-Post: List-Help: List-Unsubscribe: List-Subscribe: Received: from lists.oasis-open.org (oasis-open.org [10.110.1.242]) by lists.oasis-open.org (Postfix) with ESMTP id 00594985A5F for ; Tue, 4 Aug 2020 08:36:40 +0000 (UTC) Date: Tue, 4 Aug 2020 10:36:27 +0200 From: Cornelia Huck Message-ID: <20200804103627.7f8873b0.cohuck@redhat.com> In-Reply-To: <20200803162313.157148-1-lvivier@redhat.com> References: <20200803162313.157148-1-lvivier@redhat.com> MIME-Version: 1.0 Subject: [virtio-comment] Re: [PATCH v2] virtio-rng: add a control queue Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: Laurent Vivier Cc: virtio-comment@lists.oasis-open.org, "Michael S . Tsirkin" , Stefan Hajnoczi , Amit Shah List-ID: On Mon, 3 Aug 2020 18:23:13 +0200 Laurent Vivier wrote: > A control queue is needed to send command to ask the device to > release the request buffers if it cannot provide data. > > Changes: > > 5.4.2 Virtqueues > 0 requestq > 1 controlq > controlq only exists if VIRTIO_RNG_F_CTRL_VQ set. > > 5.4.3 Feature bits > VIRTIO_RNG_F_CTRL_VQ (0) > Device has a control queue > > 5.4.5 Device Initialization > Identify and initialize the request virtqueue. > If the VIRTIO_RNG_F_CTRL_VQ feature bit is negotiated, > identify the control virtqueue. > > 5.4.6.3 Control Virtqueue > The driver uses the control virtqueue (if VIRTIO_RNG_F_CTRL_VQ is > negotiated) to send commands to control the device. > All commands are of the following form: > struct virtio_rng_ctrl_hdr { > u8 cmd; > }; > > 5.4.6.4 Device Requirements: Control Virtqueue > If VIRTIO_RNG_F_CTRL_VQ is negotiated, the device MUST implement the > flush command. > Any other value of cmd MUST be ignored by the device. > > 5.4.6.4.1 Request Virtqueue Flushing > When the device is not able to provide enough entropy to the driver, the > driver may be stuck waiting for the device returning buffers, and cannot > be removed to switch to another one. The flush command allows the driver > to ask the device to release all the buffers sent to the device. This > allows the driver to release resources allocated to receive data from > the device. > #define VIRTIO_RNG_CMD_FLUSH 0 > > 5.4.6.5 Device Requirements: Request Virtqueue Flushing > When the driver sends a flush request, the device MUST release all > outstanding buffers. > > Bug-Link: https://github.com/oasis-tcs/virtio-spec/issues/83 > Signed-off-by: Laurent Vivier > --- > > Notes: > v2: Add devicenormative for the Control Virtqueue > Add devicenormative for the Request Virtqueue Flushing You need to reference the normative sections from conformance.tex (yes, that is easy to miss...) > Reword paragraph Request Virtqueue Flushing > > content.tex | 47 +++++++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 45 insertions(+), 2 deletions(-) Otherwise, looks good to me. This publicly archived list offers a means to provide input to the OASIS Virtual I/O Device (VIRTIO) TC. In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting. Subscribe: virtio-comment-subscribe@lists.oasis-open.org Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org List help: virtio-comment-help@lists.oasis-open.org List archive: https://lists.oasis-open.org/archives/virtio-comment/ Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists Committee: https://www.oasis-open.org/committees/virtio/ Join OASIS: https://www.oasis-open.org/join/