From owner-freebsd-net@FreeBSD.ORG Fri May 7 00:37:13 2004 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 8163016A4CE for ; Fri, 7 May 2004 00:37:13 -0700 (PDT) Received: from mail.butovo-online.ru (mail.b-o.ru [212.5.78.254]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7210A43D64 for ; Fri, 7 May 2004 00:37:12 -0700 (PDT) (envelope-from resident@b-o.ru) Received: from [192.168.91.89] (helo=priv-91-89.butovo-online.ru) by mail.butovo-online.ru with esmtp (Exim 4.24) id 1BLzzM-000HsM-6M for freebsd-net@freebsd.org; Fri, 07 May 2004 11:41:44 +0400 Date: Fri, 7 May 2004 11:39:06 +0400 From: Andrew Riabtsev X-Mailer: The Bat! (v1.62i) Business X-Priority: 3 (Normal) Message-ID: <832830880.20040507113906@b-o.ru> To: freebsd-net@freebsd.org In-Reply-To: <20040506144616.GA43633@FreeBSD.csie.NCTU.edu.tw> References: <20040506144616.GA43633@FreeBSD.csie.NCTU.edu.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: Problem with ng_ether packet flow.. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Andrew Riabtsev List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 May 2004 07:37:13 -0000 Hi Jian-Wei, Thursday, May 6, 2004, 6:46:16 PM, you wrote: JWW> Hi, I spent times to figure out the packet flow with ng_ether, like this: JWW> upper layer JWW> | JWW> ^ JWW> [ether_demux] JWW> ^ JWW> | JWW> +---<---[ng_ether_rcvdata]--<-- 'upper' --<--, JWW> ^ \ JWW> <--[bdg_forward]--<--+ ng_tee JWW> | / JWW> +--->---[ng_ether_input]---->-- 'lower' -->--` JWW> ^ JWW> [ether_input] JWW> ^ JWW> | JWW> device JWW> Why the [ng_ether_rcvdata] won't check if packets should travel to JWW> the [bdg_forward] when they are bridged packets? This is how it should work, you get entrance to low level network (lower hook) and upper level (upper). To bridge or not to bridge figuring out with ng_bridge or other ng_* modules is up to you to decide. And what is a strange direct link between [ether_demux] and [ether_input]? When connecting anything to upper or lower hooks of ng_ether this link no longer exists. Or you have changed code of ng_ether and/or if_ethersubr.c then probably you should ask yourself why it's not working, is it? :) JWW> i.e. Should the packet flow be changed to this one? JWW> upper layer JWW> | JWW> ^ JWW> [ether_demux] JWW> ^ JWW> <--[bdg_forward]--<--+ JWW> | JWW> +---<---[ng_ether_rcvdata]--<-- 'upper' --<--, JWW> ^ \ JWW> | ng_tee JWW> | / JWW> +--->---[ng_ether_input]---->-- 'lower' -->--` JWW> ^ JWW> [ether_input] JWW> ^ JWW> | JWW> device JWW> Sincerely Yours, JWW> Jian-Wei Wang JWW> _______________________________________________ JWW> freebsd-net@freebsd.org mailing list JWW> http://lists.freebsd.org/mailman/listinfo/freebsd-net JWW> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- Andrew mailto:resident@b-o.ru