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