From owner-freebsd-net Fri Feb 2 6:15:34 2001 Delivered-To: freebsd-net@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 2112837B491 for ; Fri, 2 Feb 2001 06:15:17 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.1/8.11.1) id f12EFBs70349; Fri, 2 Feb 2001 06:15:11 -0800 (PST) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200102021415.f12EFBs70349@iguana.aciri.org> Subject: Re: packet loss when 'ipfw pipe list' with dummynet and bridge In-Reply-To: <20010202191214B.ishizuka@onion.ish.org> from Masachika ISHIZUKA at "Feb 2, 2001 7:12:14 pm" To: ishizuka@ish.org (Masachika ISHIZUKA) Date: Fri, 2 Feb 2001 06:15:11 -0800 (PST) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I use dummynet and bridge on FreeBSD 4.2-Stable to see traffic > statics on Celeron 466MHz with 256 mega bytes ram as follows. > > ipfw pipe 1 config mask dst-ip 0xffffffff buckets 1024 > ipfw pipe 2 config mask src-ip 0xffffffff buckets 1024 > ipfw add pipe 1 all from any to any bridged via fxp0 in > ipfw add pipe 2 all from any to any bridged via fxp1 in > > It is collected about 10,000 addresses each pipes. > When I typed 'ipfw pipe list', packet loss occur. > Packet loss occur only recent 4.2-Stable with splimp() > instead of splnet(). When I replaced splimp() of dummynet_get() > in ip_dummynet.c with slpnet(), packet loss did not occur, > but sometimes panic occur. > Is there any way to stop packet loss. unfortunately the "pipe list" has to navigate through a list of pipe/flow/queue descriptors to report its output, and at the moment it does this with interrupts disabled to avoid that the data structure changes while it is working. A better approach would probably be to set a semaphore before starting, and release it at the end, and keep interrupts enabled during the transfer but make sure that no object is created or deleted and no pointer is changed during the process. You can still risk loss (when e.g. you cannot create a new flow descriptor) but better than the current method. cheers luigi > Sorry to my terrible English. > > -- > ishizuka@ish.org > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message