From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTrox-00026q-GV for qemu-devel@nongnu.org; Fri, 06 Mar 2015 07:57:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTroq-0001ze-4i for qemu-devel@nongnu.org; Fri, 06 Mar 2015 07:57:39 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:56951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTrop-0001z6-RY for qemu-devel@nongnu.org; Fri, 06 Mar 2015 07:57:32 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Mar 2015 12:27:17 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 8EB4017D8063 for ; Fri, 6 Mar 2015 12:27:35 +0000 (GMT) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t26CRFeQ6095156 for ; Fri, 6 Mar 2015 12:27:15 GMT Received: from d06av08.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t26CRF6a003917 for ; Fri, 6 Mar 2015 05:27:15 -0700 Date: Fri, 6 Mar 2015 13:27:12 +0100 From: Cornelia Huck Message-ID: <20150306132712.1c72ff89.cornelia.huck@de.ibm.com> In-Reply-To: <1425534531-6305-7-git-send-email-jasowang@redhat.com> References: <1425534531-6305-1-git-send-email-jasowang@redhat.com> <1425534531-6305-7-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3 06/14] virtio-serial-bus: switch to bus specific queue limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: Amit Shah , qemu-devel@nongnu.org On Thu, 5 Mar 2015 13:48:43 +0800 Jason Wang wrote: > Cc: Amit Shah > Signed-off-by: Jason Wang > --- > hw/char/virtio-serial-bus.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c > index 37a6f44..f280e95 100644 > --- a/hw/char/virtio-serial-bus.c > +++ b/hw/char/virtio-serial-bus.c > @@ -26,6 +26,8 @@ > #include "hw/virtio/virtio-serial.h" > #include "hw/virtio/virtio-access.h" > > +#define VIRTIO_SERIAL_BUS_QUEUE_MAX 64 > + > struct VirtIOSerialDevices { > QLIST_HEAD(, VirtIOSerial) devices; > } vserdevices; > @@ -942,7 +944,7 @@ static void virtio_serial_device_realize(DeviceState *dev, Error **errp) > } > > /* Each port takes 2 queues, and one pair is for the control queue */ > - max_supported_ports = VIRTIO_PCI_QUEUE_MAX / 2 - 1; > + max_supported_ports = VIRTIO_SERIAL_BUS_QUEUE_MAX / 2 - 1; Shouldn't this be determined via the VirtIODevice instead? Or be the maximum of those two values? > > if (vser->serial.max_virtserial_ports > max_supported_ports) { > error_setg(errp, "maximum ports supported: %u", max_supported_ports);