Received: from eggs.gnu.org ([2001:4830:134:3::10]:36937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUJX1-00017y-On for qemu-devel@nongnu.org; Tue, 25 Aug 2015 15:05:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUJWy-0005wN-Bs for qemu-devel@nongnu.org; Tue, 25 Aug 2015 15:05:15 -0400 Received: from mail-qg0-x22b.google.com ([2607:f8b0:400d:c04::22b]:34134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUJWy-0005wI-2K for qemu-devel@nongnu.org; Tue, 25 Aug 2015 15:05:12 -0400 Received: by qgeg42 with SMTP id g42so112899044qge.1 for ; Tue, 25 Aug 2015 12:05:11 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <87wpwjgr0m.fsf@blackfin.pond.sub.org> Date: Tue, 25 Aug 2015 15:05:09 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <29C62C49-06A5-4F99-8062-7269A28C29A3@gmail.com> <55DB98E1.600@redhat.com> <87twrnmtet.fsf@blackfin.pond.sub.org> <317E9D35-17C6-4218-B58C-CEE71F8A400F@gmail.com> <87wpwjgr0m.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] [PATCH] qdev-monitor.c: Add device id generation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , qemu-devel qemu-devel On Aug 25, 2015, at 2:30 PM, Markus Armbruster wrote: > Programmingkid writes: >=20 >> On Aug 25, 2015, at 11:33 AM, Peter Maydell wrote: >>=20 >>> On 25 August 2015 at 16:25, Programmingkid = wrote: >>>> On Aug 25, 2015, at 8:42 AM, Markus Armbruster wrote: >>>>> Eric Blake writes: >>>>>=20 >>>>>> On 08/24/2015 12:53 PM, Programmingkid wrote: >>>>>>> +/* USB's max number of devices is 127. This number is 3 digits = long. */ >>>>>>> +#define MAX_NUM_DIGITS_FOR_USB_ID 3 >>>>>=20 >>>>> This limit makes no sense to me. >>>>=20 >>>> The limit is used to decide how many characters the device_id >>>> string is going to have. >>>> Three digits would be 0 to 999 device ID's would be supported. I >>>> can't imagine >>>> anyone spending the time to add that many devices. >>>=20 >>> Arbitrary limits are often a bad idea, especially when >>> they're easy to avoid, as here. >>=20 >> Knowing QEMU's limits can save the user from crashes and other >> problems. There is >> only a finite amount of memory available to QEMU.=20 >=20 > Repeat N times: > device_add FOO,id=3Dhot > device_del hot >=20 > Memory usage independent of N (unless we leak, but that would be a = bug). >=20 > [...] Good example.=