From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:39835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm1Pv-0003Dy-3K for qemu-devel@nongnu.org; Wed, 27 Jul 2011 06:32:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm1Pu-000618-3h for qemu-devel@nongnu.org; Wed, 27 Jul 2011 06:32:43 -0400 Received: from goliath.siemens.de ([192.35.17.28]:16346) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm1Pt-00060n-Ee for qemu-devel@nongnu.org; Wed, 27 Jul 2011 06:32:41 -0400 Message-ID: <4E2FE939.8080407@siemens.com> Date: Wed, 27 Jul 2011 12:32:25 +0200 From: Jan Kiszka 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> <4E2FE521.5080600@adacore.com> In-Reply-To: <4E2FE521.5080600@adacore.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: Fabien Chouteau Cc: qemu-devel@nongnu.org On 2011-07-27 12:14, Fabien Chouteau wrote: > 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? Check e.g. what happens in and is documented for if_start(). Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux