From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:38210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm18w-0006gU-Kc for qemu-devel@nongnu.org; Wed, 27 Jul 2011 06:15:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm18v-0002N3-IN for qemu-devel@nongnu.org; Wed, 27 Jul 2011 06:15:10 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:46156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm18v-0002Ma-BF for qemu-devel@nongnu.org; Wed, 27 Jul 2011 06:15:09 -0400 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 53632CB03A6 for ; Wed, 27 Jul 2011 12:15:08 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kMnH7f-CxUTe for ; Wed, 27 Jul 2011 12:14:58 +0200 (CEST) Received: from [10.10.1.88] (pompomgalli.act-europe.fr [10.10.1.88]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 250C1CB0358 for ; Wed, 27 Jul 2011 12:14:58 +0200 (CEST) Message-ID: <4E2FE521.5080600@adacore.com> Date: Wed, 27 Jul 2011 12:14:57 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1311697292-9845-1-git-send-email-chouteau@adacore.com> <1311697292-9845-2-git-send-email-chouteau@adacore.com> <4E2FDABB.5090608@siemens.com> In-Reply-To: <4E2FDABB.5090608@siemens.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] [SLIRP] Delayed IP packets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On 27/07/2011 11:30, Jan Kiszka wrote: > On 2011-07-26 18:21, Fabien Chouteau wrote: >> In the current implementation, if Slirp tries to send an IP packet to a client >> with an unknown hardware address, the packet is simply dropped and an ARP >> request is sent (if_encap in slirp/slirp.c). >> >> This patch adds a list of delayed IP packets to handle such cases. If the >> hardware address is unknown, Slirp inserts the packet in delayed list and sends >> an ARP request. Each time the ARP table is updated Slirp retries to send the >> packet. > > Haven't looked at details yet, just two general thoughts so far: > > We already have queues for outgoing packets, why can't we reuse that > infrastructure? That would also avoid additional memory allocations. > Delayed packets should be requeued at the end and only one attempt to > send them should be performed per queue flush. Sure, I didn't know about these queues. Where are they implemented? > > I think we need some timeout for the delayed packets. If invalid or > non-reactive clients are addressed, we will otherwise pile them up until > qemu terminates, right? Yes that's a good idea. Regards, -- Fabien Chouteau