From owner-freebsd-net@FreeBSD.ORG Wed Nov 19 14:50:54 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF02616A4CE for ; Wed, 19 Nov 2003 14:50:54 -0800 (PST) Received: from main.gmane.org (main.gmane.org [80.91.224.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22B0643FDD for ; Wed, 19 Nov 2003 14:50:53 -0800 (PST) (envelope-from freebsd-net@m.gmane.org) Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AMb9v-0006BZ-00 for ; Wed, 19 Nov 2003 23:50:51 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-net@freebsd.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AMaoO-0005qN-00 for ; Wed, 19 Nov 2003 23:28:36 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AMaoO-0003MU-00 for ; Wed, 19 Nov 2003 23:28:36 +0100 From: William Carrel Date: Wed, 19 Nov 2003 14:28:36 -0800 Organization: Infospace Inc. Lines: 28 Message-ID: References: X-Complaints-To: usenet@sea.gmane.org Posted-And-Mailed: yes User-Agent: MT-NewsWatcher/3.3b1 (PPC Mac OS X) Sender: news Subject: Re: Multicast stats and bridging X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Nov 2003 22:50:54 -0000 In article , Alex Hoff wrote: > well I want my stats to match, so I can follow the data. For example, lets > say I send 1000 multicasts packets from pc A through bridge B to pc C. I > want the stats for multicasts packets to add up - Incoming 1000 mcast pkts > on A-B interface and 1000 outgoing mcasts packets on the B-C interface. (And > Im strictly talking about stack counters). Right now they are getting > counted as unicast when they leave the bridge. Does that make more sense? > Sorry if I was not clear before. The logic to record these packets differently would be needed to be inserted into src/sys/net/bridge.c:bdg_forward(). >From cursory reading of the code though, the destination is only recorded on incoming packets. All outgoing packets forwarded out an interface are just counted as BDG_OUT. To have BDG_MCAST counted both in and out packets would introduce some complexity to trying to make sense of those numbers. Besides, unless the interface is full or some other error condition all multicast (and broadcast) packets will be bridged. If an error results bdg_dropped will be incremented. In sum, it isn't really "counted as unicast" at all. It's simply counted as an outgoing packet, just like all the other outgoing packets. -- William A. Carrel