From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 10:38:21 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 62B5616A41F for ; Sun, 25 Sep 2005 10:38:21 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35709.mail.mud.yahoo.com (web35709.mail.mud.yahoo.com [66.163.179.163]) by mx1.FreeBSD.org (Postfix) with SMTP id EF4BB43D48 for ; Sun, 25 Sep 2005 10:38:20 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 61412 invoked by uid 60001); 25 Sep 2005 10:38:20 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=eGxg7DJqPMljRbA4/QD0VgHHGtnsl1F0tZ9Cqm11NGYd8Y4sym/AJGyyihFhnTKoPGDV9rXPWFuufyKfh0ccmgEMa8WPQ74UWOUjGhfM21JTMco2t5xTsOVR6IgTaDqtc4U9R/ztaDdhSzhHrUCnJDgkBOVTkPJj/tGQ9hVUfjw= ; Message-ID: <20050925103820.61410.qmail@web35709.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35709.mail.mud.yahoo.com via HTTP; Sun, 25 Sep 2005 03:38:20 PDT Date: Sun, 25 Sep 2005 03:38:20 -0700 (PDT) From: kamal kc To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: kernel TCP/IP hack X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 10:38:21 -0000 does anybody know where to start on /usr/src for tcp/ip hack i need it urgently any resources, links will be appreciated thanks, kamal __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 10:52:02 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 A972A16A41F for ; Sun, 25 Sep 2005 10:52:02 +0000 (GMT) (envelope-from vaibhave@cs.utah.edu) Received: from mail-svr1.cs.utah.edu (mail-svr1.cs.utah.edu [155.98.64.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56A3343D48 for ; Sun, 25 Sep 2005 10:52:02 +0000 (GMT) (envelope-from vaibhave@cs.utah.edu) Received: from localhost (localhost [127.0.0.1]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id C71CC346D9; Sun, 25 Sep 2005 04:52:01 -0600 (MDT) Received: from mail-svr1.cs.utah.edu ([127.0.0.1]) by localhost (mail-svr1.cs.utah.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16103-03; Sun, 25 Sep 2005 04:52:01 -0600 (MDT) Received: from trust.cs.utah.edu (trust.cs.utah.edu [155.98.65.28]) by mail-svr1.cs.utah.edu (Postfix) with ESMTP id 5E363346D3; Sun, 25 Sep 2005 04:52:01 -0600 (MDT) Received: by trust.cs.utah.edu (Postfix, from userid 4969) id 3412A3F6C; Sun, 25 Sep 2005 04:52:01 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by trust.cs.utah.edu (Postfix) with ESMTP id 24D533F1E; Sun, 25 Sep 2005 04:52:01 -0600 (MDT) Date: Sun, 25 Sep 2005 04:52:01 -0600 (MDT) From: Vaibhave Agarwal To: kamal kc In-Reply-To: <20050925103820.61410.qmail@web35709.mail.mud.yahoo.com> Message-ID: References: <20050925103820.61410.qmail@web35709.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: amavisd-new at cs.utah.edu Cc: freebsd-net@freebsd.org Subject: Re: kernel TCP/IP hack X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 10:52:02 -0000 go to /usr/src/sys/netinet For tcp hack: tcp_input.c and tcp_output.c for ip hack: ip_input.c and ip_output.c If you read the book: The Implementation (TCP/IP Illustrated, Volume 2) by Gary R. Wright, W. Richard Stevens You will understand how each and every line of code works. -vaibhave On Sun, 25 Sep 2005, kamal kc wrote: > does anybody know > where to start on /usr/src for tcp/ip hack > > i need it urgently > any resources, links will be appreciated > > thanks, > kamal > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 11:05:59 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 C525F16A420 for ; Sun, 25 Sep 2005 11:05:59 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35709.mail.mud.yahoo.com (web35709.mail.mud.yahoo.com [66.163.179.163]) by mx1.FreeBSD.org (Postfix) with SMTP id 1FDE443D53 for ; Sun, 25 Sep 2005 11:05:59 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 66225 invoked by uid 60001); 25 Sep 2005 11:05:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=OV1m04GvxRybGN8/Uyp7HvCg9WoxWq7QkHyrbIRp8FrEf3yheRicoF6TzvcXoyeSUtZKziWVlOJJvKcnIMUnMy65RAnSzKp/e2izMWTD4rq5swdFwJNvy68k2TjWcAHm338JB7fJtYgD4fWv/BTf85g15PsmXAqSl9bzLUZv7K8= ; Message-ID: <20050925110558.66223.qmail@web35709.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35709.mail.mud.yahoo.com via HTTP; Sun, 25 Sep 2005 04:05:58 PDT Date: Sun, 25 Sep 2005 04:05:58 -0700 (PDT) From: kamal kc To: freebsd-net@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: kernel TCP/IP hack X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 11:05:59 -0000 ok now i got the files. right now i haven't got the books. but i'll make sure i get it as soon as possible. Are there any websites or mailing list logs that explain more on the functions and data structures than the comments?? another thing the makefiles i do not understand. the makefile in /usr/src/sys has tags like .include<...> how do i get around my configurations on makefiles ?? kamal --- Vaibhave Agarwal wrote: > > go to /usr/src/sys/netinet > > For tcp hack: > tcp_input.c and tcp_output.c > > for ip hack: > ip_input.c and ip_output.c > > If you read the book: > The Implementation (TCP/IP Illustrated, Volume 2) > by Gary R. Wright, W. Richard Stevens > You will understand how each and every line of code > works. > > -vaibhave > > On Sun, 25 Sep 2005, kamal kc wrote: > > > does anybody know > > where to start on /usr/src for tcp/ip hack > > > > i need it urgently > > any resources, links will be appreciated > > > > thanks, > > kamal > > > > > > > > __________________________________ > > Yahoo! Mail - PC Magazine Editors' Choice 2005 > > http://mail.yahoo.com > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to > "freebsd-net-unsubscribe@freebsd.org" > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to > "freebsd-net-unsubscribe@freebsd.org" > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 13:53:08 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.ORG 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 206AD16A41F for ; Sun, 25 Sep 2005 13:53:08 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 74ECD43D49 for ; Sun, 25 Sep 2005 13:53:07 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (fwnetw@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.1/8.13.1) with ESMTP id j8PDr5B3005908 for ; Sun, 25 Sep 2005 15:53:06 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.1/8.13.1/Submit) id j8PDr5XE005907; Sun, 25 Sep 2005 15:53:05 +0200 (CEST) (envelope-from olli) Date: Sun, 25 Sep 2005 15:53:05 +0200 (CEST) Message-Id: <200509251353.j8PDr5XE005907@lurza.secnetix.de> From: Oliver Fromme To: freebsd-net@FreeBSD.ORG In-Reply-To: <200509241919.j8OJJfoD024059@argotsoft.com> X-Newsgroups: list.freebsd-net User-Agent: tin/1.5.4-20000523 ("1959") (UNIX) (FreeBSD/4.11-RELEASE (i386)) Cc: Subject: Re: VIA VT6103 support (VIA EPIA PD) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-net@FreeBSD.ORG List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 13:53:08 -0000 Mark J. Sommer wrote: > Friend found a post regarding this. Says there is an update to the BIOS > too. Please check out: > > http://forums.viaarena.com/messageview.aspx?catid=28&threadid=60131 Thanks, I've read through the complete thread (more than 300 messages). It seems that the lock-ups people have been experiencing were caused by several issues, most of which are only Linux-specific (bugs in the longhaul driver and in the itvt driver, and problems caused by using optimized 686-code). I don't expect any of those problems to appear under FreeBSD. It's also worth noting that there are _no_ FreeBSD PRs at all which mention such problems with EPIA boards. The only problem I've been readong about was the VT6102/6103 issue, and that's why I wrote the initial message in this thread. (BTW, some people also reported that their problems were caused by improperly grounded hardware.) > If anyone has this working properly with FreeBSD, I'd appreciate knowing. I > hear the Ethernet on these are not great performers. I'll report as soon as I got my PD board and performed some testing. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd Any opinions expressed in this message may be personal to the author and may not necessarily reflect the opinions of secnetix in any way. "File names are infinite in length, where infinity is set to 255 characters." -- Peter Collinson, "The Unix File System" From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 21:31:08 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 88E3E16A41F for ; Sun, 25 Sep 2005 21:31:08 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3066043D49 for ; Sun, 25 Sep 2005 21:31:06 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j8PLV6SS010886; Sun, 25 Sep 2005 14:31:06 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j8PLV6at010885; Sun, 25 Sep 2005 14:31:06 -0700 Date: Sun, 25 Sep 2005 14:31:06 -0700 From: Brooks Davis To: Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= Message-ID: <20050925213106.GF15981@odin.ac.hmc.edu> References: <20050922092250.55b4716a.lists@yazzy.org> <20050922113336.K34322@fledge.watson.org> <20050922125003.67071cb1.lists@yazzy.org> <43329F4A.4050904@wm-access.no> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="A9z/3b/E4MkkD+7G" Content-Disposition: inline In-Reply-To: <43329F4A.4050904@wm-access.no> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-net@freebsd.org, Marcin Jessa Subject: Re: tap devices and DHCP. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 21:31:08 -0000 --A9z/3b/E4MkkD+7G Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2005 at 02:10:50PM +0200, Sten Daniel S=F8rsdal wrote: > > >=20 > > I have a bridge with one fxp0 nic (which I renamed to net0) and one tap1 > > device. The other end runs linux as DHCP server on LAN. > > It communicates with the DHCP server through the fxp0 device which is a > > member of the same bridge. > >=20 >=20 > Then it would in my opinion be more correct to run dhclient on the > bridge interface. > However bridge0 doesnt seem to support broadcast packets which are > necessary for DHCP to work. That could be the problem. It seems incorrect to be able to assign an address to an interface that is a member of an if_bridge bridge. I'm not 100% certain this is the case, but it seems right. If that's the case, dhclient should not work on member interfaces. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --A9z/3b/E4MkkD+7G Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDNxcXXY6L6fI4GtQRAktOAJ491j4KS1fPwvln+MFuyjKe2j7v/ACeJK+O ehCKhkJr5VG+tDo/ryYwN5w= =2mcr -----END PGP SIGNATURE----- --A9z/3b/E4MkkD+7G-- From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 21:38:06 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 2629416A49A; Sun, 25 Sep 2005 21:38:06 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id ADAA243D48; Sun, 25 Sep 2005 21:38:05 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j8PLbguP011896; Sun, 25 Sep 2005 14:37:42 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j8PLbfvU011894; Sun, 25 Sep 2005 14:37:41 -0700 Date: Sun, 25 Sep 2005 14:37:41 -0700 From: Brooks Davis To: Yar Tikhiy Message-ID: <20050925213741.GG15981@odin.ac.hmc.edu> References: <20050922104104.GA13539@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="AGZzQgpsuUlWC1xT" Content-Disposition: inline In-Reply-To: <20050922104104.GA13539@comp.chem.msu.su> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 21:38:06 -0000 --AGZzQgpsuUlWC1xT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote: > Hi folks, >=20 > As our ifconfig(8) is growing more options for special interface > types, inconsistencies sneak into their syntax. In particular, > -vlandev takes a useless argument (vlan(4) cannot attach to more > than one parent anyway) while, e.g., -carpdev doesn't need one. > Personally, I like the latter since having to type unneeded words > on the command line annoys me. Do you think that making -vlandev > need no arguments in CURRENT would break many existing things? I agree the argument is useless. Unfortunatly, it's going to be hard to deprecate the old syntax so we may need to keep it around. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --AGZzQgpsuUlWC1xT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDNxijXY6L6fI4GtQRAnjPAKCo5Lcv8mtoS2NOCL1UKGl5urnPAgCggrVp K7C1eiGDSBgnvE+42mar5X8= =8Fky -----END PGP SIGNATURE----- --AGZzQgpsuUlWC1xT-- From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 22:08:43 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 2136A16A41F; Sun, 25 Sep 2005 22:08:43 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id DAD7C43D49; Sun, 25 Sep 2005 22:08:41 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from buffy.york.ac.uk (buffy-128.york.ac.uk [144.32.128.160]) by mail-gw0.york.ac.uk (8.12.10/8.12.10) with ESMTP id j8PM8QcN001579; Sun, 25 Sep 2005 23:08:26 +0100 (BST) Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.13.4/8.13.4) with ESMTP id j8PM8P9u025343; Sun, 25 Sep 2005 23:08:25 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: (from ga9@localhost) by buffy.york.ac.uk (8.13.4/8.13.4/Submit) id j8PM8PbN025342; Sun, 25 Sep 2005 23:08:25 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin.atkinson@ury.york.ac.uk using -f From: Gavin Atkinson To: Brooks Davis In-Reply-To: <20050925213741.GG15981@odin.ac.hmc.edu> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sun, 25 Sep 2005 23:08:25 +0100 Message-Id: <1127686105.23447.35.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin.atkinson@ury.york.ac.uk Cc: Yar Tikhiy , freebsd-current@freebsd.org, freebsd-net@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 22:08:43 -0000 On Sun, 2005-09-25 at 14:37 -0700, Brooks Davis wrote: > On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote: > > Hi folks, > > > > As our ifconfig(8) is growing more options for special interface > > types, inconsistencies sneak into their syntax. In particular, > > -vlandev takes a useless argument (vlan(4) cannot attach to more > > than one parent anyway) while, e.g., -carpdev doesn't need one. > > Personally, I like the latter since having to type unneeded words > > on the command line annoys me. Do you think that making -vlandev > > need no arguments in CURRENT would break many existing things? > > I agree the argument is useless. Unfortunatly, it's going to be hard to > deprecate the old syntax so we may need to keep it around. There's also the issue that the "vlan" and "vlandev" options have to be specified in that order, which is counter-intuitive and undocumented. leeloo# ifconfig vlan14 vlandev fxp0 vlan 14 ifconfig: must specify both vlan tag and device leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 leeloo# Also, you can't set both the vlan and IP address information: leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0 ifconfig: inet: bad value As a result of this, the only way to create vlans from rc.conf seems to be in two stages, by renaming the interface: cloned_interfaces="vlan14" ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0" Which is less than ideal. However, fixing these issues looks to be non-trivial. Gavin From owner-freebsd-net@FreeBSD.ORG Sun Sep 25 22:55:17 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 8208E16A41F; Sun, 25 Sep 2005 22:55:17 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5BB643D53; Sun, 25 Sep 2005 22:55:16 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j8PMt2BS011949 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 26 Sep 2005 00:55:05 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j8PMsceG046408 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Sep 2005 00:54:38 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j8PMsbLt051387; Mon, 26 Sep 2005 00:54:37 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j8PMsXKx051386; Mon, 26 Sep 2005 00:54:33 +0200 (CEST) (envelope-from ticso) Date: Mon, 26 Sep 2005 00:54:33 +0200 From: Bernd Walter To: Gavin Atkinson Message-ID: <20050925225432.GH552@cicely12.cicely.de> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1127686105.23447.35.camel@buffy.york.ac.uk> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: Yar Tikhiy , freebsd-current@freebsd.org, freebsd-net@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Sep 2005 22:55:17 -0000 On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote: > On Sun, 2005-09-25 at 14:37 -0700, Brooks Davis wrote: > > On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote: > > > Hi folks, > > > > > > As our ifconfig(8) is growing more options for special interface > > > types, inconsistencies sneak into their syntax. In particular, > > > -vlandev takes a useless argument (vlan(4) cannot attach to more > > > than one parent anyway) while, e.g., -carpdev doesn't need one. > > > Personally, I like the latter since having to type unneeded words > > > on the command line annoys me. Do you think that making -vlandev > > > need no arguments in CURRENT would break many existing things? > > > > I agree the argument is useless. Unfortunatly, it's going to be hard to > > deprecate the old syntax so we may need to keep it around. > > There's also the issue that the "vlan" and "vlandev" options have to be > specified in that order, which is counter-intuitive and undocumented. > > leeloo# ifconfig vlan14 vlandev fxp0 vlan 14 > ifconfig: must specify both vlan tag and device > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 > leeloo# > > Also, you can't set both the vlan and IP address information: > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0 > ifconfig: inet: bad value > > As a result of this, the only way to create vlans from rc.conf seems to > be in two stages, by renaming the interface: > > cloned_interfaces="vlan14" > ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" > ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0" The follwing always worked for me, no need to rename: cloned_interfaces="vlan1" ifconfig_vlan1="inet 1.2.3.4/29 vlan 1 vlandev fxp0" What doesn't work is this: ifconfig_vlan1_alias0="1.2.3.4/32" I had to configure them by a selfdone script. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 06:15:24 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 A5CBA16A41F for ; Mon, 26 Sep 2005 06:15:24 +0000 (GMT) (envelope-from lourik@wtec.co.za) Received: from meerkat.wtec.co.za (meerkat.wtec.co.za [69.67.33.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CB1E43D53 for ; Mon, 26 Sep 2005 06:15:20 +0000 (GMT) (envelope-from lourik@wtec.co.za) Received: from lourik.wtec.co.za ([192.168.2.200]) (AUTH: PLAIN lourik@wtec.co.za) by meerkat.wtec.co.za with esmtp; Mon, 26 Sep 2005 08:18:50 +0200 From: Lourik Malan Organization: Woodlands Technologies Pty(LTD) To: freebsd-net@freebsd.org Date: Mon, 26 Sep 2005 06:15:03 +0000 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509260615.03957.lourik@wtec.co.za> Subject: (no subject) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lourik@wtec.co.za List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 06:15:24 -0000 Hi There I'm running FreeBSD 5.4 on my server, and for some odd reason rdr in ipnat is not working anymore. This Setup worked fine in 4.11, I've been having a look on google and the same problem crocks up.. ipnat.rules( rl0 is my external interface ) rdr rl0 0.0.0.0/32 port 85 -> 172.20.154.196 port 80 tcp map rl0 172.20.154.0/24 -> 196.23.176.187/32 Regards From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 08:14:17 2005 Return-Path: X-Original-To: net@freebsd.org 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 651C916A41F; Mon, 26 Sep 2005 08:14:17 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id B560E43D4C; Mon, 26 Sep 2005 08:14:16 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.3/8.13.3) with ESMTP id j8Q8EEZu051176; Mon, 26 Sep 2005 12:14:14 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Mon, 26 Sep 2005 12:14:14 +0400 (MSD) From: Maxim Konovalov To: "Crist J. Clark" In-Reply-To: <20050923175125.GA69254@goku.cjclark.org> Message-ID: <20050926121137.X7055@mp2.macomnet.net> References: <20050923175125.GA69254@goku.cjclark.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: net@freebsd.org Subject: Re: Fixed Dest Port for traceroute(8) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 08:14:17 -0000 [...] > Index: traceroute.c > =================================================================== > RCS file: /ncvs/freebsd/src/contrib/traceroute/traceroute.c,v > retrieving revision 1.27 > diff -u -r1.27 traceroute.c > --- traceroute.c 26 Aug 2005 18:08:24 -0000 1.27 > +++ traceroute.c 23 Sep 2005 17:47:45 -0000 [...] > @@ -521,13 +522,17 @@ > prog = argv[0]; > > opterr = 0; > - while ((op = getopt(argc, argv, "dFInrSvxf:g:i:M:m:P:p:q:s:t:w:z:")) != EOF) > + while ((op = getopt(argc, argv, "edFInrSvxf:g:i:M:m:P:p:q:s:t:w:z:")) != EOF) Better to keep the keys sorted alphabetically. I.e. "deFI..". Need to update usage() as well. -- Maxim Konovalov From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 11:02:16 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 4332616A420 for ; Mon, 26 Sep 2005 11:02:16 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF49843D55 for ; Mon, 26 Sep 2005 11:02:15 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8QB2FGb027111 for ; Mon, 26 Sep 2005 11:02:15 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8QB2DRd027104 for freebsd-net@freebsd.org; Mon, 26 Sep 2005 11:02:13 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 26 Sep 2005 11:02:13 GMT Message-Id: <200509261102.j8QB2DRd027104@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 11:02:16 -0000 Current FreeBSD problem reports Critical problems Serious problems Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2003/07/11] kern/54383 net [nfs] [patch] NFS root configurations wit 1 problem total. From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 14:29:11 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 CA28516A41F; Mon, 26 Sep 2005 14:29:11 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39E4943D5C; Mon, 26 Sep 2005 14:29:10 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8QET86e096693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Sep 2005 18:29:08 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8QET8lK096692; Mon, 26 Sep 2005 18:29:08 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 26 Sep 2005 18:29:07 +0400 From: Gleb Smirnoff To: tackerman@FreeBSD.org, pdeuskar@FreeBSD.org Message-ID: <20050926142907.GI91328@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i Cc: net@FreeBSD.org Subject: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 14:29:12 -0000 Colleagues, during last month we are experiencing a nasty problem with em(4) driver. Several times a day the receive path of the driver wedges for a minute or two. During wedge the transmit part works with no problems. The latter fact makes this problem very nasty, because the problematic router can't be backed up with help of CARP. Some details: during the wedge all incoming packets are lost and counted as "Missed packets". I've checked this using `sysctl dev.em.0.stats=1`. The `dmesg` output is the following: em0: Excessive collisions = 0 em0: Symbol errors = 0 em0: Sequence errors = 0 em0: Defer count = 0 em0: Missed Packets = 1266 em0: Receive No Buffers = 220 em0: Receive length errors = 0 em0: Receive errors = 0 em0: Crc errors = 0 em0: Alignment errors = 0 em0: Carrier extension errors = 0 em0: XON Rcvd = 0 em0: XON Xmtd = 0 em0: XOFF Rcvd = 0 em0: XOFF Xmtd = 0 em0: Good Packets Rcvd = 28347789 em0: Good Packets Xmtd = 30911959 There is a clear evidence that command `sysctl dev.em.0.stats=1` itself can trigger the wedge. It is important, that the stats are printed to a 9600 baud serial console, and this takes about a second. I have suspicion, that the wedge happens when kernel doesn't service NIC interrupts for some period of time. Yes, some packets should be lost in this case, but the wedge must not continue for minutes! The box is serving 8 - 15 kpps, 70 - 100 MBps. It runs stateful pf(4) firewall, with 50k - 80k states. The IP fastforwarding is enabled. The average state insert/removal ratio is 300 states per second, however sometimes several thousands of states can be removed in one pass. The state removal locks the network code for quite a long time, so I guess that wedge happens exactly when a lot of states are removed. The NIC interrupts aren't serviced for some time and it wedges. The hardware is Supermicro server, with two onboard NICs: dev.em.0.%pnpinfo: vendor=0x8086 device=0x1075 subvendor=0x8086 subdevice=0x1075 class=0x020000 dev.em.1.%pnpinfo: vendor=0x8086 device=0x1076 subvendor=0x8086 subdevice=0x1076 class=0x020000 The NIC is plugged in Cisco Catalyst 6509 gigabit ethernet port. No errors are counted on switch port. To workaround the problem, I have made the following patch: @@ -1650,12 +1651,18 @@ struct ifnet *ifp; struct adapter * adapter = arg; ifp = adapter->ifp; + uint64_t ompc; EM_LOCK(adapter); em_check_for_link(&adapter->hw); em_print_link_status(adapter); - em_update_stats_counters(adapter); + ompc = adapter->stats.mpc; + em_update_stats_counters(adapter); + if (adapter->stats.mpc > ompc) { + printf("em watchdog: mpc %lld->%lld\n", ompc, adapter->stats.mpc); + em_init_locked(adapter); + } if (em_display_debug_stats && ifp->if_drv_flags & IFF_DRV_RUNNING) { em_print_hw_stats(adapter); } It helps to reduce downtime from few minutes to 2 seconds, but this is very dirty approach to the problem. Sample prints during runtime with patch: em watchdog: mpc 1767->2739 em watchdog: mpc 2739->4724 em watchdog: mpc 4724->7794 em watchdog: mpc 7794->10729 Every time this is printed, the network wedges for 2 seconds and then it revives. I am asking developers, who work in Intel, to pay attention to this problem. >From my side I can offer any help in testing and debugging. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 15:09:52 2005 Return-Path: X-Original-To: net@freebsd.org 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 70B0916A41F for ; Mon, 26 Sep 2005 15:09:52 +0000 (GMT) (envelope-from ben@benswebs.com) Received: from ms-smtp-01.nyroc.rr.com (ms-smtp-01.nyroc.rr.com [24.24.2.55]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1582F43D48 for ; Mon, 26 Sep 2005 15:09:51 +0000 (GMT) (envelope-from ben@benswebs.com) Received: from [127.0.0.1] (cpe-72-224-114-15.nycap.res.rr.com [72.224.114.15]) by ms-smtp-01.nyroc.rr.com (8.12.10/8.12.10) with ESMTP id j8QF9iFg016356 for ; Mon, 26 Sep 2005 11:09:49 -0400 (EDT) Message-ID: <43380F05.3070005@benswebs.com> Date: Mon, 26 Sep 2005 11:08:53 -0400 From: Benjamin Rosenblum User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: net@freebsd.org References: <20050926142907.GI91328@cell.sick.ru> In-Reply-To: <20050926142907.GI91328@cell.sick.ru> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine Cc: Subject: Re: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 15:09:52 -0000 the em driver in itself is extremly buggy. many people, myself included, are hitting some major problems with this driver that are causeing some serious issues. i cant transfer any large files to my server because the em driver panics and drops the connection for 15-20 seconds. its a real pain in the butt when this happens too cause this is my primary network storage server. i have had to resort to the backup systems lately because of this problem. i think the entire em network driver needs to get reworked and all these bugs really need to be taken care of since this is one of the top like 3 network cards used in the field today for gig transfer. Gleb Smirnoff wrote: > Colleagues, > > during last month we are experiencing a nasty problem with em(4) >driver. Several times a day the receive path of the driver wedges >for a minute or two. During wedge the transmit part works with >no problems. The latter fact makes this problem very nasty, because >the problematic router can't be backed up with help of CARP. > >Some details: during the wedge all incoming packets are lost and >counted as "Missed packets". I've checked this using >`sysctl dev.em.0.stats=1`. The `dmesg` output is the following: > >em0: Excessive collisions = 0 >em0: Symbol errors = 0 >em0: Sequence errors = 0 >em0: Defer count = 0 >em0: Missed Packets = 1266 >em0: Receive No Buffers = 220 >em0: Receive length errors = 0 >em0: Receive errors = 0 >em0: Crc errors = 0 >em0: Alignment errors = 0 >em0: Carrier extension errors = 0 >em0: XON Rcvd = 0 >em0: XON Xmtd = 0 >em0: XOFF Rcvd = 0 >em0: XOFF Xmtd = 0 >em0: Good Packets Rcvd = 28347789 >em0: Good Packets Xmtd = 30911959 > >There is a clear evidence that command `sysctl dev.em.0.stats=1` itself >can trigger the wedge. It is important, that the stats are printed >to a 9600 baud serial console, and this takes about a second. I have >suspicion, that the wedge happens when kernel doesn't service NIC >interrupts for some period of time. Yes, some packets should be lost in >this case, but the wedge must not continue for minutes! > >The box is serving 8 - 15 kpps, 70 - 100 MBps. It runs stateful pf(4) >firewall, with 50k - 80k states. The IP fastforwarding is enabled. The >average state insert/removal ratio is 300 states per second, however >sometimes several thousands of states can be removed in one pass. The >state removal locks the network code for quite a long time, so I guess >that wedge happens exactly when a lot of states are removed. The NIC >interrupts aren't serviced for some time and it wedges. > >The hardware is Supermicro server, with two onboard NICs: > >dev.em.0.%pnpinfo: vendor=0x8086 device=0x1075 subvendor=0x8086 subdevice=0x1075 class=0x020000 >dev.em.1.%pnpinfo: vendor=0x8086 device=0x1076 subvendor=0x8086 subdevice=0x1076 class=0x020000 > >The NIC is plugged in Cisco Catalyst 6509 gigabit ethernet port. No >errors are counted on switch port. > >To workaround the problem, I have made the following patch: > >@@ -1650,12 +1651,18 @@ > struct ifnet *ifp; > struct adapter * adapter = arg; > ifp = adapter->ifp; >+ uint64_t ompc; > > EM_LOCK(adapter); > > em_check_for_link(&adapter->hw); > em_print_link_status(adapter); >- em_update_stats_counters(adapter); >+ ompc = adapter->stats.mpc; >+ em_update_stats_counters(adapter); >+ if (adapter->stats.mpc > ompc) { >+ printf("em watchdog: mpc %lld->%lld\n", ompc, adapter->stats.mpc); >+ em_init_locked(adapter); >+ } > if (em_display_debug_stats && ifp->if_drv_flags & IFF_DRV_RUNNING) { > em_print_hw_stats(adapter); > } > >It helps to reduce downtime from few minutes to 2 seconds, but this >is very dirty approach to the problem. Sample prints during runtime >with patch: > >em watchdog: mpc 1767->2739 >em watchdog: mpc 2739->4724 >em watchdog: mpc 4724->7794 >em watchdog: mpc 7794->10729 > >Every time this is printed, the network wedges for 2 seconds and then >it revives. > >I am asking developers, who work in Intel, to pay attention to this problem. >>From my side I can offer any help in testing and debugging. > > > From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 15:12:44 2005 Return-Path: X-Original-To: net@freebsd.org 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 69E5A16A41F for ; Mon, 26 Sep 2005 15:12:44 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from rms06.rommon.net (rms06.rommon.net [212.54.5.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id F109643D48 for ; Mon, 26 Sep 2005 15:12:43 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [195.163.185.139] (i2-139.rommon.fi [195.163.185.139]) by rms06.rommon.net (Postfix) with ESMTP id 3AB0C33C1B; Mon, 26 Sep 2005 18:12:30 +0300 (EEST) Message-ID: <43380FDF.90706@he.iki.fi> Date: Mon, 26 Sep 2005 18:12:31 +0300 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Benjamin Rosenblum References: <20050926142907.GI91328@cell.sick.ru> <43380F05.3070005@benswebs.com> In-Reply-To: <43380F05.3070005@benswebs.com> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: net@freebsd.org Subject: Re: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 15:12:44 -0000 Benjamin Rosenblum wrote: > the em driver in itself is extremly buggy. many people, myself > included, are hitting some major problems with this driver that are > causeing some serious issues. i cant transfer any large files to my > server because the em driver panics and drops the connection for 15-20 > seconds. its a real pain in the butt when this happens too cause this > is my primary network storage server. i have had to resort to the > backup systems lately because of this problem. i think the entire em > network driver needs to get reworked and all these bugs really need to > be taken care of since this is one of the top like 3 network cards > used in the field today for gig transfer. > Does anyone have the programming data for the chipsets so the driver could be taken further? I've been unable to obtain them from Intel despite of repeated attempts. Pete > Gleb Smirnoff wrote: > >> Colleagues, >> >> during last month we are experiencing a nasty problem with em(4) >> driver. Several times a day the receive path of the driver wedges >> for a minute or two. During wedge the transmit part works with >> no problems. The latter fact makes this problem very nasty, because >> the problematic router can't be backed up with help of CARP. >> >> Some details: during the wedge all incoming packets are lost and >> counted as "Missed packets". I've checked this using >> `sysctl dev.em.0.stats=1`. The `dmesg` output is the following: >> >> em0: Excessive collisions = 0 >> em0: Symbol errors = 0 >> em0: Sequence errors = 0 >> em0: Defer count = 0 >> em0: Missed Packets = 1266 >> em0: Receive No Buffers = 220 >> em0: Receive length errors = 0 >> em0: Receive errors = 0 >> em0: Crc errors = 0 >> em0: Alignment errors = 0 >> em0: Carrier extension errors = 0 >> em0: XON Rcvd = 0 >> em0: XON Xmtd = 0 >> em0: XOFF Rcvd = 0 >> em0: XOFF Xmtd = 0 >> em0: Good Packets Rcvd = 28347789 >> em0: Good Packets Xmtd = 30911959 >> >> There is a clear evidence that command `sysctl dev.em.0.stats=1` itself >> can trigger the wedge. It is important, that the stats are printed >> to a 9600 baud serial console, and this takes about a second. I have >> suspicion, that the wedge happens when kernel doesn't service NIC >> interrupts for some period of time. Yes, some packets should be lost in >> this case, but the wedge must not continue for minutes! >> >> The box is serving 8 - 15 kpps, 70 - 100 MBps. It runs stateful pf(4) >> firewall, with 50k - 80k states. The IP fastforwarding is enabled. The >> average state insert/removal ratio is 300 states per second, however >> sometimes several thousands of states can be removed in one pass. The >> state removal locks the network code for quite a long time, so I guess >> that wedge happens exactly when a lot of states are removed. The NIC >> interrupts aren't serviced for some time and it wedges. >> >> The hardware is Supermicro server, with two onboard NICs: >> dev.em.0.%pnpinfo: vendor=0x8086 device=0x1075 subvendor=0x8086 >> subdevice=0x1075 class=0x020000 >> dev.em.1.%pnpinfo: vendor=0x8086 device=0x1076 subvendor=0x8086 >> subdevice=0x1076 class=0x020000 >> >> The NIC is plugged in Cisco Catalyst 6509 gigabit ethernet port. No >> errors are counted on switch port. >> >> To workaround the problem, I have made the following patch: >> >> @@ -1650,12 +1651,18 @@ >> struct ifnet *ifp; >> struct adapter * adapter = arg; >> ifp = adapter->ifp; >> + uint64_t ompc; >> >> EM_LOCK(adapter); >> >> em_check_for_link(&adapter->hw); >> em_print_link_status(adapter); >> - em_update_stats_counters(adapter); + ompc = >> adapter->stats.mpc; >> + em_update_stats_counters(adapter); >> + if (adapter->stats.mpc > ompc) { >> + printf("em watchdog: mpc %lld->%lld\n", ompc, >> adapter->stats.mpc); >> + em_init_locked(adapter); >> + } >> if (em_display_debug_stats && ifp->if_drv_flags & >> IFF_DRV_RUNNING) { >> em_print_hw_stats(adapter); >> } >> >> It helps to reduce downtime from few minutes to 2 seconds, but this >> is very dirty approach to the problem. Sample prints during runtime >> with patch: >> >> em watchdog: mpc 1767->2739 >> em watchdog: mpc 2739->4724 >> em watchdog: mpc 4724->7794 >> em watchdog: mpc 7794->10729 >> >> Every time this is printed, the network wedges for 2 seconds and then >> it revives. >> >> I am asking developers, who work in Intel, to pay attention to this >> problem. >> >>> From my side I can offer any help in testing and debugging. >> >> >> >> > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 15:21:56 2005 Return-Path: X-Original-To: net@freebsd.org 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 9771D16A41F for ; Mon, 26 Sep 2005 15:21:56 +0000 (GMT) (envelope-from ben@benswebs.com) Received: from ms-smtp-02.nyroc.rr.com (ms-smtp-02.nyroc.rr.com [24.24.2.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3351C43D53 for ; Mon, 26 Sep 2005 15:21:55 +0000 (GMT) (envelope-from ben@benswebs.com) Received: from [127.0.0.1] (cpe-72-224-114-15.nycap.res.rr.com [72.224.114.15]) by ms-smtp-02.nyroc.rr.com (8.12.10/8.12.10) with ESMTP id j8QFLpDM009354 for ; Mon, 26 Sep 2005 11:21:53 -0400 (EDT) Message-ID: <433811DC.5000406@benswebs.com> Date: Mon, 26 Sep 2005 11:21:00 -0400 From: Benjamin Rosenblum User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: net@freebsd.org References: <20050926142907.GI91328@cell.sick.ru> <43380F05.3070005@benswebs.com> <43380FDF.90706@he.iki.fi> In-Reply-To: <43380FDF.90706@he.iki.fi> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine Cc: Subject: Re: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 15:21:56 -0000 i believe one of the problems that im having is the size of the onboard memory. the new intel gig cards (82547 and higher) only have 40K onboard instead of the original 64K onboard. i have a few servers that i built with the older cards that do not seem to have the same problems. unfortunately my network card is onboard which prevents me from swaping it with one of the older ones for testing. i have tried to go into the code and manually adjust the buffer sizes since i have read on many sites that was a major problem every combination that i use has proven fatal. i have also tried to adjust my mtu size anywhere from 1500 to 15000 and while different sizes augments the time it takes for the crash to occur it still occurs. smaller mtu sizes seem to take longer to crash but the crash is inevitable. while i do know C very well i am not very versed in writing drivers (lack of experience) so my attempts to debug this problem are comming up short. i have heard that the drivers in 6.0 have been updated and may infact fix this problem but im still very weary of running a beta os on a production computer. when 6.0 is released fully ill upgrade to it and see if that fixes the problem but until then i would like some sort of fix for this. Petri Helenius wrote: > Benjamin Rosenblum wrote: > >> the em driver in itself is extremly buggy. many people, myself >> included, are hitting some major problems with this driver that are >> causeing some serious issues. i cant transfer any large files to my >> server because the em driver panics and drops the connection for >> 15-20 seconds. its a real pain in the butt when this happens too >> cause this is my primary network storage server. i have had to >> resort to the backup systems lately because of this problem. i think >> the entire em network driver needs to get reworked and all these bugs >> really need to be taken care of since this is one of the top like 3 >> network cards used in the field today for gig transfer. >> > Does anyone have the programming data for the chipsets so the driver > could be taken further? I've been unable to obtain them from Intel > despite of repeated attempts. > > Pete > >> Gleb Smirnoff wrote: >> >>> Colleagues, >>> >>> during last month we are experiencing a nasty problem with em(4) >>> driver. Several times a day the receive path of the driver wedges >>> for a minute or two. During wedge the transmit part works with >>> no problems. The latter fact makes this problem very nasty, because >>> the problematic router can't be backed up with help of CARP. >>> >>> Some details: during the wedge all incoming packets are lost and >>> counted as "Missed packets". I've checked this using >>> `sysctl dev.em.0.stats=1`. The `dmesg` output is the following: >>> >>> em0: Excessive collisions = 0 >>> em0: Symbol errors = 0 >>> em0: Sequence errors = 0 >>> em0: Defer count = 0 >>> em0: Missed Packets = 1266 >>> em0: Receive No Buffers = 220 >>> em0: Receive length errors = 0 >>> em0: Receive errors = 0 >>> em0: Crc errors = 0 >>> em0: Alignment errors = 0 >>> em0: Carrier extension errors = 0 >>> em0: XON Rcvd = 0 >>> em0: XON Xmtd = 0 >>> em0: XOFF Rcvd = 0 >>> em0: XOFF Xmtd = 0 >>> em0: Good Packets Rcvd = 28347789 >>> em0: Good Packets Xmtd = 30911959 >>> >>> There is a clear evidence that command `sysctl dev.em.0.stats=1` itself >>> can trigger the wedge. It is important, that the stats are printed >>> to a 9600 baud serial console, and this takes about a second. I have >>> suspicion, that the wedge happens when kernel doesn't service NIC >>> interrupts for some period of time. Yes, some packets should be lost in >>> this case, but the wedge must not continue for minutes! >>> >>> The box is serving 8 - 15 kpps, 70 - 100 MBps. It runs stateful pf(4) >>> firewall, with 50k - 80k states. The IP fastforwarding is enabled. The >>> average state insert/removal ratio is 300 states per second, however >>> sometimes several thousands of states can be removed in one pass. The >>> state removal locks the network code for quite a long time, so I guess >>> that wedge happens exactly when a lot of states are removed. The NIC >>> interrupts aren't serviced for some time and it wedges. >>> >>> The hardware is Supermicro server, with two onboard NICs: >>> dev.em.0.%pnpinfo: vendor=0x8086 device=0x1075 subvendor=0x8086 >>> subdevice=0x1075 class=0x020000 >>> dev.em.1.%pnpinfo: vendor=0x8086 device=0x1076 subvendor=0x8086 >>> subdevice=0x1076 class=0x020000 >>> >>> The NIC is plugged in Cisco Catalyst 6509 gigabit ethernet port. No >>> errors are counted on switch port. >>> >>> To workaround the problem, I have made the following patch: >>> >>> @@ -1650,12 +1651,18 @@ >>> struct ifnet *ifp; >>> struct adapter * adapter = arg; >>> ifp = adapter->ifp; >>> + uint64_t ompc; >>> >>> EM_LOCK(adapter); >>> >>> em_check_for_link(&adapter->hw); >>> em_print_link_status(adapter); >>> - em_update_stats_counters(adapter); + ompc = >>> adapter->stats.mpc; >>> + em_update_stats_counters(adapter); >>> + if (adapter->stats.mpc > ompc) { >>> + printf("em watchdog: mpc %lld->%lld\n", ompc, >>> adapter->stats.mpc); >>> + em_init_locked(adapter); >>> + } >>> if (em_display_debug_stats && ifp->if_drv_flags & >>> IFF_DRV_RUNNING) { >>> em_print_hw_stats(adapter); >>> } >>> >>> It helps to reduce downtime from few minutes to 2 seconds, but this >>> is very dirty approach to the problem. Sample prints during runtime >>> with patch: >>> >>> em watchdog: mpc 1767->2739 >>> em watchdog: mpc 2739->4724 >>> em watchdog: mpc 4724->7794 >>> em watchdog: mpc 7794->10729 >>> >>> Every time this is printed, the network wedges for 2 seconds and then >>> it revives. >>> >>> I am asking developers, who work in Intel, to pay attention to this >>> problem. >>> >>>> From my side I can offer any help in testing and debugging. >>> >>> >>> >>> >>> >> >> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > > > From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 17:34:32 2005 Return-Path: X-Original-To: net@freebsd.org 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 8D63E16A41F for ; Mon, 26 Sep 2005 17:34:32 +0000 (GMT) (envelope-from sferris@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64E7E43D48 for ; Mon, 26 Sep 2005 17:34:31 +0000 (GMT) (envelope-from sferris@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so69993nzd for ; Mon, 26 Sep 2005 10:34:30 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oVPueGUJNcAMitCyA8nN4nRbKFeJOs4JFzhTnOvHETeyYZn+JpmoL9hQAmSFHpuVdYVWtRqqGaHZHmFkh9+Qf19NmM2phZ0I2G9yteJLxVxBRxQbcGT48MmgVQyLwwJ0d/fPpGXidq2fU3VuAWMQJZePLDSx0Wm9fTKjbPJUQN4= Received: by 10.36.75.12 with SMTP id x12mr1707857nza; Mon, 26 Sep 2005 10:34:30 -0700 (PDT) Received: by 10.36.25.4 with HTTP; Mon, 26 Sep 2005 10:34:30 -0700 (PDT) Message-ID: <1eea89cd05092610348e5963b@mail.gmail.com> Date: Mon, 26 Sep 2005 12:34:30 -0500 From: "Scott M. Ferris" To: Petri Helenius In-Reply-To: <43380FDF.90706@he.iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050926142907.GI91328@cell.sick.ru> <43380F05.3070005@benswebs.com> <43380FDF.90706@he.iki.fi> Cc: Benjamin Rosenblum , net@freebsd.org Subject: Re: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Scott M. Ferris" List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 17:34:32 -0000 On 9/26/05, Petri Helenius wrote: > > Does anyone have the programming data for the chipsets so the driver > could be taken further? I've been unable to obtain them from Intel > despite of repeated attempts. Intel released the 8254x Developer Manual in late July, so some information is now available. You can download a PDF from SourceForge: http://www.sourceforge.net/projects/e1000/ Unfortunately that document doesn't appear to have any chip errata in it, so you may have to search the Linux driver for the work-arounds it's using, but it's better than having no documentation at all. -- Scott M. Ferris From owner-freebsd-net@FreeBSD.ORG Mon Sep 26 21:06:05 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.org 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 2600316A41F for ; Mon, 26 Sep 2005 21:06:05 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6123C43DCF for ; Mon, 26 Sep 2005 21:04:46 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 362D052D0B; Mon, 26 Sep 2005 23:04:44 +0200 (CEST) Received: from localhost (dkw112.neoplus.adsl.tpnet.pl [83.24.26.112]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 9D30152CA8; Mon, 26 Sep 2005 23:04:35 +0200 (CEST) Date: Mon, 26 Sep 2005 23:04:30 +0200 From: Pawel Jakub Dawidek To: freebsd-net@FreeBSD.org Message-ID: <20050926210429.GA1198@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng devel (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: Subject: ath(4) panic: bus_dmamap_load_sg: no mbuf packet header! X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2005 21:06:05 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. I configured NAT (using pf(4)) on my laptop: MacOSX (Tiger) <-----> ath0[my laptop]bge0 <-----> local machine When I started downloading few files on Mac from "local machine" via FTP in parallel I got this panic after few minutes (I was able to reproduce it): panic: bus_dmamap_load_sg: no mbuf packet header! And the backtrace: panic() bus_dmamap_load_sg()+0x2a ath_start()+0x2ae taskqueue_run()+0xaf taskqueue_swi_run()+0x13 ithread_loop() =2E.. Any ideas? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDOGJdForvXbEpPzQRAtrkAJ9o3/aYPKczvT9fe0sJiMEMZXDjJwCgmuXk lvF5AM93sIICkLww/xZRWlg= =mcBr -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 00:29:11 2005 Return-Path: X-Original-To: net@freebsd.org 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 CE1DD16A41F for ; Tue, 27 Sep 2005 00:29:11 +0000 (GMT) (envelope-from dave-dated-1128212947.55686a@seddon.ca) Received: from seddon.ca (seddon.ca [203.209.212.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 02D0B43D53 for ; Tue, 27 Sep 2005 00:29:10 +0000 (GMT) (envelope-from dave-dated-1128212947.55686a@seddon.ca) Received: (qmail 83796 invoked by uid 89); 27 Sep 2005 00:29:08 -0000 Received: by seddon.ca (tmda-sendmail, from uid 89); Tue, 27 Sep 2005 10:29:07 +1000 (EST) References: <20050926142907.GI91328@cell.sick.ru> <43380F05.3070005@benswebs.com> <43380FDF.90706@he.iki.fi> <1eea89cd05092610348e5963b@mail.gmail.com> In-Reply-To: <1eea89cd05092610348e5963b@mail.gmail.com> To: net@freebsd.org Date: Tue, 27 Sep 2005 10:29:06 +1000 Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit From: Dave+Seddon Message-ID: <1127780947.83721.TMDA@seddon.ca> X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) Cc: Subject: Re: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 00:29:11 -0000 Can we try running the windows drivers? Wasn't that called project evil. Dave Scott M. Ferris writes: > On 9/26/05, Petri Helenius wrote: >> >> Does anyone have the programming data for the chipsets so the driver >> could be taken further? I've been unable to obtain them from Intel >> despite of repeated attempts. > > Intel released the 8254x Developer Manual in late July, so some > information is now available. You can download a PDF from > SourceForge: > > http://www.sourceforge.net/projects/e1000/ > > Unfortunately that document doesn't appear to have any chip errata in it, > so you may have to search the Linux driver for the work-arounds it's using, > but it's better than having no documentation at all. > > -- > Scott M. Ferris > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 02:28:56 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 C818E16A41F; Tue, 27 Sep 2005 02:28:56 +0000 (GMT) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80DD043D49; Tue, 27 Sep 2005 02:28:56 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.192] ([10.0.0.192]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.6) with ESMTP id j8R2Ss6j030084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 26 Sep 2005 19:28:56 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4338AE12.7040309@errno.com> Date: Mon, 26 Sep 2005 19:27:30 -0700 From: Sam Leffler Organization: Errno Consulting User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20050926210429.GA1198@garage.freebsd.pl> In-Reply-To: <20050926210429.GA1198@garage.freebsd.pl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: ath(4) panic: bus_dmamap_load_sg: no mbuf packet header! X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 02:28:57 -0000 Pawel Jakub Dawidek wrote: > Hi. > > I configured NAT (using pf(4)) on my laptop: > > MacOSX (Tiger) <-----> ath0[my laptop]bge0 <-----> local machine > > When I started downloading few files on Mac from "local machine" via FTP > in parallel I got this panic after few minutes (I was able to reproduce it): > > panic: bus_dmamap_load_sg: no mbuf packet header! > > And the backtrace: > > panic() > bus_dmamap_load_sg()+0x2a > ath_start()+0x2ae > taskqueue_run()+0xaf > taskqueue_swi_run()+0x13 > ithread_loop() > ... > > Any ideas? > I'm guessing you hand-transcribed stuff since there are typos (e.g. bus_dmamap_load_mbuf_sg is not called from ath_start but is called from ath_tx_start which is called from ath_start). This indicates the mbuf chain is malformed (missing a packet header). Since the packet is apparently coming in via pf you might want to look there. Sam From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 06:44:59 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 143CD16A41F for ; Tue, 27 Sep 2005 06:44:59 +0000 (GMT) (envelope-from daemon@foxchat.net) Received: from foxsurfer.com (dns1.foxsurfer.com [205.134.229.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id C782843D48 for ; Tue, 27 Sep 2005 06:44:58 +0000 (GMT) (envelope-from daemon@foxchat.net) Received: from [24.172.9.74] (zapper@rrcs-24-172-9-74.midsouth.biz.rr.com [24.172.9.74]) by foxsurfer.com (8.13.3/8.13.3) with ESMTP id j8R6iox6063059 for ; Mon, 26 Sep 2005 23:44:50 -0700 (PDT) (envelope-from daemon@foxchat.net) Message-ID: <4338EA66.6010906@foxchat.net> Date: Tue, 27 Sep 2005 02:44:54 -0400 From: Daemon User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-102.2 required=9.5 tests=ALL_TRUSTED,HOT_NASTY, USER_IN_WHITELIST autolearn=failed version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on FoxSurfer.Com Subject: arplookup problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 06:44:59 -0000 I hope this is the correct list to post to, if not, I apologize. I've had an ongoing problem with arplookup for some months now and as of yet, haven't been able to find anything on the web concerning my particular problem. Every 24 hours, almost to the minute, I get the following errors; *Note This proceeds each arplookup failure em0: Link is Down em0: Link is up 100 Mbps Full Duplex Sep 25 01:32:49 thisbox kernel: arplookup 169.0.0.1 failed: host is not on local network Sep 25 01:33:05 thisbox kernel: arplookup 10.32.240.171 failed: host is not on local network Sep 26 01:23:37 thisbox kernel: arplookup 169.0.0.1 failed: host is not on local network Sep 26 01:23:49 thisbox kernel: arplookup 10.32.240.171 failed: host is not on local network Sep 27 01:23:35 thisbox kernel: arplookup 169.0.0.1 failed: host is not on local network Sep 27 01:23:48 thisbox kernel: arplookup 10.32.240.171 failed: host is not on local network When this happens, one by one, each of my (ssh, gaim, irc, etc.) connections time out until every connection is dead. I'm using RoadRunner Business Class with a static IP on em0 and an internal subnet 172.16.XXX.XXX on em1. I was getting the errors on two older nics I had, so I bought new nics in hopes that would correct the problem. I was running FreeBSD 5.4-Release p7 and switched to FreeBSD 5.4-STABLE about a week ago. I'm running the most current DHCP server, IPFW2, and NATD. I have the following in /etc/sysctl.conf kern.polling.enable=1 net.inet.tcp.syncookies=0 net.inet.udp.blackhole=1 net.inet.tcp.blackhole=2 # TCP send and receive spaces net.inet.tcp.sendspace=1048576 net.inet.tcp.recvspace=1048576 # Socket queue defense against SYN attacks kern.ipc.somaxconn=1024 # Redirects net.inet.icmp.drop_redirect=1 net.inet.icmp.log_redirect=1 net.inet.ip.redirect=0 # Subnet net.link.ether.bridge_cfg=em0,em1 net.link.ether.bridge.enable=0 net.link.ether.bridge.ipfw=0 net.link.ether.ipfw=1 # ARP cleanup net.link.ether.inet.max_age=1200 # Source routing net.inet.ip.sourceroute=0 net.inet.ip.accept_sourceroute=0 # Broadcast ECHO response net.inet.icmp.bmcastecho=0 # Other broadcast probes net.inet.icmp.maskrepl=0 net.inet.ip.fw.dyn_ack_lifetime=3600 net.inet.ip.fw.dyn_buckets=1024 net.inet.ip.fw.one_pass=0 I have the following in my kernel conf; # Firewall Stuff options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL options IPFIREWALL_FORWARD options IPFIREWALL_FORWARD_EXTENDED options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=10 options IPDIVERT options DUMMYNET options BRIDGE options IPSTEALTH options HZ=1000 options DEVICE_POLLING It is probably a bad idea to post my /etc/rc.conf ifconfig info here, but since I'm almost positive that in order for someone to help me track this down, they're going to want/need to know what is in there, I'll wait in hopes of a response first. Regards, Mark From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 07:31:11 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 0B45316A41F for ; Tue, 27 Sep 2005 07:31:11 +0000 (GMT) (envelope-from dave-sender-1932b5@seddon.ca) Received: from seddon.ca (seddon.ca [203.209.212.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 5022F43D53 for ; Tue, 27 Sep 2005 07:31:10 +0000 (GMT) (envelope-from dave-sender-1932b5@seddon.ca) Received: (qmail 15181 invoked by uid 89); 27 Sep 2005 07:31:08 -0000 Received: by seddon.ca (tmda-sendmail, from uid 89); Tue, 27 Sep 2005 17:31:06 +1000 (EST) References: <4338EA66.6010906@foxchat.net> In-Reply-To: <4338EA66.6010906@foxchat.net> To: Daemon Date: Tue, 27 Sep 2005 17:31:05 +1000 Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <1127806266.15081.TMDA@seddon.ca> X-Delivery-Agent: TMDA/1.0.3 (Seattle Slew) From: Dave+Seddon Cc: freebsd-net@freebsd.org Subject: Re: arplookup problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: das-keyword-net.6770cb@seddon.ca List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 07:31:11 -0000 There seem to be serious issues around this driver. There have been many posts on this list in the last days particularly, as well as over the last few months. People seem to be looking at it, and I guess once we all rush out and by other (e.g. broadcom) NICs intel might try to help. dave Daemon writes: > I hope this is the correct list to post to, if not, I apologize. I've > had an ongoing problem with arplookup for some months now and as of yet, > haven't been able to find anything on the web concerning my particular > problem. Every 24 hours, almost to the minute, I get the following errors; > > *Note This proceeds each arplookup failure > em0: Link is Down > em0: Link is up 100 Mbps Full Duplex > > Sep 25 01:32:49 thisbox kernel: arplookup 169.0.0.1 failed: host is not > on local network > Sep 25 01:33:05 thisbox kernel: arplookup 10.32.240.171 failed: host is > not on local network > Sep 26 01:23:37 thisbox kernel: arplookup 169.0.0.1 failed: host is not > on local network > Sep 26 01:23:49 thisbox kernel: arplookup 10.32.240.171 failed: host is > not on local network > Sep 27 01:23:35 thisbox kernel: arplookup 169.0.0.1 failed: host is not > on local network > Sep 27 01:23:48 thisbox kernel: arplookup 10.32.240.171 failed: host is > not on local network > > When this happens, one by one, each of my (ssh, gaim, irc, etc.) > connections time out until every connection is dead. I'm using > RoadRunner Business Class with a static IP on em0 and an internal subnet > 172.16.XXX.XXX on em1. I was getting the errors on two older nics I > had, so I bought new nics in hopes that would correct the problem. I > was running FreeBSD 5.4-Release p7 and switched to FreeBSD 5.4-STABLE > about a week ago. I'm running the most current DHCP server, IPFW2, and > NATD. > > I have the following in /etc/sysctl.conf > kern.polling.enable=1 > net.inet.tcp.syncookies=0 > net.inet.udp.blackhole=1 > net.inet.tcp.blackhole=2 > # TCP send and receive spaces > net.inet.tcp.sendspace=1048576 > net.inet.tcp.recvspace=1048576 > # Socket queue defense against SYN attacks > kern.ipc.somaxconn=1024 > # Redirects > net.inet.icmp.drop_redirect=1 > net.inet.icmp.log_redirect=1 > net.inet.ip.redirect=0 > # Subnet > net.link.ether.bridge_cfg=em0,em1 > net.link.ether.bridge.enable=0 > net.link.ether.bridge.ipfw=0 > net.link.ether.ipfw=1 > # ARP cleanup > net.link.ether.inet.max_age=1200 > # Source routing > net.inet.ip.sourceroute=0 > net.inet.ip.accept_sourceroute=0 > # Broadcast ECHO response > net.inet.icmp.bmcastecho=0 > # Other broadcast probes > net.inet.icmp.maskrepl=0 > net.inet.ip.fw.dyn_ack_lifetime=3600 > net.inet.ip.fw.dyn_buckets=1024 > net.inet.ip.fw.one_pass=0 > > I have the following in my kernel conf; > # Firewall Stuff > options IPFIREWALL_DEFAULT_TO_ACCEPT > options IPFIREWALL > options IPFIREWALL_FORWARD > options IPFIREWALL_FORWARD_EXTENDED > options IPFIREWALL_VERBOSE > options IPFIREWALL_VERBOSE_LIMIT=10 > options IPDIVERT > options DUMMYNET > options BRIDGE > options IPSTEALTH > options HZ=1000 > options DEVICE_POLLING > > It is probably a bad idea to post my /etc/rc.conf ifconfig info here, > but since I'm almost positive that in order for someone to help me track > this down, they're going to want/need to know what is in there, I'll > wait in hopes of a response first. > > > Regards, > > Mark > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 07:44:12 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 93D6616A41F for ; Tue, 27 Sep 2005 07:44:12 +0000 (GMT) (envelope-from daemon@foxchat.net) Received: from foxsurfer.com (dns1.foxsurfer.com [205.134.229.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4804D43D4C for ; Tue, 27 Sep 2005 07:44:12 +0000 (GMT) (envelope-from daemon@foxchat.net) Received: from [24.172.9.74] (zapper@rrcs-24-172-9-74.midsouth.biz.rr.com [24.172.9.74]) by foxsurfer.com (8.13.3/8.13.3) with ESMTP id j8R7i0dQ063816 for ; Tue, 27 Sep 2005 00:44:01 -0700 (PDT) (envelope-from daemon@foxchat.net) Message-ID: <4338F847.9090504@foxchat.net> Date: Tue, 27 Sep 2005 03:44:07 -0400 From: Daemon User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <4338EA66.6010906@foxchat.net> <1127806266.15081.TMDA@seddon.ca> In-Reply-To: <1127806266.15081.TMDA@seddon.ca> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-102.2 required=9.5 tests=ALL_TRUSTED,HOT_NASTY, USER_IN_WHITELIST autolearn=failed version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on FoxSurfer.Com Subject: Re: arplookup problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 07:44:12 -0000 I'm not sure how to respond to that. I was getting the same errors on older ed0 and rl0 nic cards. I bought the intel cards because I'm using them on a production server and have had zero problems with them. Dave+Seddon wrote: > There seem to be serious issues around this driver. There have been > many posts on this list in the last days particularly, as well as over > the last few months. People seem to be looking at it, and I guess once > we all rush out and by other (e.g. broadcom) NICs intel might try to help. > dave > > Daemon writes: > >> I hope this is the correct list to post to, if not, I apologize. I've >> had an ongoing problem with arplookup for some months now and as of yet, >> haven't been able to find anything on the web concerning my particular >> problem. Every 24 hours, almost to the minute, I get the following >> errors; >> *Note This proceeds each arplookup failure >> em0: Link is Down >> em0: Link is up 100 Mbps Full Duplex >> Sep 25 01:32:49 thisbox kernel: arplookup 169.0.0.1 failed: host is not >> on local network >> Sep 25 01:33:05 thisbox kernel: arplookup 10.32.240.171 failed: host is >> not on local network >> Sep 26 01:23:37 thisbox kernel: arplookup 169.0.0.1 failed: host is not >> on local network >> Sep 26 01:23:49 thisbox kernel: arplookup 10.32.240.171 failed: host is >> not on local network >> Sep 27 01:23:35 thisbox kernel: arplookup 169.0.0.1 failed: host is not >> on local network >> Sep 27 01:23:48 thisbox kernel: arplookup 10.32.240.171 failed: host is >> not on local network >> When this happens, one by one, each of my (ssh, gaim, irc, etc.) >> connections time out until every connection is dead. I'm using >> RoadRunner Business Class with a static IP on em0 and an internal subnet >> 172.16.XXX.XXX on em1. I was getting the errors on two older nics I >> had, so I bought new nics in hopes that would correct the problem. I >> was running FreeBSD 5.4-Release p7 and switched to FreeBSD 5.4-STABLE >> about a week ago. I'm running the most current DHCP server, IPFW2, and >> NATD. >> I have the following in /etc/sysctl.conf >> kern.polling.enable=1 >> net.inet.tcp.syncookies=0 >> net.inet.udp.blackhole=1 >> net.inet.tcp.blackhole=2 >> # TCP send and receive spaces >> net.inet.tcp.sendspace=1048576 >> net.inet.tcp.recvspace=1048576 >> # Socket queue defense against SYN attacks >> kern.ipc.somaxconn=1024 >> # Redirects >> net.inet.icmp.drop_redirect=1 >> net.inet.icmp.log_redirect=1 >> net.inet.ip.redirect=0 >> # Subnet >> net.link.ether.bridge_cfg=em0,em1 >> net.link.ether.bridge.enable=0 >> net.link.ether.bridge.ipfw=0 >> net.link.ether.ipfw=1 >> # ARP cleanup >> net.link.ether.inet.max_age=1200 >> # Source routing >> net.inet.ip.sourceroute=0 >> net.inet.ip.accept_sourceroute=0 >> # Broadcast ECHO response >> net.inet.icmp.bmcastecho=0 >> # Other broadcast probes >> net.inet.icmp.maskrepl=0 >> net.inet.ip.fw.dyn_ack_lifetime=3600 >> net.inet.ip.fw.dyn_buckets=1024 >> net.inet.ip.fw.one_pass=0 >> I have the following in my kernel conf; >> # Firewall Stuff >> options IPFIREWALL_DEFAULT_TO_ACCEPT >> options IPFIREWALL >> options IPFIREWALL_FORWARD >> options IPFIREWALL_FORWARD_EXTENDED >> options IPFIREWALL_VERBOSE >> options IPFIREWALL_VERBOSE_LIMIT=10 >> options IPDIVERT >> options DUMMYNET >> options BRIDGE >> options IPSTEALTH >> options HZ=1000 >> options DEVICE_POLLING >> It is probably a bad idea to post my /etc/rc.conf ifconfig info here, >> but since I'm almost positive that in order for someone to help me track >> this down, they're going to want/need to know what is in there, I'll >> wait in hopes of a response first. >> >> Regards, >> Mark >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 08:08:07 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 43A0316A41F for ; Tue, 27 Sep 2005 08:08:07 +0000 (GMT) (envelope-from jan@melen.org) Received: from foxgw.melen.org (Savi-Mel.dna.fi [83.143.60.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BA7743D49 for ; Tue, 27 Sep 2005 08:08:05 +0000 (GMT) (envelope-from jan@melen.org) Received: from [2001:5c0:8706:2:208:74ff:fee4:decb] ([IPv6:2001:5c0:8706:2:208:74ff:fee4:decb]) (authenticated bits=0) by foxgw.melen.org (8.13.4/8.13.4) with ESMTP id j8R87hfh047908 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Tue, 27 Sep 2005 11:07:58 +0300 (EEST) (envelope-from jan@melen.org) From: Jan Mikael Melen To: freebsd-net@freebsd.org Date: Tue, 27 Sep 2005 11:07:34 +0300 User-Agent: KMail/1.8 References: <200509251353.j8PDr5XE005907@lurza.secnetix.de> In-Reply-To: <200509251353.j8PDr5XE005907@lurza.secnetix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509271107.37830.jan@melen.org> X-Virus-Scanned: ClamAV version 0.86.2, clamav-milter version 0.86 on foxgw.melen.org X-Virus-Status: Clean Cc: Oliver Fromme Subject: Re: VIA VT6103 support (VIA EPIA PD) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 08:08:07 -0000 Hi, I have a PD board running FreeBSD 6 and here something that I have noticed. I have had the PD board only for few months and have not had really time stress test it but it works pretty fine as wireless-AP and firewall for rest of my home network. Few weird things that I have noticed are that from the network device you can't get the full 100Mbit/s out of the ethernet ports. My friend has the EPIA PD-6000 with NetBSD and he has experienced the same problem that you can get only roughly 20 Mbit/s through the interfaces. He has also EPIA SP-8000 where he gets the whole 100Mbit/s through the interface. Other weird thing is that I get a kernel panic after final sync when halting system, I've investigated that this propably doesn't have anything to do with the VIA EPIA motherboard and I think the problem has something do either with bridging or the atheros wireless driver. Regards, Jan On Sunday 25 September 2005 16:53, Oliver Fromme wrote: > Mark J. Sommer wrote: > > Friend found a post regarding this. Says there is an update to the BIOS > > too. Please check out: > > > > http://forums.viaarena.com/messageview.aspx?catid=28&threadid=60131 > > Thanks, I've read through the complete thread (more than > 300 messages). It seems that the lock-ups people have been > experiencing were caused by several issues, most of which > are only Linux-specific (bugs in the longhaul driver and > in the itvt driver, and problems caused by using optimized > 686-code). I don't expect any of those problems to appear > under FreeBSD. It's also worth noting that there are _no_ > FreeBSD PRs at all which mention such problems with EPIA > boards. The only problem I've been readong about was the > VT6102/6103 issue, and that's why I wrote the initial > message in this thread. > > (BTW, some people also reported that their problems were > caused by improperly grounded hardware.) > > > If anyone has this working properly with FreeBSD, I'd appreciate > > knowing. I hear the Ethernet on these are not great performers. > > I'll report as soon as I got my PD board and performed some > testing. > > Best regards > Oliver From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 14:30:24 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.ORG 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 E441D16A41F for ; Tue, 27 Sep 2005 14:30:24 +0000 (GMT) (envelope-from howells@kde.org) Received: from mail.devrandom.org.uk (host-84-9-223-82.bulldogdsl.com [84.9.223.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6350343D53 for ; Tue, 27 Sep 2005 14:30:24 +0000 (GMT) (envelope-from howells@kde.org) Received: from localhost (localhost [127.0.0.1]) by mail.devrandom.org.uk (Postfix) with ESMTP id 187DEFD023 for ; Tue, 27 Sep 2005 15:30:23 +0100 (BST) Received: from mail.devrandom.org.uk ([127.0.0.1]) by localhost (mail.devrandom.org.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 22352-02 for ; Tue, 27 Sep 2005 15:30:13 +0100 (BST) Received: from webmail.devrandom.org.uk (localhost [127.0.0.1]) by mail.devrandom.org.uk (Postfix) with ESMTP id 93B00FD021 for ; Tue, 27 Sep 2005 15:30:13 +0100 (BST) Received: from 83.146.28.162 (SquirrelMail authenticated user chris@chrishowells.co.uk) by webmail.devrandom.org.uk with HTTP; Tue, 27 Sep 2005 15:30:13 +0100 (BST) Message-ID: <2414.83.146.28.162.1127831413.squirrel@webmail.devrandom.org.uk> In-Reply-To: <200509241558.j8OFwbRI066354@lurza.secnetix.de> References: <200509241605.26998.howells@kde.org> <200509241558.j8OFwbRI066354@lurza.secnetix.de> Date: Tue, 27 Sep 2005 15:30:13 +0100 (BST) From: "Chris Howells" To: freebsd-net@FreeBSD.ORG User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: amavisd-new at devrandom.org.uk Cc: Subject: Re: VIA VT6103 support (VIA EPIA PD) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 14:30:25 -0000 On Sat, September 24, 2005 4:58 pm, Oliver Fromme wrote: > But how do I know which VIA boards are affected? > Does the VIA EPIA PD have that problem? > I cannot find any information about a "VIA BIOS bug". Please see here: http://www.viaarena.com/default.aspx?PageID=22&DSCat=155&DCatType=3 Actually the PD doesn't seem to be mentioned. Whether that's because it's clear of the problem or because Via haven't admitted to it yet I don't know (people have been complaining of the lockups in the ViaArena Linux forum for a very long time, and Via has only just released those new BIOSes). -- Cheers, Chris Howells -- howells@kde.org Web: http://www.kde.org.uk, PGP ID: 0x33795A2C KDE/Qt Developer: http://www.kde.org From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 20:45:33 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 20A6116A41F for ; Tue, 27 Sep 2005 20:45:33 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 48CCD43D48 for ; Tue, 27 Sep 2005 20:45:27 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j8RKgI8x092660 for freebsd-net@freebsd.org.checked; Wed, 28 Sep 2005 00:42:18 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (localhost.cronyx.ru [127.0.0.1]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j8RKf9wT092641; Wed, 28 Sep 2005 00:41:09 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <4339AC33.2090700@cronyx.ru> Date: Wed, 28 Sep 2005 00:31:47 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: n0g0013 References: <20050918003946.GM6440@eyore.cobbled.net> In-Reply-To: <20050918003946.GM6440@eyore.cobbled.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: the purpose/use of "opt_netgraph.h" ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 20:45:33 -0000 n0g0013: >could anybody enlighten me as to the purpose of the "opt_netgraph.h" >dependancy in a netgraph module? > >got some errors, added it to SRCS and it gets generated as an empty >file. think there is a minimal one in "sr" driver but can't guess >it's intent. > Defines NETGRAPH rik > > > From owner-freebsd-net@FreeBSD.ORG Tue Sep 27 22:26:37 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 0AC2A16A41F for ; Tue, 27 Sep 2005 22:26:36 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86DD943D48 for ; Tue, 27 Sep 2005 22:26:36 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [70.30.70.180]) by elvis.mu.org (Postfix) with ESMTP id 237151A3C19 for ; Tue, 27 Sep 2005 15:26:36 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 54D4A514C7; Tue, 27 Sep 2005 18:26:34 -0400 (EDT) Date: Tue, 27 Sep 2005 18:26:34 -0400 From: Kris Kennaway To: net@FreeBSD.org Message-ID: <20050927222634.GA46375@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: ipv6 panic in 6.0 ([kris@FreeBSD.org: kern/85780: 'panic: bogus refcnt 0' in routing/ipv6]) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Sep 2005 22:26:37 -0000 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Can someone please look into this ipv6 panic? It is now my #1 panic on 6.0 (every few days, and I hardly make any use of ipv6 except for light nfs and tcp traffic), so it would be good to get it fixed before the release. Kris ----- Forwarded message from Kris Kennaway ----- X-Original-To: kkenn@localhost Delivered-To: kkenn@localhost.obsecurity.org X-Original-To: kris@freebsd.org Delivered-To: kris@freebsd.org X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Resent-Date: Tue, 6 Sep 2005 04:10:11 GMT Resent-Message-Id: <200509060410.j864ABSc034825@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kris Kennaway Date: Tue, 6 Sep 2005 04:00:34 GMT From: Kris Kennaway To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc:=20 Subject: kern/85780: 'panic: bogus refcnt 0' in routing/ipv6 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: owner-freebsd-bugs@freebsd.org X-UIDL: fH3"!MZN!!DNumber: 85780 >Category: kern >Synopsis: 'panic: bogus refcnt 0' in routing/ipv6 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: =20 >Keywords: =20 >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Sep 06 04:10:11 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Kris Kennaway >Release: 7.0 >Organization: FreeBSD >Environment: sparc64 >Description: This panic occurred on an SMP sparc64 machine. > panic: bogus refcnt 0 > cpuid =3D 0 > KDB: enter: panic > [thread pid 15 tid 100003 ] > Stopped at kdb_enter+0x3c: ta %xcc, 1 > db> wh > Tracing pid 15 tid 100003 td 0xfffff8001fb75680 > panic() at panic+0x164 > rtfree() at rtfree+0x7c > nd6_na_output() at nd6_na_output+0x4d0 > nd6_ns_input() at nd6_ns_input+0x704 > icmp6_input() at icmp6_input+0xc38 > ip6_input() at ip6_input+0xf5c > netisr_processqueue() at netisr_processqueue+0x7c > swi_net() at swi_net+0xdc > ithread_loop() at ithread_loop+0x18c > fork_exit() at fork_exit+0x94 > fork_trampoline() at fork_trampoline+0x8 It uses ipv6 to e.g. mount nfs /home directories and for ssh traffic, but= the machine seems to have been idle at the time of panic (no other process= es active on the other CPUs, and nothing much else running on the system ei= ther). core available. >How-To-Repeat: It's only happened once so far. >Fix: =20 >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org" ----- End forwarded message ----- --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDOccZWry0BWjoQKURAj7TAJ9AXmdji3GcFxzPeMn6NqoRCITNKgCg9bX5 lp5EWL5/bkAFb/2Bty60J5g= =5Tz6 -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/-- From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 03:07:13 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 5FF5116A420 for ; Wed, 28 Sep 2005 03:07:13 +0000 (GMT) (envelope-from suz@alaxala.net) Received: from pc1.alaxala.kame.net (kame219.kame.net [203.178.141.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B4FA43D53 for ; Wed, 28 Sep 2005 03:07:11 +0000 (GMT) (envelope-from suz@alaxala.net) Received: from localhost (localhost [127.0.0.1]) by pc1.alaxala.kame.net (Postfix) with ESMTP id 503DB62B5; Wed, 28 Sep 2005 12:07:47 +0900 (JST) Received: from pc1.alaxala.kame.net ([127.0.0.1]) by localhost (pc1.alaxala.kame.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 97685-02; Wed, 28 Sep 2005 12:07:42 +0900 (JST) Received: from flora220.uki-uki.net (240.163.192.61.tokyo.global.alpha-net.ne.jp [61.192.163.240]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pc1.alaxala.kame.net (Postfix) with ESMTP id D8F1262B4; Wed, 28 Sep 2005 12:07:41 +0900 (JST) Date: Wed, 28 Sep 2005 12:06:18 +0900 Message-ID: From: SUZUKI Shinsuke To: kris@obsecurity.org X-cite: xcite 1.33 In-Reply-To: <20050927222634.GA46375@xor.obsecurity.org> References: <20050927222634.GA46375@xor.obsecurity.org> User-Agent: Wanderlust/2.15.1 (Almost Unreal) Emacs/22.0 Mule/5.0 (SAKAKI) Organization: Technical Marketing Dept., ALAXALA Networks Corporation MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: amavisd-new at alaxala.kame.net Cc: net@FreeBSD.org Subject: Re: ipv6 panic in 6.0 ([kris@FreeBSD.org: kern/85780: 'panic: bogus refcnt 0' in routing/ipv6]) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 03:07:13 -0000 Hello kris, >>>>> On Tue, 27 Sep 2005 18:26:34 -0400 >>>>> kris@obsecurity.org(Kris Kennaway) said: > Can someone please look into this ipv6 panic? It is now my #1 panic > on 6.0 (every few days, and I hardly make any use of ipv6 except for > light nfs and tcp traffic), so it would be good to get it fixed before > the release. Let me confirm one thing. Did you also see a message "panic: bogus refcnt 0", in your panic? As far as I investigated, only IF_CLONE_REMREF_LOCKED() can display this message. But it's called only in if_clone_create/detach/destory(), and none of them seems to be called according to the description in the PR. (rtexpunge() in route.c also has this message, but it is commented out by "if 0", so it is not the cause of this message) Thanks, ---- SUZUKI, Shinsuke @ KAME Project From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 06:41:55 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 26E8616A41F for ; Wed, 28 Sep 2005 06:41:55 +0000 (GMT) (envelope-from lourik@wtec.co.za) Received: from meerkat.wtec.co.za (meerkat.wtec.co.za [69.67.33.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id D198043D49 for ; Wed, 28 Sep 2005 06:41:52 +0000 (GMT) (envelope-from lourik@wtec.co.za) Received: from lourik.wtec.co.za ([192.168.2.200]) (AUTH: PLAIN lourik@wtec.co.za) by meerkat.wtec.co.za with esmtp; Wed, 28 Sep 2005 08:45:31 +0200 From: Lourik Malan Organization: Woodlands Technologies Pty(LTD) To: freebsd-net@freebsd.org Date: Wed, 28 Sep 2005 06:41:33 +0000 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509280641.33322.lourik@wtec.co.za> Subject: Need IPNAT help PLEASE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lourik@wtec.co.za List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 06:41:55 -0000 Hi There I'm running FreeBSD 5.4 and ipnat. Ipnat works on 187 but not any of the aliasip address. Any idee? ifconfig_rl0=" inet 196.23.176.187 netmask 255.255.255.240" ifconfig_rl0_alias0=" inet 196.23.176.188 netmask 255.255.255.255" ifconfig_rl0_alias1=" inet 196.23.176.189 netmask 255.255.255.255" ifconfig_rl0_alias2=" inet 196.23.176.190 netmask 255.255.255.255" ifconfig_rl0_alias3=" inet 196.23.176.186 netmask 255.255.255.255" ifconfig_rl0_alias4=" inet 196.23.176.185 netmask 255.255.255.255" ifconfig_rl0_alias5=" inet 196.23.176.184 netmask 255.255.255.255" Regards From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 07:20:33 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 A773C16A41F for ; Wed, 28 Sep 2005 07:20:33 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from mail.yazzy.org (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BDAF43D48 for ; Wed, 28 Sep 2005 07:20:33 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from 217-13-2-82.dd.nextgentel.com ([217.13.2.82] helo=marcin) by mail.yazzy.org with esmtps (TLSv1:AES256-SHA:256) (YazzY.org) id 1EKWEV-0002rE-8K; Wed, 28 Sep 2005 09:20:03 +0200 Date: Wed, 28 Sep 2005 09:20:29 +0200 From: Marcin Jessa To: lourik@wtec.co.za Message-Id: <20050928092029.3b941b1b.lists@yazzy.org> In-Reply-To: <200509280641.33322.lourik@wtec.co.za> References: <200509280641.33322.lourik@wtec.co.za> Organization: YazzY.org X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) Cc: freebsd-net@freebsd.org Subject: Re: Need IPNAT help PLEASE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 07:20:33 -0000 On Wed, 28 Sep 2005 06:41:33 +0000 Lourik Malan wrote: > Hi There > > I'm running FreeBSD 5.4 and ipnat. Ipnat works on 187 but not any of > the aliasip address. Any idee? > > ifconfig_rl0=" inet 196.23.176.187 netmask > 255.255.255.240" ifconfig_rl0_alias0=" inet 196.23.176.188 > netmask 255.255.255.255" ifconfig_rl0_alias1=" inet > 196.23.176.189 netmask 255.255.255.255" ifconfig_rl0_alias2=" > inet 196.23.176.190 netmask 255.255.255.255" > ifconfig_rl0_alias3=" inet 196.23.176.186 netmask > 255.255.255.255" ifconfig_rl0_alias4=" inet 196.23.176.185 > netmask 255.255.255.255" ifconfig_rl0_alias5=" inet > 196.23.176.184 netmask 255.255.255.255" > Show us your ipna t rules. From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 08:07:16 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 7F94C16A41F for ; Wed, 28 Sep 2005 08:07:16 +0000 (GMT) (envelope-from lourik@wtec.co.za) Received: from meerkat.wtec.co.za (meerkat.wtec.co.za [69.67.33.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id E97B743D49 for ; Wed, 28 Sep 2005 08:07:13 +0000 (GMT) (envelope-from lourik@wtec.co.za) Received: from lourik.wtec.co.za ([192.168.2.200]) (AUTH: PLAIN lourik@wtec.co.za) by meerkat.wtec.co.za with esmtp; Wed, 28 Sep 2005 10:10:51 +0200 From: Lourik Malan Organization: Woodlands Technologies Pty(LTD) To: Marcin Jessa , freebsd-net@freebsd.org Date: Wed, 28 Sep 2005 08:06:52 +0000 User-Agent: KMail/1.8 References: <200509280641.33322.lourik@wtec.co.za> <20050928092029.3b941b1b.lists@yazzy.org> In-Reply-To: <20050928092029.3b941b1b.lists@yazzy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509280806.52975.lourik@wtec.co.za> Cc: Subject: Re: Need IPNAT help PLEASE X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lourik@wtec.co.za List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 08:07:16 -0000 rdr rl0 196.23.176.185/32 port 80 -> 172.20.154.196 port 80 rdr rl0 196.23.176.185/32 port 5900 -> 172.20.154.196 port 5900 bimap rl0 172.20.154.199/32 -> 196.23.176.188/32 bimap rl0 172.20.154.198/32 -> 196.23.176.189/32 bimap rl0 172.20.154.197/32 -> 196.23.176.190/32 map rl0 172.20.154.0/24 -> 196.23.176.187/32 On Wednesday 28 September 2005 07:20, you wrote: > On Wed, 28 Sep 2005 06:41:33 +0000 > > Lourik Malan wrote: > > Hi There > > > > I'm running FreeBSD 5.4 and ipnat. Ipnat works on 187 but not any of > > the aliasip address. Any idee? > > > > ifconfig_rl0=" inet 196.23.176.187 netmask > > 255.255.255.240" ifconfig_rl0_alias0=" inet 196.23.176.188 > > netmask 255.255.255.255" ifconfig_rl0_alias1=" inet > > 196.23.176.189 netmask 255.255.255.255" ifconfig_rl0_alias2=" > > inet 196.23.176.190 netmask 255.255.255.255" > > ifconfig_rl0_alias3=" inet 196.23.176.186 netmask > > 255.255.255.255" ifconfig_rl0_alias4=" inet 196.23.176.185 > > netmask 255.255.255.255" ifconfig_rl0_alias5=" inet > > 196.23.176.184 netmask 255.255.255.255" > > Show us your ipna t rules. -- Lourik Malan Woodlands Technologies Pty(LTD) 082 570 3191 From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 10:32:51 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 D695816A41F; Wed, 28 Sep 2005 10:32:51 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 10BA743D48; Wed, 28 Sep 2005 10:32:50 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j8SAWiff091284; Wed, 28 Sep 2005 14:32:44 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j8SAWfY4091279; Wed, 28 Sep 2005 14:32:41 +0400 (MSD) (envelope-from yar) Date: Wed, 28 Sep 2005 14:32:41 +0400 From: Yar Tikhiy To: Bernd Walter Message-ID: <20050928103241.GC86457@comp.chem.msu.su> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> <20050925225432.GH552@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050925225432.GH552@cicely12.cicely.de> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, Gavin Atkinson Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 10:32:52 -0000 On Mon, Sep 26, 2005 at 12:54:33AM +0200, Bernd Walter wrote: > On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote: > > > > Also, you can't set both the vlan and IP address information: > > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0 > > ifconfig: inet: bad value > > > > As a result of this, the only way to create vlans from rc.conf seems to > > be in two stages, by renaming the interface: > > > > cloned_interfaces="vlan14" > > ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" > > ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0" > > The follwing always worked for me, no need to rename: > cloned_interfaces="vlan1" > ifconfig_vlan1="inet 1.2.3.4/29 vlan 1 vlandev fxp0" Indeed, the address assignment arguments should precede other parameters to ifconfig(8). I think this is evident from the syntax shown on the manpage. > What doesn't work is this: > ifconfig_vlan1_alias0="1.2.3.4/32" > I had to configure them by a selfdone script. Adding aliases on vlanX this way has been working for me. Could you check if prepending the "inet" keyword before the address changes anything? I prefer to specify address family explicitly in my rc.conf files. E.g.: ifconfig_vlan1_alias0="inet 1.2.3.4/32" -- Yar From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 10:39:44 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 BA96616A41F; Wed, 28 Sep 2005 10:39:44 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6499543D49; Wed, 28 Sep 2005 10:39:41 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j8SAdciq091482; Wed, 28 Sep 2005 14:39:38 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j8SAdcFR091481; Wed, 28 Sep 2005 14:39:38 +0400 (MSD) (envelope-from yar) Date: Wed, 28 Sep 2005 14:39:37 +0400 From: Yar Tikhiy To: Gavin Atkinson Message-ID: <20050928103937.GD86457@comp.chem.msu.su> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1127686105.23447.35.camel@buffy.york.ac.uk> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 10:39:44 -0000 On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote: > > There's also the issue that the "vlan" and "vlandev" options have to be > specified in that order, which is counter-intuitive and undocumented. > > leeloo# ifconfig vlan14 vlandev fxp0 vlan 14 > ifconfig: must specify both vlan tag and device > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 > leeloo# Agreed. I noticed this issue, too, but forgot about it later. Would you mind filing a PR with me in Cc so that I won't forget about it again? Can't promise making the order arbitrary, but documenting this subtlety is a must. > Also, you can't set both the vlan and IP address information: > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0 > ifconfig: inet: bad value > > As a result of this, the only way to create vlans from rc.conf seems to > be in two stages, by renaming the interface: > > cloned_interfaces="vlan14" > ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" > ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0" Just use: ifconfig_vlan14="inet W.X.Y.Z netmask 255.255.255.0 vlan 14 vlandev fxp0" This is what ifconfig(8) manpage tells in the syntax section: the address should precede other parameters. -- Yar From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 10:58:53 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 B269316A41F; Wed, 28 Sep 2005 10:58:53 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1810543D48; Wed, 28 Sep 2005 10:58:52 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j8SAwcBS088309 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 28 Sep 2005 12:58:40 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j8SAvheG065522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Sep 2005 12:57:44 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j8SAvhgq061951; Wed, 28 Sep 2005 12:57:43 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j8SAvg5B061950; Wed, 28 Sep 2005 12:57:42 +0200 (CEST) (envelope-from ticso) Date: Wed, 28 Sep 2005 12:57:42 +0200 From: Bernd Walter To: Yar Tikhiy Message-ID: <20050928105742.GJ54923@cicely12.cicely.de> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> <20050925225432.GH552@cicely12.cicely.de> <20050928103241.GC86457@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050928103241.GC86457@comp.chem.msu.su> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: Bernd Walter , freebsd-current@freebsd.org, Gavin Atkinson , freebsd-net@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 10:58:53 -0000 On Wed, Sep 28, 2005 at 02:32:41PM +0400, Yar Tikhiy wrote: > On Mon, Sep 26, 2005 at 12:54:33AM +0200, Bernd Walter wrote: > > On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote: > > > > > > Also, you can't set both the vlan and IP address information: > > > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0 > > > ifconfig: inet: bad value > > > > > > As a result of this, the only way to create vlans from rc.conf seems to > > > be in two stages, by renaming the interface: > > > > > > cloned_interfaces="vlan14" > > > ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" > > > ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0" > > > > The follwing always worked for me, no need to rename: > > cloned_interfaces="vlan1" > > ifconfig_vlan1="inet 1.2.3.4/29 vlan 1 vlandev fxp0" > > Indeed, the address assignment arguments should precede other > parameters to ifconfig(8). I think this is evident from the syntax > shown on the manpage. > > > What doesn't work is this: > > ifconfig_vlan1_alias0="1.2.3.4/32" > > I had to configure them by a selfdone script. > > Adding aliases on vlanX this way has been working for me. Could > you check if prepending the "inet" keyword before the address changes > anything? I prefer to specify address family explicitly in my > rc.conf files. E.g.: > > ifconfig_vlan1_alias0="inet 1.2.3.4/32" Sorry, but the configuration is used on a production machine that I can't do tests on. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 11:04:20 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 D0AC916A41F; Wed, 28 Sep 2005 11:04:20 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id E17A743D53; Wed, 28 Sep 2005 11:04:16 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j8SB4EJD092570; Wed, 28 Sep 2005 15:04:14 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j8SB4DAr092567; Wed, 28 Sep 2005 15:04:13 +0400 (MSD) (envelope-from yar) Date: Wed, 28 Sep 2005 15:04:13 +0400 From: Yar Tikhiy To: Brooks Davis Message-ID: <20050928110413.GE86457@comp.chem.msu.su> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050925213741.GG15981@odin.ac.hmc.edu> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 11:04:21 -0000 On Sun, Sep 25, 2005 at 02:37:41PM -0700, Brooks Davis wrote: > On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote: > > > > As our ifconfig(8) is growing more options for special interface > > types, inconsistencies sneak into their syntax. In particular, > > -vlandev takes a useless argument (vlan(4) cannot attach to more > > than one parent anyway) while, e.g., -carpdev doesn't need one. > > Personally, I like the latter since having to type unneeded words > > on the command line annoys me. Do you think that making -vlandev > > need no arguments in CURRENT would break many existing things? > > I agree the argument is useless. Unfortunatly, it's going to be hard to > deprecate the old syntax so we may need to keep it around. Alas, there doesn't seem to exist an easy way to support both syntaxes in the ifconfig(8) parameter parser. Perhaps we can survive the pain of syntax change in CURRENT only, with a heads-up message sent, release notes updated, etc? I wonder if many people use "ifconfig -vlandev XXX" in automated tools. -- Yar From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 11:05:34 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 E65A516A420; Wed, 28 Sep 2005 11:05:34 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B7FF43D5E; Wed, 28 Sep 2005 11:05:31 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j8SB5Qi9092592; Wed, 28 Sep 2005 15:05:26 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j8SB5PZ2092591; Wed, 28 Sep 2005 15:05:25 +0400 (MSD) (envelope-from yar) Date: Wed, 28 Sep 2005 15:05:25 +0400 From: Yar Tikhiy To: Bernd Walter Message-ID: <20050928110525.GF86457@comp.chem.msu.su> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> <20050925225432.GH552@cicely12.cicely.de> <20050928103241.GC86457@comp.chem.msu.su> <20050928105742.GJ54923@cicely12.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050928105742.GJ54923@cicely12.cicely.de> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, Gavin Atkinson Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 11:05:35 -0000 On Wed, Sep 28, 2005 at 12:57:42PM +0200, Bernd Walter wrote: > On Wed, Sep 28, 2005 at 02:32:41PM +0400, Yar Tikhiy wrote: > > On Mon, Sep 26, 2005 at 12:54:33AM +0200, Bernd Walter wrote: > > > On Sun, Sep 25, 2005 at 11:08:25PM +0100, Gavin Atkinson wrote: > > > > > > > > Also, you can't set both the vlan and IP address information: > > > > leeloo# ifconfig vlan14 vlan 14 vlandev fxp0 inet W.X.Y.Z netmask 255.255.255.0 > > > > ifconfig: inet: bad value > > > > > > > > As a result of this, the only way to create vlans from rc.conf seems to > > > > be in two stages, by renaming the interface: > > > > > > > > cloned_interfaces="vlan14" > > > > ifconfig_vlan14="vlan 14 vlandev fxp0 name somename" > > > > ifconfig_somename="inet W.X.Y.Z netmask 255.255.255.0" > > > > > > The follwing always worked for me, no need to rename: > > > cloned_interfaces="vlan1" > > > ifconfig_vlan1="inet 1.2.3.4/29 vlan 1 vlandev fxp0" > > > > Indeed, the address assignment arguments should precede other > > parameters to ifconfig(8). I think this is evident from the syntax > > shown on the manpage. > > > > > What doesn't work is this: > > > ifconfig_vlan1_alias0="1.2.3.4/32" > > > I had to configure them by a selfdone script. > > > > Adding aliases on vlanX this way has been working for me. Could > > you check if prepending the "inet" keyword before the address changes > > anything? I prefer to specify address family explicitly in my > > rc.conf files. E.g.: > > > > ifconfig_vlan1_alias0="inet 1.2.3.4/32" > > Sorry, but the configuration is used on a production machine that > I can't do tests on. Just tested without "inet", and it still worked for me. -- Yar From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 11:14:53 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 ECC5D16A41F; Wed, 28 Sep 2005 11:14:53 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id B283143D4C; Wed, 28 Sep 2005 11:14:52 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0) by srv1.cosmo-project.de (8.12.10/8.12.10) with ESMTP id j8SBEcBS088849 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 28 Sep 2005 13:14:41 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [10.1.1.14]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j8SBEJeG065623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Sep 2005 13:14:20 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.13.4/8.13.3) with ESMTP id j8SBEJ9e062029; Wed, 28 Sep 2005 13:14:19 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.13.4/8.13.3/Submit) id j8SBEJFW062028; Wed, 28 Sep 2005 13:14:19 +0200 (CEST) (envelope-from ticso) Date: Wed, 28 Sep 2005 13:14:18 +0200 From: Bernd Walter To: Yar Tikhiy Message-ID: <20050928111418.GL54923@cicely12.cicely.de> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <1127686105.23447.35.camel@buffy.york.ac.uk> <20050925225432.GH552@cicely12.cicely.de> <20050928103241.GC86457@comp.chem.msu.su> <20050928105742.GJ54923@cicely12.cicely.de> <20050928110525.GF86457@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050928110525.GF86457@comp.chem.msu.su> X-Operating-System: FreeBSD cicely12.cicely.de 5.4-STABLE alpha User-Agent: Mutt/1.5.9i X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Report: * -3.3 ALL_TRUSTED Did not pass through any untrusted hosts * -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0000] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on cicely12.cicely.de Cc: Bernd Walter , freebsd-current@freebsd.org, Gavin Atkinson , freebsd-net@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 11:14:54 -0000 On Wed, Sep 28, 2005 at 03:05:25PM +0400, Yar Tikhiy wrote: > On Wed, Sep 28, 2005 at 12:57:42PM +0200, Bernd Walter wrote: > > On Wed, Sep 28, 2005 at 02:32:41PM +0400, Yar Tikhiy wrote: > > > On Mon, Sep 26, 2005 at 12:54:33AM +0200, Bernd Walter wrote: > > > > > > > What doesn't work is this: > > > > ifconfig_vlan1_alias0="1.2.3.4/32" > > > > I had to configure them by a selfdone script. > > > > > > Adding aliases on vlanX this way has been working for me. Could > > > you check if prepending the "inet" keyword before the address changes > > > anything? I prefer to specify address family explicitly in my > > > rc.conf files. E.g.: > > > > > > ifconfig_vlan1_alias0="inet 1.2.3.4/32" > > > > Sorry, but the configuration is used on a production machine that > > I can't do tests on. > > Just tested without "inet", and it still worked for me. Damn - I have a typo in the variable name. That explains everything... -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 15:13:23 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 04C1E16A41F for ; Wed, 28 Sep 2005 15:13:23 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B18F143D48 for ; Wed, 28 Sep 2005 15:13:22 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [70.30.70.180]) by elvis.mu.org (Postfix) with ESMTP id 683801A3C19; Wed, 28 Sep 2005 08:13:22 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 8EC2F521D5; Wed, 28 Sep 2005 11:13:20 -0400 (EDT) Date: Wed, 28 Sep 2005 11:13:20 -0400 From: Kris Kennaway To: SUZUKI Shinsuke Message-ID: <20050928151319.GA27347@xor.obsecurity.org> References: <20050927222634.GA46375@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: net@FreeBSD.org, kris@obsecurity.org Subject: Re: ipv6 panic in 6.0 ([kris@FreeBSD.org: kern/85780: 'panic: bogus refcnt 0' in routing/ipv6]) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 15:13:23 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 28, 2005 at 12:06:18PM +0900, SUZUKI Shinsuke wrote: > Hello kris, >=20 > >>>>> On Tue, 27 Sep 2005 18:26:34 -0400 > >>>>> kris@obsecurity.org(Kris Kennaway) said: >=20 > > Can someone please look into this ipv6 panic? It is now my #1 panic > > on 6.0 (every few days, and I hardly make any use of ipv6 except for > > light nfs and tcp traffic), so it would be good to get it fixed before > > the release. >=20 > Let me confirm one thing. > Did you also see a message "panic: bogus refcnt 0", in your panic? Yes, that's the panic string. > As far as I investigated, only IF_CLONE_REMREF_LOCKED() can display > this message. But it's called only in > if_clone_create/detach/destory(), and none of them seems to be called > according to the description in the PR. (rtexpunge() in route.c also > has this message, but it is commented out by "if 0", so it is not the > cause of this message) I have a number of (sparc64) cores for this panic if you'd like to see them. Kris --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDOrMPWry0BWjoQKURAi56AKDxgstbaXAPZ08l+1zihv1k73QjdQCeO2tk 6wPd/vC6wPc0N4Ne5/eJOiY= =MJa0 -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q-- From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 15:15:03 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 10C2116A41F; Wed, 28 Sep 2005 15:15:03 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4C6043D48; Wed, 28 Sep 2005 15:15:02 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (CPE0050040655c8-CM00111ae02aac.cpe.net.cable.rogers.com [70.30.70.180]) by elvis.mu.org (Postfix) with ESMTP id 6B9971A3C1A; Wed, 28 Sep 2005 08:15:02 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id EAF42516FB; Wed, 28 Sep 2005 11:15:00 -0400 (EDT) Date: Wed, 28 Sep 2005 11:15:00 -0400 From: Kris Kennaway To: Marc Olzheim Message-ID: <20050928151500.GB27347@xor.obsecurity.org> References: <20050908044336.GA28709@xor.obsecurity.org> <20050908090412.GA52425@stack.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="l76fUT7nc3MelDdI" Content-Disposition: inline In-Reply-To: <20050908090412.GA52425@stack.nl> User-Agent: Mutt/1.4.2.1i Cc: net@FreeBSD.org, rwatson@FreeBSD.org, Kris Kennaway Subject: Re: panic: receive: m == 0 so->so_rcv.sb_cc == 4294967295 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 15:15:03 -0000 --l76fUT7nc3MelDdI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 08, 2005 at 11:04:12AM +0200, Marc Olzheim wrote: > On Thu, Sep 08, 2005 at 12:43:36AM -0400, Kris Kennaway wrote: > > db> wh > > Tracing pid 23098 tid 100263 td 0xc92e4af0 > > kdb_enter(c07060af,0,c070c9b3,f7d14bc8,c92e4af0) at kdb_enter+0x30 > > panic(c070c9b3,0,ffffffff,3f5,c0709939) at panic+0x13e > > soreceive(c9be5b20,0,f7d14cb4,0,0,f7d14c30,4000) at soreceive+0x1cd > > fifo_read_f(c8dc17e0,f7d14cb4,c5c88000,0,c92e4af0) at fifo_read_f+0x70 > > dofileread(c92e4af0,3,c8dc17e0,f7d14cb4,ffffffff) at dofileread+0x96 > > kern_readv(c92e4af0,3,f7d14cb4,bfbfdb87,1) at kern_readv+0x61 > > read(c92e4af0,f7d14d04,c,422,3) at read+0x4f > > syscall(3b,3b,3b,bfbfdbc0,809b440) at syscall+0x295 > > Xint0x80_syscall() at Xint0x80_syscall+0x1f > > --- syscall (3, FreeBSD ELF32, read), eip =3D 0x807d183, esp =3D 0xbfbf= db6c, ebp =3D 0xbfbfdb88 --- > > db> >=20 > What kind ot kern_readv() is that ? Prototype of mine is: >=20 > int kern_readv(struct thread *td, int fd, struct uio *auio); >=20 > Or does the debugger garble something ? Late followup, but the debugger has to guess at how many arguments are in use by the function, so it sometimes displays too many. Kris --l76fUT7nc3MelDdI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDOrN0Wry0BWjoQKURArPGAJ0SnKouIMNvaG6dno8hLyWcaYG8DwCfQyDO 5fEgAoNE2iumICuwMHdGKtc= =bTSt -----END PGP SIGNATURE----- --l76fUT7nc3MelDdI-- From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 15:44:43 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 B4EE316A41F for ; Wed, 28 Sep 2005 15:44:43 +0000 (GMT) (envelope-from samspeedu@mail.ru) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5307743D49 for ; Wed, 28 Sep 2005 15:44:41 +0000 (GMT) (envelope-from samspeedu@mail.ru) Received: from [80.82.44.194] (port=2192 helo=192.168.168.7) by mx1.mail.ru with esmtp id 1EKe6e-000J0Y-00 for freebsd-net@freebsd.org; Wed, 28 Sep 2005 19:44:28 +0400 Date: Wed, 28 Sep 2005 19:43:26 +0400 From: Andrey Smagin X-Mailer: The Bat! (v1.62r) Organization: DiP X-Priority: 3 (Normal) Message-ID: <2262110.20050928194326@mail.ru> To: freebsd-net@freebsd.org In-Reply-To: <20050928152112.GC9994@sandvine.com> References: <20050926195807.GD95971@sandvine.com> <17208.30606.117170.36398@khavrinen.csail.mit.edu> <20050927001650.GA9994@sandvine.com> <20050927180021.GB9994@sandvine.com> <433A2882.4030003@freebsd.org> <433A2D6E.7020205@freebsd.org> <20050928152112.GC9994@sandvine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: How connect 2 PC with ath in hostap mode ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: SAMU List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 15:44:43 -0000 Hi All. Now bridge between net segments work in adhoc mode, but it very slow ~40KB/s. If set one in client another in hostap then speed 2.5MB/s. Devices is D-Link DWL-G520, system FreeBSD 7.0-CURRENT (week ago). If both devices in hostap mode, then no packets transmitted. -- Best regards, Andrey mailto:samspeedu@mail.ru From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 15:51:47 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 2E5DA16A458 for ; Wed, 28 Sep 2005 15:51:47 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 296A543D5F for ; Wed, 28 Sep 2005 15:51:43 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 82104 invoked from network); 28 Sep 2005 15:24:24 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 28 Sep 2005 15:24:24 -0000 Message-ID: <433ABC12.948DA54D@freebsd.org> Date: Wed, 28 Sep 2005 17:51:46 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Kris Kennaway References: <20050927222634.GA46375@xor.obsecurity.org> <20050928151319.GA27347@xor.obsecurity.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: SUZUKI Shinsuke , net@FreeBSD.org Subject: Re: ipv6 panic in 6.0 ([kris@FreeBSD.org: kern/85780: 'panic:bogus refcnt 0' in routing/ipv6]) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 15:51:47 -0000 Kris Kennaway wrote: > > On Wed, Sep 28, 2005 at 12:06:18PM +0900, SUZUKI Shinsuke wrote: > > Hello kris, > > > > >>>>> On Tue, 27 Sep 2005 18:26:34 -0400 > > >>>>> kris@obsecurity.org(Kris Kennaway) said: > > > > > Can someone please look into this ipv6 panic? It is now my #1 panic > > > on 6.0 (every few days, and I hardly make any use of ipv6 except for > > > light nfs and tcp traffic), so it would be good to get it fixed before > > > the release. > > > > Let me confirm one thing. > > Did you also see a message "panic: bogus refcnt 0", in your panic? > > Yes, that's the panic string. > > > As far as I investigated, only IF_CLONE_REMREF_LOCKED() can display > > this message. But it's called only in > > if_clone_create/detach/destory(), and none of them seems to be called > > according to the description in the PR. (rtexpunge() in route.c also > > has this message, but it is commented out by "if 0", so it is not the > > cause of this message) > > I have a number of (sparc64) cores for this panic if you'd like to see > them. This particular panic string is used by RT_REMREF() via RTFREE_LOCKED() too. It could be triggered anywhere in the routing/network code. -- Andre From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 17:53:32 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 C9AE016A42A for ; Wed, 28 Sep 2005 17:53:32 +0000 (GMT) (envelope-from howells@kde.org) Received: from mail.devrandom.org.uk (host-84-9-223-82.bulldogdsl.com [84.9.223.82]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A59343D4C for ; Wed, 28 Sep 2005 17:53:32 +0000 (GMT) (envelope-from howells@kde.org) Received: from localhost (localhost [127.0.0.1]) by mail.devrandom.org.uk (Postfix) with ESMTP id 0EFB6FD021 for ; Wed, 28 Sep 2005 18:53:27 +0100 (BST) Received: from mail.devrandom.org.uk ([127.0.0.1]) by localhost (mail.devrandom.org.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03401-10 for ; Wed, 28 Sep 2005 18:53:21 +0100 (BST) Received: from [192.168.1.167] (unknown [192.168.1.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.devrandom.org.uk (Postfix) with ESMTP id 9F802FD023 for ; Wed, 28 Sep 2005 18:53:21 +0100 (BST) From: Chris Howells Organization: K Desktop Environment To: freebsd-net@freebsd.org Date: Wed, 28 Sep 2005 18:52:48 +0100 User-Agent: KMail/1.8.50 References: <20050926142907.GI91328@cell.sick.ru> In-Reply-To: <20050926142907.GI91328@cell.sick.ru> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1366180.WD7FVl4mH8"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200509281852.53335.howells@kde.org> X-Virus-Scanned: amavisd-new at devrandom.org.uk Subject: Re: em(4) receive part wedging randomly at moderate load X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 28 Sep 2005 17:53:33 -0000 --nextPart1366180.WD7FVl4mH8 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 26 September 2005 15:29, Gleb Smirnoff wrote: > during last month we are experiencing a nasty problem with em(4) > driver. Several times a day the receive path of the driver wedges > for a minute or two. During wedge the transmit part works with > no problems. The latter fact makes this problem very nasty, because > the problematic router can't be backed up with help of CARP. This sounds very much like the problem I've been having. It affects two=20 machines, one runs 5.4-STABLE and one runs 4.11-STABLE. Both are Duron 1800= s=20 based on the Asus A7V8X motherboard. The card in the 4.11 machine is: em0: port=20 0xb000-0xb03f mem 0xf4800000-0xf481ffff,0xf5000000-0xf501ffff irq 11 at=20 device 13.0 on pci0 em0@pci0:13:0: class=3D0x020000 card=3D0x002e8086 chip=3D0x100e8086 rev=3D= 0x02=20 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '82540EM Gigabit Ethernet Controller' class =3D network subclass =3D ethernet The card in the 5.4 machine is: em0: port=20 0x6400-0x643f mem 0xf0000000-0xf001ffff irq 3 at device 19.0 on pci0 em0@pci0:19:0: class=3D0x020000 card=3D0x10028086 chip=3D0x10268086 rev=3D= 0x04=20 hdr=3D0x00 vendor =3D 'Intel Corporation' device =3D '82545GM Gigabit Ethernet Controller' class =3D network subclass =3D ethernet > The box is serving 8 - 15 kpps, 70 - 100 MBps. It runs stateful pf(4) > firewall, with 50k - 80k states. The IP fastforwarding is enabled. The > average state insert/removal ratio is 300 states per second, however > sometimes several thousands of states can be removed in one pass. The > state removal locks the network code for quite a long time, so I guess > that wedge happens exactly when a lot of states are removed. The NIC > interrupts aren't serviced for some time and it wedges. Happens for me with no pf and serving a single client with samba and much=20 lower load -- only a few tens of KB a second. > The NIC is plugged in Cisco Catalyst 6509 gigabit ethernet port. No > errors are counted on switch port. Mine is a simple unmanaged SMC 5 port GigE switch. > To workaround the problem, I have made the following patch: Interesting, I'll give that a go.... > I am asking developers, who work in Intel, to pay attention to this > problem. Have you tried the em driver directly from intel? It can be found on the In= tel=20 web site. A few people on freebsd-stable are claiming that it works=20 perfectly. I have noticed that having something like this in sysctl.conf helps to redu= ce=20 the frequency of it happening: kern.ipc.somaxconn=3D1024 net.inet.udp.recvspace=3D65536 net.inet.tcp.sendspace=3D65536 net.inet.tcp.recvspace=3D65536 Though sadly it still does happen... =2D-=20 Cheers, Chris Howells -- chris@chrishowells.co.uk, howells@kde.org Web: http://www.chrishowells.co.uk, PGP ID: 0x33795A2C KDE/Qt/C++/PHP Developer: http://www.kde.org --nextPart1366180.WD7FVl4mH8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQBDOth1F8Iu1zN5WiwRAoB3AJ9Y8ePvHQpIZka0AgFjdQAgvqnTyACgnNp2 jbXbStj9oAaPRQjXM2ElfIs= =gWgY -----END PGP SIGNATURE----- --nextPart1366180.WD7FVl4mH8-- From owner-freebsd-net@FreeBSD.ORG Wed Sep 28 18:55:34 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 92B9116A41F for ; Wed, 28 Sep 2005 18:55:34 +0000 (GMT) (envelope-from daniel@dgnetwork.com.br) Received: from zeus.yan.com.br (zeus.yan.com.br [200.202.253.10]) by mx1.FreeBSD.org (Postfix) with SMTP id 54E0843D49 for ; Wed, 28 Sep 2005 18:55:32 +0000 (GMT) (envelope-from daniel@dgnetwork.com.br) Received: (qmail 26712 invoked by uid 1023); 28 Sep 2005 18:55:22 -0000 Received: from daniel@dgnetwork.com.br by zeus by uid 1023 with qmail-scanner-1.22 (uvscan: v4.1.60/v4366. fsecure: 4.11/3190/2003-09-23/2002-12-17. 2003-09-22/. Clear:RC:1(200.202.253.197):. Processed in 0.570396 secs); 28 Sep 2005 18:55:22 -0000 Received: from unknown (HELO ?192.168.1.1?) (daniel@dgnetwork.com.br@200.202.253.197) by zeus.yan.com.br with SMTP; 28 Sep 2005 18:55:22 -0000 Message-ID: <433AE71D.8080005@dgnetwork.com.br> Date: Wed, 28 Sep 2005 15:55:25 -0300 From: =?ISO-8859-1?Q?Daniel_Dias_Gon=E7alves?= Organization: DGNET Network Solutions User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: pt-br, pt MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: FreeBSD 5.4 AMD64 & MPD X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: daniel@dgnetwork.com.br List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2005 18:55:34 -0000 I installed MPD and it doesn't start, NETGRAPH is enable on kernel. # mpd Multi-link PPP for FreeBSD, by Archie L. Cobbs. Based on iij-ppp, by Toshiharu OHNO. mpd: pid 34373563800, version (null) mpd: caught fatal signal @ mpd: fatal error, exiting mpd: process 6126 terminated # Last lines in ktrace: 7108 mpd RET read 721/0x2d1 7108 mpd CALL close(0x3) 7108 mpd RET close 0 7108 mpd CALL socket(0x1,0x2,0) 7108 mpd RET socket 3 7108 mpd CALL fcntl(0x3,0x2,0x1) 7108 mpd RET fcntl 0 7108 mpd CALL connect(0x3,0x7fffffffda70,0x6a) 7108 mpd NAMI "/var/run/logpriv" 7108 mpd RET connect 0 7108 mpd CALL sendto(0x3,0x7fffffffdfd0,0x68,0,0,0) 7108 mpd GIO fd 3 wrote 104 bytes "<30>Sep 27 15:27:54 mpd: mpd: pid 7108, version 3.18 (root@host 15:16 27-Sep-2005)" 7108 mpd RET sendto 104/0x68 7108 mpd PSIG SIGSEGV SIG_DFL 7108 mpd NAMI "mpd.core" # Ifconfig: ng0: flags=8890 mtu 1500 Any idea ? -- Daniel Dias Gonçalves DGNET Network Solutions daniel@dgnetwork.com.br (37) 99824809 From owner-freebsd-net@FreeBSD.ORG Thu Sep 29 08:30:08 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 6648F16A41F; Thu, 29 Sep 2005 08:30:08 +0000 (GMT) (envelope-from raglon@packetfront.com) Received: from mail.packetfront.com (mail.packetfront.com [212.247.6.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE98343D48; Thu, 29 Sep 2005 08:30:07 +0000 (GMT) (envelope-from raglon@packetfront.com) Received: from localhost (localhost [127.0.0.1]) by mail.packetfront.com (Postfix) with ESMTP id 19DDEA3F7F; Thu, 29 Sep 2005 10:30:05 +0200 (CEST) Received: from mail.packetfront.com ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 07304-04; Thu, 29 Sep 2005 10:30:04 +0200 (CEST) Received: from [192.168.1.159] (unknown [192.168.1.159]) by mail.packetfront.com (Postfix) with ESMTP id D3EBCA3F7B; Thu, 29 Sep 2005 10:30:04 +0200 (CEST) Message-ID: <433BA5B4.7020506@packetfront.com> Date: Thu, 29 Sep 2005 10:28:36 +0200 From: Ragnar Lonn User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yar Tikhiy References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <20050928110413.GE86457@comp.chem.msu.su> In-Reply-To: <20050928110413.GE86457@comp.chem.msu.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at packetfront.com Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2005 08:30:08 -0000 Yar Tikhiy wrote: >On Sun, Sep 25, 2005 at 02:37:41PM -0700, Brooks Davis wrote: > > >>On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote: >> >> >>>As our ifconfig(8) is growing more options for special interface >>>types, inconsistencies sneak into their syntax. In particular, >>>-vlandev takes a useless argument (vlan(4) cannot attach to more >>>than one parent anyway) while, e.g., -carpdev doesn't need one. >>>Personally, I like the latter since having to type unneeded words >>>on the command line annoys me. Do you think that making -vlandev >>>need no arguments in CURRENT would break many existing things? >>> >>> >>I agree the argument is useless. Unfortunatly, it's going to be hard to >>deprecate the old syntax so we may need to keep it around. >> >> > >Alas, there doesn't seem to exist an easy way to support both >syntaxes in the ifconfig(8) parameter parser. Perhaps we can > > You could always introduce a command-line switch that enabled the new syntax ;) /Ragnar From owner-freebsd-net@FreeBSD.ORG Thu Sep 29 11:42:16 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 5AAB816A41F for ; Thu, 29 Sep 2005 11:42:16 +0000 (GMT) (envelope-from dennis.binder@gmx.de) Received: from mailgw12.fraunhofer.de (mailgw12.fraunhofer.de [153.96.1.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB9E543D48 for ; Thu, 29 Sep 2005 11:42:15 +0000 (GMT) (envelope-from dennis.binder@gmx.de) Received: from mailgw12.fraunhofer.de (localhost [127.0.0.1]) by mailgw12.fraunhofer.de (8.13.4+/8.13.4) with ESMTP id j8TBgDgx022755 for ; Thu, 29 Sep 2005 13:42:13 +0200 (CEST) Received: from kso.ipm.fraunhofer.de (mail-gw.ipm.fraunhofer.de [153.96.205.2]) by mailgw12.fraunhofer.de (8.13.4+/8.13.4) with ESMTP id j8TBgABh022743 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Sep 2005 13:42:13 +0200 (CEST) X-Authentication-Warning: mailgw12.fraunhofer.de: Host mail-gw.ipm.fraunhofer.de [153.96.205.2] claimed to be kso.ipm.fraunhofer.de Received: from ksi.ipm.fraunhofer.de (ksi.ipm.fraunhofer.de [153.96.204.2]) by kso.ipm.fraunhofer.de (8.13.3+/8.13.3) with ESMTP id j8TBgAbW012886 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Sep 2005 13:42:10 +0200 (CEST) Received: from ksi.ipm.fraunhofer.de (localhost [127.0.0.1]) by ksi.ipm.fraunhofer.de (8.13.3+/8.13.3) with ESMTP id j8TBgASt021772 for ; Thu, 29 Sep 2005 13:42:10 +0200 (CEST) Received: from gmx.de (nbbinder.ipm.fraunhofer.de [153.96.204.135]) by ksi.ipm.fraunhofer.de (8.13.3+/8.13.3) with ESMTP id j8TBg97a021769 for ; Thu, 29 Sep 2005 13:42:09 +0200 (CEST) X-Authentication-Warning: ksi.ipm.fraunhofer.de: Host nbbinder.ipm.fraunhofer.de [153.96.204.135] claimed to be gmx.de Message-ID: <433BD311.1030501@gmx.de> Date: Thu, 29 Sep 2005 13:42:09 +0200 From: dennis binder User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6) Gecko/20040113 X-Accept-Language: de-at, de, en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Fraunhofer-Email-Policy: accepted Subject: WG511T problem using dhcp X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2005 11:42:16 -0000 hello, i'm trying to get a wlan card WG511T from netgear to work and connect to the internet via an accesspoint. The accesspoint has an SSID= "WLAN" and provides DHCP. dmesg bings up the following: ath0: mem 0x88000000-0x8800ffff irq 9 at device 0.0 on cardbus0 ath0: mac 5.9 phy 4.3 5ghz radio 4.6 ath0: Ethernet address: 00:0f:b5:67:1b:4f ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps my /etc/rc.conf looks like this: removable_interfaces="ath0 ep0" ifconfig_ath0="NO" my /etc/start_if.ath0 is empty. After plugging the card "ifconfig ath0" prints this: ath0: flags=8802 mtu 1500 ether 00:0f:b5:67:1b:4f media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel -1 authmode OPEN powersavemode OFF powersavesleep 100 rtsthreshold 2312 protmode CTS wepmode OFF weptxkey 1 after this I want to manually connect to the internet. I try # ifconfig ath0 ssid WLAN # ifconfig ath0 ath0: flags=8843 mtu 1500 inet6 fe80::20f:b5ff:fe67:1b4f%ath0 prefixlen 64 scopeid 0x4 inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 ether 00:0f:b5:67:1b:4f media: IEEE 802.11 Wireless Ethernet autoselect (DS/1Mbps) status: no carrier ssid WLAN 1:WLAN channel -1 authmode OPEN powersavemode OFF powersavesleep 100 rtsthreshold 2312 protmode CTS wepmode OFF weptxkey 1 After running "dhclient ath0" the netgear-card finds the accesspoint ( both leds blinking simultanously). "ifconfig ath0" prints "status: active" but the inet-address remains 0.0.0.0. How can I assign the card a valid ip-address via dhcp ? Or what is wrong in my setup ? My second interface fxp0 has no problems getting valid ip-address via dhcp. Any hints are very welcome. Dennis Binder From owner-freebsd-net@FreeBSD.ORG Thu Sep 29 12:47:44 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 628A716A424; Thu, 29 Sep 2005 12:47:44 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id A227843D5A; Thu, 29 Sep 2005 12:47:43 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j8TCle6H074603; Thu, 29 Sep 2005 16:47:40 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j8TClbcB074597; Thu, 29 Sep 2005 16:47:37 +0400 (MSD) (envelope-from yar) Date: Thu, 29 Sep 2005 16:47:37 +0400 From: Yar Tikhiy To: Ragnar Lonn Message-ID: <20050929124736.GB73604@comp.chem.msu.su> References: <20050922104104.GA13539@comp.chem.msu.su> <20050925213741.GG15981@odin.ac.hmc.edu> <20050928110413.GE86457@comp.chem.msu.su> <433BA5B4.7020506@packetfront.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <433BA5B4.7020506@packetfront.com> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org Subject: Re: "ifconfig -vlandev" syntax X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2005 12:47:44 -0000 On Thu, Sep 29, 2005 at 10:28:36AM +0200, Ragnar Lonn wrote: > Yar Tikhiy wrote: > >On Sun, Sep 25, 2005 at 02:37:41PM -0700, Brooks Davis wrote: > >>On Thu, Sep 22, 2005 at 02:41:05PM +0400, Yar Tikhiy wrote: > >> > >>>As our ifconfig(8) is growing more options for special interface > >>>types, inconsistencies sneak into their syntax. In particular, > >>>-vlandev takes a useless argument (vlan(4) cannot attach to more > >>>than one parent anyway) while, e.g., -carpdev doesn't need one. > >>>Personally, I like the latter since having to type unneeded words > >>>on the command line annoys me. Do you think that making -vlandev > >>>need no arguments in CURRENT would break many existing things? > >> > >>I agree the argument is useless. Unfortunatly, it's going to be hard to > >>deprecate the old syntax so we may need to keep it around. > > > >Alas, there doesn't seem to exist an easy way to support both > >syntaxes in the ifconfig(8) parameter parser. Perhaps we can > > You could always introduce a command-line switch that enabled the new > syntax ;) What I'd like to do is to get rid of bogus command-line arguments so that I, as well as the others, could type only what is actually needed ;-) -- Yar From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 03:53:11 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 3264816A41F for ; Fri, 30 Sep 2005 03:53:11 +0000 (GMT) (envelope-from det_re@yahoo.com) Received: from web60118.mail.yahoo.com (web60118.mail.yahoo.com [209.73.178.86]) by mx1.FreeBSD.org (Postfix) with SMTP id B080F43D49 for ; Fri, 30 Sep 2005 03:53:10 +0000 (GMT) (envelope-from det_re@yahoo.com) Received: (qmail 20199 invoked by uid 60001); 30 Sep 2005 03:53:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=FT6bFoFIIf+Li+XUH2vFZZ+2XRsTrZSI+gyIqsinIlGJRIBmYgnnTGsT4D/voNUBLEA4hdwStwUJLDTA+HKv2vt42rvehw28Q/OY7tvCyUJgBZC73sTLxXB8V4ImOSbnVB/GGNxQkAc7qgwqiIm4KqnhEW4FOxok9ZtKPEoMQEA= ; Message-ID: <20050930035306.20197.qmail@web60118.mail.yahoo.com> Received: from [60.48.162.41] by web60118.mail.yahoo.com via HTTP; Thu, 29 Sep 2005 20:53:06 PDT Date: Thu, 29 Sep 2005 20:53:06 -0700 (PDT) From: det_re To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: tcpdump based packet generator X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 03:53:11 -0000 has anyone seen or implemented packet generator capable of reading tcpdump trace file and resend the packets back into the wire through bpf in freebsd box? __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 03:54:21 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 0E99616A41F for ; Fri, 30 Sep 2005 03:54:21 +0000 (GMT) (envelope-from chema@ICSI.Berkeley.EDU) Received: from fruitcake.ICSI.Berkeley.EDU (fruitcake.ICSI.Berkeley.EDU [192.150.186.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id B76E643D48 for ; Fri, 30 Sep 2005 03:54:20 +0000 (GMT) (envelope-from chema@ICSI.Berkeley.EDU) Received: from peach.ICSI.Berkeley.EDU (peach [192.150.186.66]) by fruitcake.ICSI.Berkeley.EDU (8.12.10/8.12.9) with ESMTP id j8U3sK6k010793; Thu, 29 Sep 2005 20:54:20 -0700 (PDT) Received: (from chema@localhost) by peach.ICSI.Berkeley.EDU (8.12.11/8.12.10/Submit) id j8U3sKeb022734; Thu, 29 Sep 2005 20:54:20 -0700 Date: Thu, 29 Sep 2005 20:54:20 -0700 From: "Jose M. Gonzalez" To: det_re Message-ID: <20050930035419.GA22727@cs.berkeley.edu> Mail-Followup-To: det_re , freebsd-net@freebsd.org References: <20050930035306.20197.qmail@web60118.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050930035306.20197.qmail@web60118.mail.yahoo.com> User-Agent: Mutt/1.4.1i Cc: freebsd-net@freebsd.org Subject: Re: tcpdump based packet generator X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 03:54:21 -0000 det_re wrote: > has anyone seen or implemented packet generator > capable of reading tcpdump trace file and resend the > packets back into the wire through bpf in freebsd box? Try tcpreplay. -Chema From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 04:17:49 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 9CCBA16A41F for ; Fri, 30 Sep 2005 04:17:49 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: from web35706.mail.mud.yahoo.com (web35706.mail.mud.yahoo.com [66.163.179.160]) by mx1.FreeBSD.org (Postfix) with SMTP id 2B58C43D48 for ; Fri, 30 Sep 2005 04:17:49 +0000 (GMT) (envelope-from kamal_ckk@yahoo.com) Received: (qmail 28109 invoked by uid 60001); 30 Sep 2005 04:17:48 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=We+Tq6YU9gzRXi9e8GsZlgizE6V9IlmMeTCfvmjNKvHWryC0F5ZgwnjZqWcixng53qzB8ROjSYedAGRORjrcNlqEyZ/v646cTjt/PdMPzWIAvocfelYD68lb35JhA9iPR2fTOEAAsv83wGSeOX3/r3Mi7FqacO4wPEfJedhjHk8= ; Message-ID: <20050930041748.28107.qmail@web35706.mail.mud.yahoo.com> Received: from [202.79.62.15] by web35706.mail.mud.yahoo.com via HTTP; Thu, 29 Sep 2005 21:17:48 PDT Date: Thu, 29 Sep 2005 21:17:48 -0700 (PDT) From: kamal kc To: det_re In-Reply-To: <20050930035306.20197.qmail@web60118.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-net@freebsd.org Subject: Re: tcpdump based packet generator X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 04:17:49 -0000 --- det_re wrote: > has anyone seen or implemented packet generator > capable of reading tcpdump trace file and resend the > packets back into the wire through bpf in freebsd > box? if you are talking about capturing packets by writing a program then you could use libpcap.a that provides an abstraction for the underlying bpf. man pcap would be a good help. sending custom packets can be done using raw sockets (SOCK_RAW). you can use IP_HDRINCL for including your custom ip header > > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to > "freebsd-net-unsubscribe@freebsd.org" > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 06:11:25 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 07B7016A420 for ; Fri, 30 Sep 2005 06:11:25 +0000 (GMT) (envelope-from samspeedu@mail.ru) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by mx1.FreeBSD.org (Postfix) with ESMTP id 96CF543D48 for ; Fri, 30 Sep 2005 06:11:24 +0000 (GMT) (envelope-from samspeedu@mail.ru) Received: from [80.82.44.194] (port=56045 helo=192.168.168.7) by mx3.mail.ru with esmtp id 1ELE78-000Oe7-00 for freebsd-net@freebsd.org; Fri, 30 Sep 2005 10:11:22 +0400 Date: Fri, 30 Sep 2005 10:10:19 +0400 From: Andrey Smagin X-Mailer: The Bat! (v1.62r) Organization: DiP X-Priority: 3 (Normal) Message-ID: <584642479.20050930101019@mail.ru> To: freebsd-net@freebsd.org In-Reply-To: <2262110.20050928194326@mail.ru> References: <20050926195807.GD95971@sandvine.com> <17208.30606.117170.36398@khavrinen.csail.mit.edu> <20050927001650.GA9994@sandvine.com> <20050927180021.GB9994@sandvine.com> <433A2882.4030003@freebsd.org> <433A2D6E.7020205@freebsd.org> <20050928152112.GC9994@sandvine.com> <2262110.20050928194326@mail.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: How connect 2 PC with ath in hostap mode ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: SAMU List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 06:11:25 -0000 Hi ALL, People please say it possible under FreeBSD ? Any body have sucess stories about it ? What manual I must read to do it ? :) -- Best regards, Andrey mailto:samspeedu@mail.ru From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 06:39:58 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 3983716A41F for ; Fri, 30 Sep 2005 06:39:58 +0000 (GMT) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B0BA43D4C for ; Fri, 30 Sep 2005 06:39:56 +0000 (GMT) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=ganbold.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.53 (FreeBSD)) id 1ELEZM-000F8K-NL for freebsd-net@freebsd.org; Fri, 30 Sep 2005 14:40:32 +0800 Message-Id: <6.2.1.2.2.20050930151357.03480eb0@202.179.0.80> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Fri, 30 Sep 2005 15:39:49 +0900 To: freebsd-net@freebsd.org From: Ganbold Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ipfw bridge + fwd questions X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 06:39:58 -0000 Hi, I have a question regarding ipfw fwd rule. I'm using FreeBSD 5.4-STABLE and running on it bridging firewall using ipfw. Now my question comes:) Can I use ipfw fwd rules against traffic coming to one of the bridged interfaces? I would like to forward some packets (which are destined to port 110) to some other router through third vr0 interface. This is because we have 2 upstream providers and one of the providers is filtering some ports and I would like to forward such packets to the other provider. In other words I would like to do something like: ipfw add fwd z.z.z.z ip from x.x.x.0/19 to any dst-port 25,110 Is it possible? Should z.z.z.z address be included in the routing table of the machine or it doesn't matter? I appreciate if somebody can give me some direction and advice. thanks in advance, Ganbold ####################################### sysctl variables I use: ----------------------------------------------- net.link.ether.bridge_cfg=xl0:0,xl1:0 net.link.ether.bridge_ipfw=1 net.link.ether.bridge.enable=1 net.inet.ip.fw.one_pass=0 ifconfig output: ----------------------------------------------- xl0: flags=8943 mtu 1500 options=9 ether 00:10:5a:5b:e5:e3 media: Ethernet 100baseTX status: active xl1: flags=8943 mtu 1500 options=9 ether 00:04:76:dc:7f:d1 media: Ethernet 100baseTX status: active vr0: flags=8843 mtu 1500 inet x.x.x.x netmask 0xffffffe0 broadcast x.x.x.x From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 06:49:24 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 1D19616A41F for ; Fri, 30 Sep 2005 06:49:24 +0000 (GMT) (envelope-from on@cs.ait.ac.th) Received: from mail.cs.ait.ac.th (mail.cs.ait.ac.th [192.41.170.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E799943D48 for ; Fri, 30 Sep 2005 06:49:21 +0000 (GMT) (envelope-from on@cs.ait.ac.th) Received: from banyan.cs.ait.ac.th (banyan.cs.ait.ac.th [192.41.170.5]) by mail.cs.ait.ac.th (8.12.11/8.12.11) with ESMTP id j8U6lTq7043694 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 13:47:29 +0700 (ICT) Received: (from on@localhost) by banyan.cs.ait.ac.th (8.13.1/8.12.11) id j8U6kM2W098514; Fri, 30 Sep 2005 13:46:22 +0700 (ICT) Date: Fri, 30 Sep 2005 13:46:22 +0700 (ICT) Message-Id: <200509300646.j8U6kM2W098514@banyan.cs.ait.ac.th> From: Olivier Nicole To: ganbold@micom.mng.net In-reply-to: <6.2.1.2.2.20050930151357.03480eb0@202.179.0.80> (message from Ganbold on Fri, 30 Sep 2005 15:39:49 +0900) References: <6.2.1.2.2.20050930151357.03480eb0@202.179.0.80> X-Virus-Scanned: on CSIM by amavisd-milter (http://www.amavis.org/) Cc: freebsd-net@freebsd.org Subject: Re: ipfw bridge + fwd questions X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 06:49:24 -0000 > Can I use ipfw fwd rules against traffic coming to one of the bridged > interfaces? I think that the manual says that forward is not working in case of bridge. In fact I tried and gave up. Now I got ipfiltyer to do some redirection on bridged interfaces. But the solution is not yet finalized (and VERY dirty). Olivier From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 07:35:28 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 033BB16A41F for ; Fri, 30 Sep 2005 07:35:28 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from mail.yazzy.org (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9478E43D4C for ; Fri, 30 Sep 2005 07:35:27 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from 217-13-2-82.dd.nextgentel.com ([217.13.2.82] helo=marcin) by mail.yazzy.org with esmtps (TLSv1:AES256-SHA:256) (YazzY.org) id 1ELFQ0-0005vT-A0; Fri, 30 Sep 2005 09:34:58 +0200 Date: Fri, 30 Sep 2005 09:35:21 +0200 From: Marcin Jessa To: Ganbold Message-Id: <20050930093521.5a17affd.lists@yazzy.org> In-Reply-To: <6.2.1.2.2.20050930151357.03480eb0@202.179.0.80> References: <6.2.1.2.2.20050930151357.03480eb0@202.179.0.80> Organization: YazzY.org X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) Cc: freebsd-net@freebsd.org Subject: Re: ipfw bridge + fwd questions X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 07:35:28 -0000 On Fri, 30 Sep 2005 15:39:49 +0900 Ganbold wrote: > Hi, > > I have a question regarding ipfw fwd rule. > I'm using FreeBSD 5.4-STABLE and running on it bridging firewall > using ipfw. > > Now my question comes:) > Can I use ipfw fwd rules against traffic coming to one of the bridged > interfaces? Yes you can. sysctl net.link.ether.bridge_ipfw=1 just like in your sysctl variables. > I would like to forward some packets (which are destined to port > 110) > to some other router through third vr0 interface. Use a divert rule for that. In this example we send all the port 80 traffic to port 8000: # ipfw add 1000 divert 8000 tcp from any to any 80 Read this article for more info: http://freebsd.rogness.net/snort_inline/ Cheers Marcin. From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 07:43:15 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 A590C16A41F for ; Fri, 30 Sep 2005 07:43:15 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (mp2.macomnet.net [195.128.64.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id C0B4543D49 for ; Fri, 30 Sep 2005 07:43:14 +0000 (GMT) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.13.3/8.13.3) with ESMTP id j8U7hC3x022776; Fri, 30 Sep 2005 11:43:13 +0400 (MSD) (envelope-from maxim@macomnet.ru) Date: Fri, 30 Sep 2005 11:43:12 +0400 (MSD) From: Maxim Konovalov To: Andrey Smagin In-Reply-To: <584642479.20050930101019@mail.ru> Message-ID: <20050930114221.H21767@mp2.macomnet.net> References: <20050926195807.GD95971@sandvine.com> <17208.30606.117170.36398@khavrinen.csail.mit.edu> <20050927001650.GA9994@sandvine.com> <20050927180021.GB9994@sandvine.com> <433A2882.4030003@freebsd.org> <433A2D6E.7020205@freebsd.org> <20050928152112.GC9994@sandvine.com> <2262110.20050928194326@mail.ru> <584642479.20050930101019@mail.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: How connect 2 PC with ath in hostap mode ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 07:43:15 -0000 On Fri, 30 Sep 2005, 10:10+0400, Andrey Smagin wrote: > Hi ALL, > > People please say it possible under FreeBSD ? > Any body have sucess stories about it ? > What manual I must read to do it ? :) Mm, let me think... man ath, "EXAMPLES"? -- Maxim Konovalov From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 07:43:59 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 7B2BF16A41F for ; Fri, 30 Sep 2005 07:43:59 +0000 (GMT) (envelope-from david.mao@thomson.net) Received: from dmzraw5.extranet.tce.com (dmzraw5.extranet.tce.com [157.254.234.142]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4FA243D53 for ; Fri, 30 Sep 2005 07:43:58 +0000 (GMT) (envelope-from david.mao@thomson.net) Received: from indyvss2.am.thmulti.com (unknown [157.254.92.61]) by dmzraw5.extranet.tce.com (Postfix) with ESMTP id D38AA100E; Fri, 30 Sep 2005 07:43:57 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by indyvss2.am.thmulti.com (Postfix) with ESMTP id 7CDD327F18; Fri, 30 Sep 2005 07:43:57 +0000 (GMT) Received: from indyvss2.am.thmulti.com ([127.0.0.1]) by localhost (indyvss2 [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 20874-01-64; Fri, 30 Sep 2005 07:43:49 +0000 (GMT) Received: from smtprelay2.indy.tce.com (smtprelay2.indy.tce.com [157.254.96.95]) by indyvss2.am.thmulti.com (Postfix) with ESMTP id DD89327EF6; Fri, 30 Sep 2005 07:43:49 +0000 (GMT) Received: from boulsmailbh02.eu.thmulti.com (localhost [127.0.0.1]) by smtprelay2.indy.tce.com (8.12.9/8.12.8) with ESMTP id j8U7hNhF012397; Fri, 30 Sep 2005 07:43:48 GMT Received: from tahksmail02.ap.thmulti.com ([141.11.12.26]) by boulsmailbh02.eu.thmulti.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 30 Sep 2005 09:43:47 +0200 Received: from tahksmail01.ap.thmulti.com ([141.11.13.38]) by tahksmail02.ap.thmulti.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 30 Sep 2005 15:43:43 +0800 Received: from bjngsmail01.ap.thmulti.com ([10.11.70.35]) by tahksmail01.ap.thmulti.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 30 Sep 2005 15:43:43 +0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Sep 2005 15:43:41 +0800 Message-ID: <31021C278A7A6B4AB95E9A085C3552181F7608@bjngsmail01> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ipfw bridge + fwd questions Thread-Index: AcXFkZ3l/Zc8NZfZTNmcawLnsl1F3AAAP7YA From: "Mao Shou Yan" To: "Marcin Jessa" X-OriginalArrivalTime: 30 Sep 2005 07:43:43.0337 (UTC) FILETIME=[AE7ECD90:01C5C592] X-Virus-Scanned: amavisd-new at thomson.net Cc: freebsd-net@freebsd.org Subject: RE: ipfw bridge + fwd questions X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 07:43:59 -0000 NO, fwd can work only on layer 3 packet! -----Original Message----- From: owner-freebsd-net@freebsd.org = [mailto:owner-freebsd-net@freebsd.org] On Behalf Of Marcin Jessa Sent: 2005=C4=EA9=D4=C230=C8=D5 15:35 To: Ganbold Cc: freebsd-net@freebsd.org Subject: Re: ipfw bridge + fwd questions On Fri, 30 Sep 2005 15:39:49 +0900 Ganbold wrote: > Hi, >=20 > I have a question regarding ipfw fwd rule. > I'm using FreeBSD 5.4-STABLE and running on it bridging firewall > using ipfw. >=20 > Now my question comes:) > Can I use ipfw fwd rules against traffic coming to one of the bridged=20 > interfaces? Yes you can. sysctl net.link.ether.bridge_ipfw=3D1 just like in your sysctl = variables. > I would like to forward some packets (which are destined to port > 110) > to some other router through third vr0 interface. Use a divert rule for that. In this example we send all the port 80 traffic to port 8000: # ipfw add 1000 divert 8000 tcp from any to any 80 Read this article for more info: http://freebsd.rogness.net/snort_inline/ Cheers Marcin. _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 07:57:53 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 B9D8E16A41F for ; Fri, 30 Sep 2005 07:57:53 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from mail.yazzy.org (mail.yazzy.org [217.8.140.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF1D43D4C for ; Fri, 30 Sep 2005 07:57:53 +0000 (GMT) (envelope-from lists@yazzy.org) Received: from 217-13-2-82.dd.nextgentel.com ([217.13.2.82] helo=marcin) by mail.yazzy.org with esmtps (TLSv1:AES256-SHA:256) (YazzY.org) id 1ELFld-0006PT-Ra; Fri, 30 Sep 2005 09:57:18 +0200 Date: Fri, 30 Sep 2005 09:57:43 +0200 From: Marcin Jessa To: SAMU Message-Id: <20050930095743.402e56cd.lists@yazzy.org> In-Reply-To: <584642479.20050930101019@mail.ru> References: <20050926195807.GD95971@sandvine.com> <17208.30606.117170.36398@khavrinen.csail.mit.edu> <20050927001650.GA9994@sandvine.com> <20050927180021.GB9994@sandvine.com> <433A2882.4030003@freebsd.org> <433A2D6E.7020205@freebsd.org> <20050928152112.GC9994@sandvine.com> <2262110.20050928194326@mail.ru> <584642479.20050930101019@mail.ru> Organization: YazzY.org X-Mailer: Sylpheed version 2.0.0 (GTK+ 2.6.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -2.5 (--) Cc: freebsd-net@freebsd.org Subject: Re: How connect 2 PC with ath in hostap mode ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 07:57:53 -0000 On Fri, 30 Sep 2005 10:10:19 +0400 Andrey Smagin wrote: > Hi ALL, Hi Andrey. > People please say it possible under FreeBSD ? > Any body have sucess stories about it ? > What manual I must read to do it ? :) > man ifconfig should be the place to start. Anyway, you can connect two PCs when one of them runs in hostap and the other one in ad-hoc mode. This will set up one of them as AP: ifconfig_ath0="inet 12.23.34.1 netmask 255.255.255.0 ssid Andrey mode 11g mediaopt hostap" And one in adhoc: ifconfig_ath0="inet 12.23.34.1 netmask 255.255.255.0 ssid Andrey channel 6 mode 11g mediaopt adhoc" You can also run both atheros nics in ad-hoc mode and bridge their interfaces with wired nics. And you can set up your atheros access point as apbridge which will pass packets between wireless clients directly. You cannot connect two APs in hostap mode as they will never associate to one another. Cheers Marcin. From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 12:40:04 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 8EB5916A420; Fri, 30 Sep 2005 12:40:04 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id A02AE43D53; Fri, 30 Sep 2005 12:40:03 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8UCe0nT045638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 16:40:01 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8UCe03o045634; Fri, 30 Sep 2005 16:40:00 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 30 Sep 2005 16:40:00 +0400 From: Gleb Smirnoff To: arch@FreeBSD.org, net@FreeBSD.org Message-ID: <20050930124000.GA45345@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline User-Agent: Mutt/1.5.6i Cc: Subject: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 12:40:04 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline [please, follow-up on net@ only] Colleagues, here are some patches for review. Problems addressed: 1) When Giant was removed from polling a problem was introduced. The idle poll feature was broken. The idle poll thread can enter polling handler on one interface and put to sleep for a long time, until CPU resources found. During this time no traffic is received on interface. Well, this is what idle thread is supposed to do. Why didn't this happen with Giant? Because idle poll entered poll handler holding Giant, and other threads (in particular netisr poll) contested on Giant and propagated their priority to idle poll. Well, this is a hack, but idle poll significantly improves polling performance on an idle box, that's why I won't axe it but try to fix it. To address the problem we need to use the same technique as before, but use poll_mtx instead of Giant. However, this will resurrect LORs, that were fixed with Giant removal. The alternative lock path happens, when driver decides to deregister from polling itself. The LOR is fixed by further changes. See 3). 2) Drivers indicate their ability to do polling(4) with IFCAP_POLLING flag int if_capabilites field. Setting the flag in if_capenable should register interface with polling and disable interrupts. However, the if_flags is also abused with IFF_POLLING flag. The aim is to remove IFF_POLLING flag. 3) The polling is switched on and off not functionally. That is, when you say 'sysctl kern.polling.enable=1' or 'ifconfig fxp0 -polling', the polling is switched on/off not immediately but on next tick or next interrupt. This non-functional approach leads to a lot of ambiguouties in code, makes it harder to understand and maintain. It also exposes race conditions. The attached patch removes: - IFF_POLLING flag. - Use of if_flags, if_drv_flags, if_capenable from kern_poll.c. All current accesses to these fields are not locked and polling shouldn't look there. - poll in trap feature. Sorry, we can't acquire mutexes in trap(). Anyone used it, anyway? - POLL_DEREGISTER command. No hacks. Everything is done functionally via ioctl(). The new world order for driver is the following: 1) Declare IFCAP_POLLING in if_capabilities on attach. Do not touch if_capenable. 2) in ioctl method, in SIOCSIFCAP case the driver should: - call ether_poll_[de]register - if no error, set the IFCAP_POLLING flag in if_capenable - obtain driver lock - [dis/en]able interrupts - drop driver lock 3) In poll method, check IFF_DRV_RUNNING flag after obtaining driver lock 4) In interrupt handler check IFCAP_POLLING flag in if_capenable. If present, then return. This is important to protect from spurious interrupts. 5) In device detach method, call ether_poll_deregister() before obtaining driver lock. The new world order for user is the following: - polling should be enabled and disabled with ifconfig(8) - kern.polling.enable is now deprecated. It is kept for some compatibility. When you set it to 1, polling is turned on for all capable interfaces. In case of 0 polling is turned off. - no poll in trap The attached patch touches only em(4) and fxp(4). I will write patches for all other drivers ASAP. But I don't have all the hardware, so if you are using polling(4) and you run FreeBSD 6 or 7, please help me with testing. ATM only em(4) driver patch is tested. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="newpoll.diff" Index: amd64/amd64/trap.c =================================================================== RCS file: /home/ncvs/src/sys/amd64/amd64/trap.c,v retrieving revision 1.293 diff -u -r1.293 trap.c --- amd64/amd64/trap.c 28 Sep 2005 07:03:02 -0000 1.293 +++ amd64/amd64/trap.c 29 Sep 2005 09:41:32 -0000 @@ -146,11 +146,6 @@ extern char *syscallnames[]; #endif -#ifdef DEVICE_POLLING -extern u_int32_t poll_in_trap; -extern int ether_poll(int count); -#endif /* DEVICE_POLLING */ - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -241,11 +236,6 @@ trap_fatal(&frame, frame.tf_addr); } -#ifdef DEVICE_POLLING - if (poll_in_trap) - ether_poll(poll_in_trap); -#endif /* DEVICE_POLLING */ - if (ISPL(frame.tf_cs) == SEL_UPL) { /* user trap */ Index: dev/em/if_em.c =================================================================== RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v retrieving revision 1.72 diff -u -r1.72 if_em.c --- dev/em/if_em.c 20 Sep 2005 14:52:57 -0000 1.72 +++ dev/em/if_em.c 29 Sep 2005 13:26:42 -0000 @@ -197,6 +197,9 @@ static void em_add_int_delay_sysctl(struct adapter *, const char *, const char *, struct em_int_delay_info *, int, int); +#ifdef DEVICE_POLLING +static poll_handler_t em_poll; +#endif /********************************************************************* * FreeBSD Device Interface Entry Points @@ -526,6 +529,11 @@ INIT_DEBUGOUT("em_detach: begin"); +#ifdef DEVICE_POLLING + if (ifc->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif + EM_LOCK(adapter); adapter->in_detach = 1; em_stop(adapter); @@ -717,7 +725,7 @@ em_initialize_receive_unit(adapter); } #ifdef DEVICE_POLLING - if (!(ifp->if_flags & IFF_POLLING)) + if (!(ifp->if_capenable & IFCAP_POLLING)) #endif em_enable_intr(adapter); EM_UNLOCK(adapter); @@ -732,8 +740,26 @@ IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFCAP (Set Capabilities)"); reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; - if (mask & IFCAP_POLLING) - ifp->if_capenable ^= IFCAP_POLLING; +#ifdef DEVICE_POLLING + if (mask & IFCAP_POLLING) { + if (ifr->ifr_reqcap & IFCAP_POLLING) { + error = ether_poll_register(em_poll, ifp); + if (error) + return(error); + EM_LOCK(adapter); + em_disable_intr(adapter); + ifp->if_capenable |= IFCAP_POLLING; + EM_UNLOCK(adapter); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupt even in error case */ + EM_LOCK(adapter); + em_enable_intr(adapter); + ifp->if_capenable &= ~IFCAP_POLLING; + EM_UNLOCK(adapter); + } + } +#endif if (mask & IFCAP_HWCSUM) { ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; @@ -895,7 +921,7 @@ * Only enable interrupts if we are not polling, make sure * they are off otherwise. */ - if (ifp->if_flags & IFF_POLLING) + if (ifp->if_capenable & IFCAP_POLLING) em_disable_intr(adapter); else #endif /* DEVICE_POLLING */ @@ -920,8 +946,6 @@ #ifdef DEVICE_POLLING -static poll_handler_t em_poll; - static void em_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { @@ -930,14 +954,6 @@ mtx_assert(&adapter->mtx, MA_OWNED); - if (!(ifp->if_capenable & IFCAP_POLLING)) { - ether_poll_deregister(ifp); - cmd = POLL_DEREGISTER; - } - if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ - em_enable_intr(adapter); - return; - } if (cmd == POLL_AND_CHECK_STATUS) { reg_icr = E1000_READ_REG(&adapter->hw, ICR); if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { @@ -948,13 +964,10 @@ callout_reset(&adapter->timer, hz, em_local_timer, adapter); } } - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - em_process_receive_interrupts(adapter, count); - em_clean_transmit_interrupts(adapter); - } + em_process_receive_interrupts(adapter, count); + em_clean_transmit_interrupts(adapter); - if (ifp->if_drv_flags & IFF_DRV_RUNNING && - !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp); } @@ -964,7 +977,8 @@ struct adapter *adapter = ifp->if_softc; EM_LOCK(adapter); - em_poll_locked(ifp, cmd, count); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + em_poll_locked(ifp, cmd, count); EM_UNLOCK(adapter); } #endif /* DEVICE_POLLING */ @@ -987,18 +1001,10 @@ ifp = adapter->ifp; #ifdef DEVICE_POLLING - if (ifp->if_flags & IFF_POLLING) { + if (ifp->if_capenable & IFCAP_POLLING) { EM_UNLOCK(adapter); return; } - - if ((ifp->if_capenable & IFCAP_POLLING) && - ether_poll_register(em_poll, ifp)) { - em_disable_intr(adapter); - em_poll_locked(ifp, 0, 1); - EM_UNLOCK(adapter); - return; - } #endif /* DEVICE_POLLING */ reg_icr = E1000_READ_REG(&adapter->hw, ICR); @@ -1718,9 +1724,7 @@ mtx_assert(&adapter->mtx, MA_OWNED); INIT_DEBUGOUT("em_stop: begin"); -#ifdef DEVICE_POLLING - ether_poll_deregister(ifp); -#endif + em_disable_intr(adapter); em_reset_hw(&adapter->hw); callout_stop(&adapter->timer); @@ -1976,7 +1980,6 @@ #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING; #endif /* @@ -2911,12 +2914,13 @@ adapter->fmp = NULL); if (adapter->fmp != NULL) { + struct mbuf *m = adapter->fmp; + adapter->fmp = NULL; EM_UNLOCK(adapter); - (*ifp->if_input)(ifp, adapter->fmp); + (*ifp->if_input)(ifp, m); EM_LOCK(adapter); } #endif - adapter->fmp = NULL; adapter->lmp = NULL; } } else { Index: dev/fxp/if_fxp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fxp/if_fxp.c,v retrieving revision 1.247 diff -u -r1.247 if_fxp.c --- dev/fxp/if_fxp.c 27 Sep 2005 09:01:10 -0000 1.247 +++ dev/fxp/if_fxp.c 29 Sep 2005 13:28:26 -0000 @@ -773,7 +773,6 @@ #ifdef DEVICE_POLLING /* Inform the world we support polling. */ ifp->if_capabilities |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING; #endif /* @@ -891,6 +890,11 @@ { struct fxp_softc *sc = device_get_softc(dev); +#ifdef DEVICE_POLLING + if (ifc->if_capenable & IFCAP_POLLING) + ether_poll_deregister(sc->ifp); +#endif + FXP_LOCK(sc); sc->suspended = 1; /* Do same thing as we do for suspend */ /* @@ -1448,15 +1452,11 @@ uint8_t statack; FXP_LOCK(sc); - if (!(ifp->if_capenable & IFCAP_POLLING)) { - ether_poll_deregister(ifp); - cmd = POLL_DEREGISTER; - } - if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { FXP_UNLOCK(sc); return; } + statack = FXP_SCB_STATACK_CXTNO | FXP_SCB_STATACK_CNA | FXP_SCB_STATACK_FR; if (cmd == POLL_AND_CHECK_STATUS) { @@ -1495,18 +1495,10 @@ } #ifdef DEVICE_POLLING - if (ifp->if_flags & IFF_POLLING) { + if (ifp->if_capenable & IFCAP_POLLING) { FXP_UNLOCK(sc); return; } - if ((ifp->if_capenable & IFCAP_POLLING) && - ether_poll_register(fxp_poll, ifp)) { - /* disable interrupts */ - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); - FXP_UNLOCK(sc); - fxp_poll(ifp, 0, 1); - return; - } #endif while ((statack = CSR_READ_1(sc, FXP_CSR_SCB_STATACK)) != 0) { /* @@ -1837,9 +1829,6 @@ ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); ifp->if_timer = 0; -#ifdef DEVICE_POLLING - ether_poll_deregister(ifp); -#endif /* * Cancel stats updater. */ @@ -2163,7 +2152,7 @@ * ... but only do that if we are not polling. And because (presumably) * the default is interrupts on, we need to disable them explicitly! */ - if ( ifp->if_flags & IFF_POLLING ) + if (ifp->if_capenable & IFCAP_POLLING ) CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); else #endif /* DEVICE_POLLING */ @@ -2418,11 +2407,30 @@ break; case SIOCSIFCAP: - FXP_LOCK(sc); mask = ifp->if_capenable ^ ifr->ifr_reqcap; - if (mask & IFCAP_POLLING) - ifp->if_capenable ^= IFCAP_POLLING; +#ifdef DEVICE_POLLING + if (mask & IFCAP_POLLING) { + if (ifr->ifr_reqcap & IFCAP_POLLING) { + error = ether_poll_register(fxp_poll, ifp); + if (error) + return(error); + FXP_LOCK(sc); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, + FXP_SCB_INTR_DISABLE); + ifp->if_capenable |= IFCAP_POLLING; + FXP_UNLOCK(sc); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupts in any case */ + FXP_LOCK(sc); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); + ifp->if_capenable &= ~IFCAP_POLLING; + FXP_UNLOCK(sc); + } + } +#endif if (mask & IFCAP_VLAN_MTU) { + FXP_LOCK(sc); ifp->if_capenable ^= IFCAP_VLAN_MTU; if (sc->revision != FXP_REV_82557) flag = FXP_FLAG_LONG_PKT_EN; @@ -2431,8 +2439,8 @@ sc->flags ^= flag; if (ifp->if_flags & IFF_UP) fxp_init_body(sc); + FXP_UNLOCK(sc); } - FXP_UNLOCK(sc); break; default: Index: i386/i386/trap.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/trap.c,v retrieving revision 1.280 diff -u -r1.280 trap.c --- i386/i386/trap.c 28 Sep 2005 07:03:03 -0000 1.280 +++ i386/i386/trap.c 29 Sep 2005 09:42:21 -0000 @@ -160,11 +160,6 @@ extern char *syscallnames[]; #endif -#ifdef DEVICE_POLLING -extern u_int32_t poll_in_trap; -extern int ether_poll(int count); -#endif /* DEVICE_POLLING */ - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -272,11 +267,6 @@ trap_fatal(&frame, eva); } -#ifdef DEVICE_POLLING - if (poll_in_trap) - ether_poll(poll_in_trap); -#endif /* DEVICE_POLLING */ - if ((ISPL(frame.tf_cs) == SEL_UPL) || ((frame.tf_eflags & PSL_VM) && !(PCPU_GET(curpcb)->pcb_flags & PCB_VM86CALL))) { Index: kern/kern_poll.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_poll.c,v retrieving revision 1.22 diff -u -r1.22 kern_poll.c --- kern/kern_poll.c 6 Sep 2005 11:09:18 -0000 1.22 +++ kern/kern_poll.c 29 Sep 2005 12:26:58 -0000 @@ -32,6 +32,7 @@ #include #include #include /* needed by net/if.h */ +#include #include #include @@ -44,14 +45,15 @@ static void netisr_poll(void); /* the two netisr handlers */ static void netisr_pollmore(void); +static int poll_switch(SYSCTL_HANDLER_ARGS); void hardclock_device_poll(void); /* hook from hardclock */ -void ether_poll(int); /* polling while in trap */ +void ether_poll(int); /* polling in idle loop */ /* * Polling support for [network] device drivers. * - * Drivers which support this feature try to register with the + * Drivers which support this feature can register with the * polling code. * * If registration is successful, the driver must disable interrupts, @@ -64,10 +66,6 @@ * POLL_AND_CHECK_STATUS: as above, plus check status registers or do * other more expensive operations. This command is issued periodically * but less frequently than POLL_ONLY. - * POLL_DEREGISTER: deregister and return to interrupt mode. - * - * The first two commands are only issued if the interface is marked as - * 'IFF_UP and IFF_DRV_RUNNING', the last one only if IFF_DRV_RUNNING is set. * * The count limit specifies how much work the handler can do during the * call -- typically this is the number of packets to be received, or @@ -75,11 +73,9 @@ * as the max time spent in the function grows roughly linearly with the * count). * - * Deregistration can be requested by the driver itself (typically in the - * *_stop() routine), or by the polling code, by invoking the handler. - * - * Polling can be globally enabled or disabled with the sysctl variable - * kern.polling.enable (default is 0, disabled) + * Polling is enabled and disabled via setting IFCAP_POLLING flag on + * the interface. The driver ioctl handler should register interface + * with polling and disable interrupts, if registration was successfull. * * A second variable controls the sharing of CPU between polling/kernel * network processing, and other activities (typically userlevel tasks): @@ -91,7 +87,7 @@ * The following constraints hold * * 1 <= poll_each_burst <= poll_burst <= poll_burst_max - * 0 <= poll_in_trap <= poll_each_burst + * 0 <= poll_each_burst * MIN_POLL_BURST_MAX <= poll_burst_max <= MAX_POLL_BURST_MAX */ @@ -117,10 +113,6 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, idle_poll, CTLFLAG_RW, &poll_in_idle_loop, 0, "Enable device polling in idle loop"); -u_int32_t poll_in_trap; /* used in trap.c */ -SYSCTL_UINT(_kern_polling, OID_AUTO, poll_in_trap, CTLFLAG_RW, - &poll_in_trap, 0, "Poll burst size during a trap"); - static u_int32_t user_frac = 50; SYSCTL_UINT(_kern_polling, OID_AUTO, user_frac, CTLFLAG_RW, &user_frac, 0, "Desired user fraction of cpu time"); @@ -149,9 +141,9 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, handlers, CTLFLAG_RD, &poll_handlers, 0, "Number of registered poll handlers"); -static int polling = 0; /* global polling enable */ -SYSCTL_UINT(_kern_polling, OID_AUTO, enable, CTLFLAG_RW, - &polling, 0, "Polling enabled"); +static int polling = 0; +SYSCTL_PROC(_kern_polling, OID_AUTO, enable, CTLTYPE_UINT | CTLFLAG_RW, + 0, sizeof(int), poll_switch, "I", "Switch polling for all interfaces"); static u_int32_t phase; SYSCTL_UINT(_kern_polling, OID_AUTO, phase, CTLFLAG_RW, @@ -174,23 +166,9 @@ struct pollrec { poll_handler_t *handler; struct ifnet *ifp; - /* - * Flags of polling record (protected by poll_mtx). - * PRF_RUNNING means that the handler is now executing. - * PRF_LEAVING means that the handler is now deregistering. - */ -#define PRF_RUNNING 0x1 -#define PRF_LEAVING 0x2 - uint32_t flags; }; static struct pollrec pr[POLL_LIST_LEN]; - -#define PR_VALID(i) (pr[(i)].handler != NULL && \ - !(pr[(i)].flags & (PRF_RUNNING|PRF_LEAVING)) && \ - (pr[(i)].ifp->if_drv_flags & IFF_DRV_RUNNING) &&\ - (pr[(i)].ifp->if_flags & IFF_UP)) - static struct mtx poll_mtx; static void @@ -258,30 +236,24 @@ } /* - * ether_poll is called from the idle loop or from the trap handler. + * ether_poll is called from the idle loop. */ void ether_poll(int count) { int i; + NET_LOCK_GIANT(); mtx_lock(&poll_mtx); if (count > poll_each_burst) count = poll_each_burst; - for (i = 0 ; i < poll_handlers ; i++) { - if (PR_VALID(i)) { - pr[i].flags |= PRF_RUNNING; - mtx_unlock(&poll_mtx); - NET_LOCK_GIANT(); - pr[i].handler(pr[i].ifp, POLL_ONLY, count); - NET_UNLOCK_GIANT(); - mtx_lock(&poll_mtx); - pr[i].flags &= ~PRF_RUNNING; - } - } + for (i = 0 ; i < poll_handlers ; i++) + pr[i].handler(pr[i].ifp, POLL_ONLY, count); + mtx_unlock(&poll_mtx); + NET_UNLOCK_GIANT(); } /* @@ -403,60 +375,29 @@ residual_burst : poll_each_burst; residual_burst -= cycles; - if (polling) { - for (i = 0 ; i < poll_handlers ; i++) { - if (PR_VALID(i)) { - pr[i].flags |= PRF_RUNNING; - mtx_unlock(&poll_mtx); - pr[i].handler(pr[i].ifp, arg, cycles); - mtx_lock(&poll_mtx); - pr[i].flags &= ~PRF_RUNNING; - } - } - } else { /* unregister */ - for (i = 0 ; i < poll_handlers ; i++) { - if (pr[i].handler != NULL && - pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING) { - pr[i].ifp->if_flags &= ~IFF_POLLING; - pr[i].flags |= PRF_LEAVING; - mtx_unlock(&poll_mtx); - pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1); - mtx_lock(&poll_mtx); - pr[i].flags &= ~PRF_LEAVING; - } - pr[i].handler = NULL; - } - residual_burst = 0; - poll_handlers = 0; - } + for (i = 0 ; i < poll_handlers ; i++) + pr[i].handler(pr[i].ifp, arg, cycles); phase = 4; mtx_unlock(&poll_mtx); } /* - * Try to register routine for polling. Returns 1 if successful - * (and polling should be enabled), 0 otherwise. + * Try to register routine for polling. Returns 0 if successful + * (and polling should be enabled), error code otherwise. * A device is not supposed to register itself multiple times. * - * This is called from within the *_intr() functions, so we do not need - * further ifnet locking. + * This is called from within the *_ioctl() functions. */ int ether_poll_register(poll_handler_t *h, struct ifnet *ifp) { int i; - NET_ASSERT_GIANT(); + KASSERT(h != NULL, ("%s: handler is NULL", __func__)); + KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); - if (polling == 0) /* polling disabled, cannot register */ - return 0; - if (h == NULL || ifp == NULL) /* bad arguments */ - return 0; - if ( !(ifp->if_flags & IFF_UP) ) /* must be up */ - return 0; - if (ifp->if_flags & IFF_POLLING) /* already polling */ - return 0; + NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); if (poll_handlers >= POLL_LIST_LEN) { @@ -474,7 +415,7 @@ verbose--; } mtx_unlock(&poll_mtx); - return 0; /* no polling for you */ + return (ENOMEM); /* no polling for you */ } for (i = 0 ; i < poll_handlers ; i++) @@ -482,45 +423,39 @@ mtx_unlock(&poll_mtx); log(LOG_DEBUG, "ether_poll_register: %s: handler" " already registered\n", ifp->if_xname); - return (0); + return (EEXIST); } pr[poll_handlers].handler = h; pr[poll_handlers].ifp = ifp; poll_handlers++; - ifp->if_flags |= IFF_POLLING; mtx_unlock(&poll_mtx); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); - return 1; /* polling enabled in next call */ + return (0); } /* - * Remove interface from the polling list. Normally called by *_stop(). - * It is not an error to call it with IFF_POLLING clear, the call is - * sufficiently rare to be preferable to save the space for the extra - * test in each driver in exchange of one additional function call. + * Remove interface from the polling list. Called from *_ioctl(), too. */ int ether_poll_deregister(struct ifnet *ifp) { int i; - NET_ASSERT_GIANT(); + KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); - if ( !ifp || !(ifp->if_flags & IFF_POLLING) ) { - return 0; - } + NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); + for (i = 0 ; i < poll_handlers ; i++) if (pr[i].ifp == ifp) /* found it */ break; - ifp->if_flags &= ~IFF_POLLING; /* found or not... */ if (i == poll_handlers) { - mtx_unlock(&poll_mtx); log(LOG_DEBUG, "ether_poll_deregister: %s: not found!\n", ifp->if_xname); - return (0); + mtx_unlock(&poll_mtx); + return (ENOENT); } poll_handlers--; if (i < poll_handlers) { /* Last entry replaces this one. */ @@ -528,7 +463,60 @@ pr[i].ifp = pr[poll_handlers].ifp; } mtx_unlock(&poll_mtx); - return (1); + return (0); +} + +/* + * Legacy interface for turning polling on all interfaces at one time. + */ +static int +poll_switch(SYSCTL_HANDLER_ARGS) +{ + struct ifnet *ifp; + int error; + int val; + + mtx_lock(&poll_mtx); + val = polling; + mtx_unlock(&poll_mtx); + + error = sysctl_handle_int(oidp, &val, sizeof(int), req); + if (error || !req->newptr ) + return (error); + + if (val == polling) + return (0); + + if (val < 0 || val > 1) + return (EINVAL); + + mtx_lock(&poll_mtx); + polling = val; + mtx_unlock(&poll_mtx); + + NET_LOCK_GIANT(); + IFNET_RLOCK(); + TAILQ_FOREACH(ifp, &ifnet, if_link) { + if (ifp->if_capabilities & IFCAP_POLLING) { + struct ifreq ifr; + + if (val == 1) + ifr.ifr_reqcap = + ifp->if_capenable | IFCAP_POLLING; + else + ifr.ifr_reqcap = + ifp->if_capenable & ~IFCAP_POLLING; + IFF_LOCKGIANT(ifp); /* LOR here */ + (void) (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr); + IFF_UNLOCKGIANT(ifp); + } + } + IFNET_RUNLOCK(); + NET_UNLOCK_GIANT(); + + log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)"); + + return (0); } static void Index: net/if.h =================================================================== RCS file: /home/ncvs/src/sys/net/if.h,v retrieving revision 1.98 diff -u -r1.98 if.h --- net/if.h 9 Aug 2005 12:56:20 -0000 1.98 +++ net/if.h 29 Sep 2005 11:25:05 -0000 @@ -148,7 +148,7 @@ #define IFF_LINK2 0x4000 /* per link layer defined bit */ #define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ #define IFF_MULTICAST 0x8000 /* (i) supports multicast */ -#define IFF_POLLING 0x10000 /* (n) Interface is in polling mode. */ +/* 0x10000 */ #define IFF_PPROMISC 0x20000 /* (n) user-requested promisc mode */ #define IFF_MONITOR 0x40000 /* (n) user-requested monitor mode */ #define IFF_STATICARP 0x80000 /* (n) static ARP */ @@ -166,8 +166,7 @@ /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ - IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\ - IFF_POLLING) + IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC) /* * Values for if_link_state. Index: net/if_var.h =================================================================== RCS file: /home/ncvs/src/sys/net/if_var.h,v retrieving revision 1.102 diff -u -r1.102 if_var.h --- net/if_var.h 9 Aug 2005 10:16:17 -0000 1.102 +++ net/if_var.h 29 Sep 2005 10:19:43 -0000 @@ -660,7 +660,7 @@ LLADDR((struct sockaddr_dl *) ifaddr_byindex((ifp)->if_index)->ifa_addr) #ifdef DEVICE_POLLING -enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS, POLL_DEREGISTER }; +enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; typedef void poll_handler_t(struct ifnet *ifp, enum poll_cmd cmd, int count); int ether_poll_register(poll_handler_t *h, struct ifnet *ifp); --k+w/mQv8wyuph6w0-- From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 12:43:53 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 6F2DB16A41F; Fri, 30 Sep 2005 12:43:53 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id E490343D49; Fri, 30 Sep 2005 12:43:52 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 6EF3BBC9A; Fri, 30 Sep 2005 12:43:51 +0000 (UTC) To: Gleb Smirnoff From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 30 Sep 2005 16:40:00 +0400." <20050930124000.GA45345@cell.sick.ru> Date: Fri, 30 Sep 2005 14:43:51 +0200 Message-ID: <32170.1128084231@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@FreeBSD.org, net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 12:43:53 -0000 I still think we should stop having this network-centric view of polling and implement _real_ *device* polling, so that other device types can use it as well. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 12:47:26 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 DDF0616A41F; Fri, 30 Sep 2005 12:47:26 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F88343D4C; Fri, 30 Sep 2005 12:47:26 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8UClOFR045802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 16:47:25 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8UClObU045801; Fri, 30 Sep 2005 16:47:24 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 30 Sep 2005 16:47:24 +0400 From: Gleb Smirnoff To: Poul-Henning Kamp Message-ID: <20050930124724.GB45345@cell.sick.ru> References: <20050930124000.GA45345@cell.sick.ru> <32170.1128084231@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <32170.1128084231@critter.freebsd.dk> User-Agent: Mutt/1.5.6i Cc: arch@FreeBSD.org, net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 12:47:27 -0000 On Fri, Sep 30, 2005 at 02:43:51PM +0200, Poul-Henning Kamp wrote: P> I still think we should stop having this network-centric view of P> polling and implement _real_ *device* polling, so that other P> device types can use it as well. I agree with both hands. My current work is aimed at RELENG_6 only. btw, I've made a step in this direction already - kern_poll can now forget about struct ifnet. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 12:47:37 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 6D0E116A42F; Fri, 30 Sep 2005 12:47:37 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [204.156.12.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2935843D48; Fri, 30 Sep 2005 12:47:37 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by cyrus.watson.org (Postfix) with ESMTP id 4555F46B11; Fri, 30 Sep 2005 08:47:36 -0400 (EDT) Date: Fri, 30 Sep 2005 13:47:36 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Poul-Henning Kamp In-Reply-To: <32170.1128084231@critter.freebsd.dk> Message-ID: <20050930134526.R71864@fledge.watson.org> References: <32170.1128084231@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: arch@FreeBSD.org, Gleb Smirnoff , net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 12:47:37 -0000 On Fri, 30 Sep 2005, Poul-Henning Kamp wrote: > I still think we should stop having this network-centric view of polling > and implement _real_ *device* polling, so that other device types can > use it as well. While I agree that we should offer polling to non-network device drivers also, I think it's worth observing that the network awareness of our current polling code has some interesting advantages. For one thing, the framework itself is aware of the notion of batching and moderating the workload as it is aware of the number of mbufs being processes, and knows to bound the workload, etc. We'll need to revisit many of the ideas in the current polling implementation (designed largely around 4.x operating assumptions) anyway, but I think it's important we understand some of the implicit design benefits that are present in the current system as well... Robert N M Watson From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 12:57:11 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 7AC0816A41F; Fri, 30 Sep 2005 12:57:11 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22D2643D48; Fri, 30 Sep 2005 12:57:11 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 8593FBC96; Fri, 30 Sep 2005 12:57:09 +0000 (UTC) To: Robert Watson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 30 Sep 2005 13:47:36 BST." <20050930134526.R71864@fledge.watson.org> Date: Fri, 30 Sep 2005 14:57:08 +0200 Message-ID: <32249.1128085028@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@FreeBSD.org, Gleb Smirnoff , net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 12:57:11 -0000 In message <20050930134526.R71864@fledge.watson.org>, Robert Watson writes: >On Fri, 30 Sep 2005, Poul-Henning Kamp wrote: > >> I still think we should stop having this network-centric view of polling >> and implement _real_ *device* polling, so that other device types can >> use it as well. > >While I agree that we should offer polling to non-network device drivers >also, I think it's worth observing that the network awareness of our >current polling code has some interesting advantages. [...] None of which could not be implemented on top of a general polling facility, and some of which makes polling unusable with high end networking hardware like a 8x1Gige card where all ports are handled by the same interrupt. Anyway, I just wanted to make the point, not start a long discussion. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 13:32:07 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.org 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 1571716A41F for ; Fri, 30 Sep 2005 13:32:07 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6139E43D53 for ; Fri, 30 Sep 2005 13:32:06 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8UDUm44046473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 17:30:49 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8UDUl5P046472; Fri, 30 Sep 2005 17:30:47 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 30 Sep 2005 17:30:47 +0400 From: Gleb Smirnoff To: das-keyword-net.6770cb@seddon.ca Message-ID: <20050930133047.GE45345@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , das-keyword-net.6770cb@seddon.ca, Daemon , freebsd-net@freebsd.org References: <4338EA66.6010906@foxchat.net> <1127806266.15081.TMDA@seddon.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <1127806266.15081.TMDA@seddon.ca> User-Agent: Mutt/1.5.6i Cc: Daemon , freebsd-net@FreeBSD.org Subject: Re: arplookup problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 13:32:07 -0000 On Tue, Sep 27, 2005 at 05:31:05PM +1000, Dave+Seddon wrote: D> There seem to be serious issues around this driver. There have been many D> posts on this list in the last days particularly, as well as over the last D> few months. People seem to be looking at it, and I guess once we all rush D> out and by other (e.g. broadcom) NICs intel might try to help. This messages has nothing to do with driver. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 13:35:23 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.org 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 9632916A47C for ; Fri, 30 Sep 2005 13:35:23 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2921943D5C for ; Fri, 30 Sep 2005 13:35:17 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8UDY1t2046554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 17:34:01 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8UDY0E3046553; Fri, 30 Sep 2005 17:34:01 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 30 Sep 2005 17:34:00 +0400 From: Gleb Smirnoff To: Daemon Message-ID: <20050930133400.GF45345@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , Daemon , freebsd-net@freebsd.org References: <4338EA66.6010906@foxchat.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4338EA66.6010906@foxchat.net> User-Agent: Mutt/1.5.6i Cc: freebsd-net@FreeBSD.org Subject: Re: arplookup problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 13:35:24 -0000 On Tue, Sep 27, 2005 at 02:44:54AM -0400, Daemon wrote: D> I hope this is the correct list to post to, if not, I apologize. I've D> had an ongoing problem with arplookup for some months now and as of yet, D> haven't been able to find anything on the web concerning my particular D> problem. Every 24 hours, almost to the minute, I get the following errors; D> D> *Note This proceeds each arplookup failure D> em0: Link is Down D> em0: Link is up 100 Mbps Full Duplex D> D> Sep 25 01:32:49 thisbox kernel: arplookup 169.0.0.1 failed: host is not D> on local network D> Sep 25 01:33:05 thisbox kernel: arplookup 10.32.240.171 failed: host is D> not on local network D> Sep 26 01:23:37 thisbox kernel: arplookup 169.0.0.1 failed: host is not D> on local network D> Sep 26 01:23:49 thisbox kernel: arplookup 10.32.240.171 failed: host is D> not on local network D> Sep 27 01:23:35 thisbox kernel: arplookup 169.0.0.1 failed: host is not D> on local network D> Sep 27 01:23:48 thisbox kernel: arplookup 10.32.240.171 failed: host is D> not on local network In most cases this means that system have received ARP reply for a host, that doesn't belong to an attached network. D> When this happens, one by one, each of my (ssh, gaim, irc, etc.) D> connections time out until every connection is dead. It looks like some "Ethernet cool hacker" does ARP spoofing in your network. May be he spoofs your ARP cache or cache of your gateway. You can solve the problem by finding him, or by setting static ARP entries on your box and on gateway. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 14:06:07 2005 Return-Path: X-Original-To: net@freebsd.org 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 8FDCE16A427; Fri, 30 Sep 2005 14:06:07 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from mv.twc.weather.com (mv.twc.weather.com [65.212.71.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2397943D48; Fri, 30 Sep 2005 14:06:05 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.41.233] (Not Verified[10.50.41.233]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Fri, 30 Sep 2005 10:22:03 -0400 From: John Baldwin To: freebsd-arch@freebsd.org Date: Fri, 30 Sep 2005 10:07:09 -0400 User-Agent: KMail/1.8 References: <20050930124000.GA45345@cell.sick.ru> In-Reply-To: <20050930124000.GA45345@cell.sick.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200509301007.10494.jhb@FreeBSD.org> Cc: net@freebsd.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 14:06:07 -0000 On Friday 30 September 2005 08:40 am, Gleb Smirnoff wrote: > [please, follow-up on net@ only] > > Colleagues, > > here are some patches for review. > > Problems addressed: > > 1) When Giant was removed from polling a problem was introduced. The id= le > poll feature was broken. The idle poll thread can enter polling handler on > one interface and put to sleep for a long time, until CPU resources found. > During this time no traffic is received on interface. Well, this is what > idle thread is supposed to do. Why didn't this happen with Giant? Because > idle poll entered poll handler holding Giant, and other threads (in > particular netisr poll) contested on Giant and propagated their priority = to > idle poll. Well, this is a hack, but idle poll significantly improves > polling performance on an idle box, that's why I won't axe it but try to > fix it. > > To address the problem we need to use the same technique as before, but > use poll_mtx instead of Giant. However, this will resurrect LORs, that we= re > fixed with Giant removal. The alternative lock path happens, when driver > decides to deregister from polling itself. The LOR is fixed by further > changes. See 3). > > 2) Drivers indicate their ability to do polling(4) with IFCAP_POLLING > flag int if_capabilites field. Setting the flag in if_capenable should > register interface with polling and disable interrupts. However, the > if_flags is also abused with IFF_POLLING flag. The aim is to remove > IFF_POLLING flag. > > 3) The polling is switched on and off not functionally. That is, when y= ou > say 'sysctl kern.polling.enable=3D1' or 'ifconfig fxp0 -polling', the pol= ling > is switched on/off not immediately but on next tick or next interrupt. Th= is > non-functional approach leads to a lot of ambiguouties in code, makes it > harder to understand and maintain. It also exposes race conditions. > > The attached patch removes: > - IFF_POLLING flag. > - Use of if_flags, if_drv_flags, if_capenable from kern_poll.c. > All current accesses to these fields are not locked and polling > shouldn't look there. > - poll in trap feature. Sorry, we can't acquire mutexes in trap(). Anyo= ne > used it, anyway? > - POLL_DEREGISTER command. No hacks. Everything is done functionally via > ioctl(). > > The new world order for driver is the following: > > 1) Declare IFCAP_POLLING in if_capabilities on attach. Do not touch > if_capenable. 2) in ioctl method, in SIOCSIFCAP case the driver should: > - call ether_poll_[de]register > - if no error, set the IFCAP_POLLING flag in if_capenable > - obtain driver lock > - [dis/en]able interrupts > - drop driver lock > 3) In poll method, check IFF_DRV_RUNNING flag after obtaining driver lo= ck > 4) In interrupt handler check IFCAP_POLLING flag in if_capenable. If > present, then return. This is important to protect from spurious > interrupts. 5) In device detach method, call ether_poll_deregister() befo= re > obtaining driver lock. =46rom my limited experience with locking various NIC drivers, I like this= =20 change. I think it is much better to tweak the polling state in the ioctl(= )=20 handler rather than in the poll handler. =2D-=20 John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 15:30:09 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 677BF16A41F for ; Fri, 30 Sep 2005 15:30:09 +0000 (GMT) (envelope-from Nickolay.Kritsky@astra-sw.com) Received: from mail.astra-sw.com (mail.astra-sw.com [82.140.87.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD8D543D48 for ; Fri, 30 Sep 2005 15:30:08 +0000 (GMT) (envelope-from Nickolay.Kritsky@astra-sw.com) Received: from exchange.stardevelopers4msi.com (exchange.stardevelopers4msi.com [10.1.2.201] (may be forged)) by mail.astra-sw.com (8.12.11/8.12.11) with ESMTP id j8UFU6IL071472 for ; Fri, 30 Sep 2005 19:30:06 +0400 (MSD) X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Sep 2005 19:30:01 +0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: tcpdump based packet generator thread-index: AcXFcoViXZjXVr4vSEe9pVjstA9vogAYUnlg From: "Nickolay Kritsky" To: "det_re" , Cc: Subject: RE: tcpdump based packet generator X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 15:30:09 -0000 combination of tcpdump and nemesis may do the trick Nick -----Original Message----- From: det_re [mailto:det_re@yahoo.com]=20 Sent: Friday, September 30, 2005 7:53 AM To: freebsd-net@freebsd.org Subject: tcpdump based packet generator has anyone seen or implemented packet generator capable of reading tcpdump trace file and resend the packets back into the wire through bpf in freebsd box? =20 =09 __________________________________=20 Yahoo! Mail - PC Magazine Editors' Choice 2005=20 http://mail.yahoo.com _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 16:03:06 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 2C36616A41F; Fri, 30 Sep 2005 16:03:06 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F70F43D53; Fri, 30 Sep 2005 16:03:04 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8UG33PJ048028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 20:03:03 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8UG33BF048027; Fri, 30 Sep 2005 20:03:03 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 30 Sep 2005 20:03:02 +0400 From: Gleb Smirnoff To: arch@FreeBSD.org, net@FreeBSD.org Message-ID: <20050930160302.GJ45345@cell.sick.ru> References: <20050930124000.GA45345@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="5/uDoXvLw7AC5HRs" Content-Disposition: inline In-Reply-To: <20050930124000.GA45345@cell.sick.ru> User-Agent: Mutt/1.5.6i Cc: Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 16:03:06 -0000 --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Fri, Sep 30, 2005 at 04:40:00PM +0400, Gleb Smirnoff wrote: T> [please, follow-up on net@ only] T> T> Colleagues, T> T> here are some patches for review. I have some changes to patch after last compile, and haven't tested them befire sending patch. Here is an updated one. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename="newpoll.diff" Index: amd64/amd64/trap.c =================================================================== RCS file: /home/ncvs/src/sys/amd64/amd64/trap.c,v retrieving revision 1.293 diff -u -r1.293 trap.c --- amd64/amd64/trap.c 28 Sep 2005 07:03:02 -0000 1.293 +++ amd64/amd64/trap.c 29 Sep 2005 09:41:32 -0000 @@ -146,11 +146,6 @@ extern char *syscallnames[]; #endif -#ifdef DEVICE_POLLING -extern u_int32_t poll_in_trap; -extern int ether_poll(int count); -#endif /* DEVICE_POLLING */ - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -241,11 +236,6 @@ trap_fatal(&frame, frame.tf_addr); } -#ifdef DEVICE_POLLING - if (poll_in_trap) - ether_poll(poll_in_trap); -#endif /* DEVICE_POLLING */ - if (ISPL(frame.tf_cs) == SEL_UPL) { /* user trap */ Index: dev/em/if_em.c =================================================================== RCS file: /home/ncvs/src/sys/dev/em/if_em.c,v retrieving revision 1.73 diff -u -r1.73 if_em.c --- dev/em/if_em.c 29 Sep 2005 13:23:34 -0000 1.73 +++ dev/em/if_em.c 30 Sep 2005 15:17:05 -0000 @@ -197,6 +197,9 @@ static void em_add_int_delay_sysctl(struct adapter *, const char *, const char *, struct em_int_delay_info *, int, int); +#ifdef DEVICE_POLLING +static poll_handler_t em_poll; +#endif /********************************************************************* * FreeBSD Device Interface Entry Points @@ -526,6 +529,11 @@ INIT_DEBUGOUT("em_detach: begin"); +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif + EM_LOCK(adapter); adapter->in_detach = 1; em_stop(adapter); @@ -717,7 +725,7 @@ em_initialize_receive_unit(adapter); } #ifdef DEVICE_POLLING - if (!(ifp->if_flags & IFF_POLLING)) + if (!(ifp->if_capenable & IFCAP_POLLING)) #endif em_enable_intr(adapter); EM_UNLOCK(adapter); @@ -732,8 +740,26 @@ IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFCAP (Set Capabilities)"); reinit = 0; mask = ifr->ifr_reqcap ^ ifp->if_capenable; - if (mask & IFCAP_POLLING) - ifp->if_capenable ^= IFCAP_POLLING; +#ifdef DEVICE_POLLING + if (mask & IFCAP_POLLING) { + if (ifr->ifr_reqcap & IFCAP_POLLING) { + error = ether_poll_register(em_poll, ifp); + if (error) + return(error); + EM_LOCK(adapter); + em_disable_intr(adapter); + ifp->if_capenable |= IFCAP_POLLING; + EM_UNLOCK(adapter); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupt even in error case */ + EM_LOCK(adapter); + em_enable_intr(adapter); + ifp->if_capenable &= ~IFCAP_POLLING; + EM_UNLOCK(adapter); + } + } +#endif if (mask & IFCAP_HWCSUM) { ifp->if_capenable ^= IFCAP_HWCSUM; reinit = 1; @@ -895,7 +921,7 @@ * Only enable interrupts if we are not polling, make sure * they are off otherwise. */ - if (ifp->if_flags & IFF_POLLING) + if (ifp->if_capenable & IFCAP_POLLING) em_disable_intr(adapter); else #endif /* DEVICE_POLLING */ @@ -920,8 +946,6 @@ #ifdef DEVICE_POLLING -static poll_handler_t em_poll; - static void em_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { @@ -930,14 +954,6 @@ mtx_assert(&adapter->mtx, MA_OWNED); - if (!(ifp->if_capenable & IFCAP_POLLING)) { - ether_poll_deregister(ifp); - cmd = POLL_DEREGISTER; - } - if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ - em_enable_intr(adapter); - return; - } if (cmd == POLL_AND_CHECK_STATUS) { reg_icr = E1000_READ_REG(&adapter->hw, ICR); if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) { @@ -948,13 +964,10 @@ callout_reset(&adapter->timer, hz, em_local_timer, adapter); } } - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - em_process_receive_interrupts(adapter, count); - em_clean_transmit_interrupts(adapter); - } + em_process_receive_interrupts(adapter, count); + em_clean_transmit_interrupts(adapter); - if (ifp->if_drv_flags & IFF_DRV_RUNNING && - !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) em_start_locked(ifp); } @@ -964,7 +977,8 @@ struct adapter *adapter = ifp->if_softc; EM_LOCK(adapter); - em_poll_locked(ifp, cmd, count); + if (ifp->if_drv_flags & IFF_DRV_RUNNING) + em_poll_locked(ifp, cmd, count); EM_UNLOCK(adapter); } #endif /* DEVICE_POLLING */ @@ -987,18 +1001,10 @@ ifp = adapter->ifp; #ifdef DEVICE_POLLING - if (ifp->if_flags & IFF_POLLING) { + if (ifp->if_capenable & IFCAP_POLLING) { EM_UNLOCK(adapter); return; } - - if ((ifp->if_capenable & IFCAP_POLLING) && - ether_poll_register(em_poll, ifp)) { - em_disable_intr(adapter); - em_poll_locked(ifp, 0, 1); - EM_UNLOCK(adapter); - return; - } #endif /* DEVICE_POLLING */ reg_icr = E1000_READ_REG(&adapter->hw, ICR); @@ -1718,9 +1724,7 @@ mtx_assert(&adapter->mtx, MA_OWNED); INIT_DEBUGOUT("em_stop: begin"); -#ifdef DEVICE_POLLING - ether_poll_deregister(ifp); -#endif + em_disable_intr(adapter); em_reset_hw(&adapter->hw); callout_stop(&adapter->timer); @@ -1976,7 +1980,6 @@ #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING; #endif /* Index: dev/fxp/if_fxp.c =================================================================== RCS file: /home/ncvs/src/sys/dev/fxp/if_fxp.c,v retrieving revision 1.247 diff -u -r1.247 if_fxp.c --- dev/fxp/if_fxp.c 27 Sep 2005 09:01:10 -0000 1.247 +++ dev/fxp/if_fxp.c 30 Sep 2005 15:37:08 -0000 @@ -773,7 +773,6 @@ #ifdef DEVICE_POLLING /* Inform the world we support polling. */ ifp->if_capabilities |= IFCAP_POLLING; - ifp->if_capenable |= IFCAP_POLLING; #endif /* @@ -891,6 +890,11 @@ { struct fxp_softc *sc = device_get_softc(dev); +#ifdef DEVICE_POLLING + if (sc->ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(sc->ifp); +#endif + FXP_LOCK(sc); sc->suspended = 1; /* Do same thing as we do for suspend */ /* @@ -1448,15 +1452,11 @@ uint8_t statack; FXP_LOCK(sc); - if (!(ifp->if_capenable & IFCAP_POLLING)) { - ether_poll_deregister(ifp); - cmd = POLL_DEREGISTER; - } - if (cmd == POLL_DEREGISTER) { /* final call, enable interrupts */ - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); + if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) { FXP_UNLOCK(sc); return; } + statack = FXP_SCB_STATACK_CXTNO | FXP_SCB_STATACK_CNA | FXP_SCB_STATACK_FR; if (cmd == POLL_AND_CHECK_STATUS) { @@ -1495,18 +1495,10 @@ } #ifdef DEVICE_POLLING - if (ifp->if_flags & IFF_POLLING) { + if (ifp->if_capenable & IFCAP_POLLING) { FXP_UNLOCK(sc); return; } - if ((ifp->if_capenable & IFCAP_POLLING) && - ether_poll_register(fxp_poll, ifp)) { - /* disable interrupts */ - CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); - FXP_UNLOCK(sc); - fxp_poll(ifp, 0, 1); - return; - } #endif while ((statack = CSR_READ_1(sc, FXP_CSR_SCB_STATACK)) != 0) { /* @@ -1837,9 +1829,6 @@ ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); ifp->if_timer = 0; -#ifdef DEVICE_POLLING - ether_poll_deregister(ifp); -#endif /* * Cancel stats updater. */ @@ -2163,7 +2152,7 @@ * ... but only do that if we are not polling. And because (presumably) * the default is interrupts on, we need to disable them explicitly! */ - if ( ifp->if_flags & IFF_POLLING ) + if (ifp->if_capenable & IFCAP_POLLING ) CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, FXP_SCB_INTR_DISABLE); else #endif /* DEVICE_POLLING */ @@ -2418,11 +2407,30 @@ break; case SIOCSIFCAP: - FXP_LOCK(sc); mask = ifp->if_capenable ^ ifr->ifr_reqcap; - if (mask & IFCAP_POLLING) - ifp->if_capenable ^= IFCAP_POLLING; +#ifdef DEVICE_POLLING + if (mask & IFCAP_POLLING) { + if (ifr->ifr_reqcap & IFCAP_POLLING) { + error = ether_poll_register(fxp_poll, ifp); + if (error) + return(error); + FXP_LOCK(sc); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, + FXP_SCB_INTR_DISABLE); + ifp->if_capenable |= IFCAP_POLLING; + FXP_UNLOCK(sc); + } else { + error = ether_poll_deregister(ifp); + /* Enable interrupts in any case */ + FXP_LOCK(sc); + CSR_WRITE_1(sc, FXP_CSR_SCB_INTRCNTL, 0); + ifp->if_capenable &= ~IFCAP_POLLING; + FXP_UNLOCK(sc); + } + } +#endif if (mask & IFCAP_VLAN_MTU) { + FXP_LOCK(sc); ifp->if_capenable ^= IFCAP_VLAN_MTU; if (sc->revision != FXP_REV_82557) flag = FXP_FLAG_LONG_PKT_EN; @@ -2431,8 +2439,8 @@ sc->flags ^= flag; if (ifp->if_flags & IFF_UP) fxp_init_body(sc); + FXP_UNLOCK(sc); } - FXP_UNLOCK(sc); break; default: Index: i386/i386/trap.c =================================================================== RCS file: /home/ncvs/src/sys/i386/i386/trap.c,v retrieving revision 1.280 diff -u -r1.280 trap.c --- i386/i386/trap.c 28 Sep 2005 07:03:03 -0000 1.280 +++ i386/i386/trap.c 29 Sep 2005 09:42:21 -0000 @@ -160,11 +160,6 @@ extern char *syscallnames[]; #endif -#ifdef DEVICE_POLLING -extern u_int32_t poll_in_trap; -extern int ether_poll(int count); -#endif /* DEVICE_POLLING */ - /* * Exception, fault, and trap interface to the FreeBSD kernel. * This common code is called from assembly language IDT gate entry @@ -272,11 +267,6 @@ trap_fatal(&frame, eva); } -#ifdef DEVICE_POLLING - if (poll_in_trap) - ether_poll(poll_in_trap); -#endif /* DEVICE_POLLING */ - if ((ISPL(frame.tf_cs) == SEL_UPL) || ((frame.tf_eflags & PSL_VM) && !(PCPU_GET(curpcb)->pcb_flags & PCB_VM86CALL))) { Index: kern/kern_poll.c =================================================================== RCS file: /home/ncvs/src/sys/kern/kern_poll.c,v retrieving revision 1.22 diff -u -r1.22 kern_poll.c --- kern/kern_poll.c 6 Sep 2005 11:09:18 -0000 1.22 +++ kern/kern_poll.c 30 Sep 2005 14:52:25 -0000 @@ -32,6 +32,7 @@ #include #include #include /* needed by net/if.h */ +#include #include #include @@ -44,14 +45,15 @@ static void netisr_poll(void); /* the two netisr handlers */ static void netisr_pollmore(void); +static int poll_switch(SYSCTL_HANDLER_ARGS); void hardclock_device_poll(void); /* hook from hardclock */ -void ether_poll(int); /* polling while in trap */ +void ether_poll(int); /* polling in idle loop */ /* * Polling support for [network] device drivers. * - * Drivers which support this feature try to register with the + * Drivers which support this feature can register with the * polling code. * * If registration is successful, the driver must disable interrupts, @@ -64,10 +66,6 @@ * POLL_AND_CHECK_STATUS: as above, plus check status registers or do * other more expensive operations. This command is issued periodically * but less frequently than POLL_ONLY. - * POLL_DEREGISTER: deregister and return to interrupt mode. - * - * The first two commands are only issued if the interface is marked as - * 'IFF_UP and IFF_DRV_RUNNING', the last one only if IFF_DRV_RUNNING is set. * * The count limit specifies how much work the handler can do during the * call -- typically this is the number of packets to be received, or @@ -75,11 +73,9 @@ * as the max time spent in the function grows roughly linearly with the * count). * - * Deregistration can be requested by the driver itself (typically in the - * *_stop() routine), or by the polling code, by invoking the handler. - * - * Polling can be globally enabled or disabled with the sysctl variable - * kern.polling.enable (default is 0, disabled) + * Polling is enabled and disabled via setting IFCAP_POLLING flag on + * the interface. The driver ioctl handler should register interface + * with polling and disable interrupts, if registration was successful. * * A second variable controls the sharing of CPU between polling/kernel * network processing, and other activities (typically userlevel tasks): @@ -91,7 +87,7 @@ * The following constraints hold * * 1 <= poll_each_burst <= poll_burst <= poll_burst_max - * 0 <= poll_in_trap <= poll_each_burst + * 0 <= poll_each_burst * MIN_POLL_BURST_MAX <= poll_burst_max <= MAX_POLL_BURST_MAX */ @@ -117,10 +113,6 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, idle_poll, CTLFLAG_RW, &poll_in_idle_loop, 0, "Enable device polling in idle loop"); -u_int32_t poll_in_trap; /* used in trap.c */ -SYSCTL_UINT(_kern_polling, OID_AUTO, poll_in_trap, CTLFLAG_RW, - &poll_in_trap, 0, "Poll burst size during a trap"); - static u_int32_t user_frac = 50; SYSCTL_UINT(_kern_polling, OID_AUTO, user_frac, CTLFLAG_RW, &user_frac, 0, "Desired user fraction of cpu time"); @@ -149,9 +141,9 @@ SYSCTL_UINT(_kern_polling, OID_AUTO, handlers, CTLFLAG_RD, &poll_handlers, 0, "Number of registered poll handlers"); -static int polling = 0; /* global polling enable */ -SYSCTL_UINT(_kern_polling, OID_AUTO, enable, CTLFLAG_RW, - &polling, 0, "Polling enabled"); +static int polling = 0; +SYSCTL_PROC(_kern_polling, OID_AUTO, enable, CTLTYPE_UINT | CTLFLAG_RW, + 0, sizeof(int), poll_switch, "I", "Switch polling for all interfaces"); static u_int32_t phase; SYSCTL_UINT(_kern_polling, OID_AUTO, phase, CTLFLAG_RW, @@ -174,23 +166,9 @@ struct pollrec { poll_handler_t *handler; struct ifnet *ifp; - /* - * Flags of polling record (protected by poll_mtx). - * PRF_RUNNING means that the handler is now executing. - * PRF_LEAVING means that the handler is now deregistering. - */ -#define PRF_RUNNING 0x1 -#define PRF_LEAVING 0x2 - uint32_t flags; }; static struct pollrec pr[POLL_LIST_LEN]; - -#define PR_VALID(i) (pr[(i)].handler != NULL && \ - !(pr[(i)].flags & (PRF_RUNNING|PRF_LEAVING)) && \ - (pr[(i)].ifp->if_drv_flags & IFF_DRV_RUNNING) &&\ - (pr[(i)].ifp->if_flags & IFF_UP)) - static struct mtx poll_mtx; static void @@ -258,30 +236,24 @@ } /* - * ether_poll is called from the idle loop or from the trap handler. + * ether_poll is called from the idle loop. */ void ether_poll(int count) { int i; + NET_LOCK_GIANT(); mtx_lock(&poll_mtx); if (count > poll_each_burst) count = poll_each_burst; - for (i = 0 ; i < poll_handlers ; i++) { - if (PR_VALID(i)) { - pr[i].flags |= PRF_RUNNING; - mtx_unlock(&poll_mtx); - NET_LOCK_GIANT(); - pr[i].handler(pr[i].ifp, POLL_ONLY, count); - NET_UNLOCK_GIANT(); - mtx_lock(&poll_mtx); - pr[i].flags &= ~PRF_RUNNING; - } - } + for (i = 0 ; i < poll_handlers ; i++) + pr[i].handler(pr[i].ifp, POLL_ONLY, count); + mtx_unlock(&poll_mtx); + NET_UNLOCK_GIANT(); } /* @@ -403,60 +375,29 @@ residual_burst : poll_each_burst; residual_burst -= cycles; - if (polling) { - for (i = 0 ; i < poll_handlers ; i++) { - if (PR_VALID(i)) { - pr[i].flags |= PRF_RUNNING; - mtx_unlock(&poll_mtx); - pr[i].handler(pr[i].ifp, arg, cycles); - mtx_lock(&poll_mtx); - pr[i].flags &= ~PRF_RUNNING; - } - } - } else { /* unregister */ - for (i = 0 ; i < poll_handlers ; i++) { - if (pr[i].handler != NULL && - pr[i].ifp->if_drv_flags & IFF_DRV_RUNNING) { - pr[i].ifp->if_flags &= ~IFF_POLLING; - pr[i].flags |= PRF_LEAVING; - mtx_unlock(&poll_mtx); - pr[i].handler(pr[i].ifp, POLL_DEREGISTER, 1); - mtx_lock(&poll_mtx); - pr[i].flags &= ~PRF_LEAVING; - } - pr[i].handler = NULL; - } - residual_burst = 0; - poll_handlers = 0; - } + for (i = 0 ; i < poll_handlers ; i++) + pr[i].handler(pr[i].ifp, arg, cycles); phase = 4; mtx_unlock(&poll_mtx); } /* - * Try to register routine for polling. Returns 1 if successful - * (and polling should be enabled), 0 otherwise. + * Try to register routine for polling. Returns 0 if successful + * (and polling should be enabled), error code otherwise. * A device is not supposed to register itself multiple times. * - * This is called from within the *_intr() functions, so we do not need - * further ifnet locking. + * This is called from within the *_ioctl() functions. */ int ether_poll_register(poll_handler_t *h, struct ifnet *ifp) { int i; - NET_ASSERT_GIANT(); + KASSERT(h != NULL, ("%s: handler is NULL", __func__)); + KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); - if (polling == 0) /* polling disabled, cannot register */ - return 0; - if (h == NULL || ifp == NULL) /* bad arguments */ - return 0; - if ( !(ifp->if_flags & IFF_UP) ) /* must be up */ - return 0; - if (ifp->if_flags & IFF_POLLING) /* already polling */ - return 0; + NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); if (poll_handlers >= POLL_LIST_LEN) { @@ -474,7 +415,7 @@ verbose--; } mtx_unlock(&poll_mtx); - return 0; /* no polling for you */ + return (ENOMEM); /* no polling for you */ } for (i = 0 ; i < poll_handlers ; i++) @@ -482,45 +423,39 @@ mtx_unlock(&poll_mtx); log(LOG_DEBUG, "ether_poll_register: %s: handler" " already registered\n", ifp->if_xname); - return (0); + return (EEXIST); } pr[poll_handlers].handler = h; pr[poll_handlers].ifp = ifp; poll_handlers++; - ifp->if_flags |= IFF_POLLING; mtx_unlock(&poll_mtx); if (idlepoll_sleeping) wakeup(&idlepoll_sleeping); - return 1; /* polling enabled in next call */ + return (0); } /* - * Remove interface from the polling list. Normally called by *_stop(). - * It is not an error to call it with IFF_POLLING clear, the call is - * sufficiently rare to be preferable to save the space for the extra - * test in each driver in exchange of one additional function call. + * Remove interface from the polling list. Called from *_ioctl(), too. */ int ether_poll_deregister(struct ifnet *ifp) { int i; - NET_ASSERT_GIANT(); + KASSERT(ifp != NULL, ("%s: ifp is NULL", __func__)); - if ( !ifp || !(ifp->if_flags & IFF_POLLING) ) { - return 0; - } + NET_ASSERT_GIANT(); mtx_lock(&poll_mtx); + for (i = 0 ; i < poll_handlers ; i++) if (pr[i].ifp == ifp) /* found it */ break; - ifp->if_flags &= ~IFF_POLLING; /* found or not... */ if (i == poll_handlers) { - mtx_unlock(&poll_mtx); log(LOG_DEBUG, "ether_poll_deregister: %s: not found!\n", ifp->if_xname); - return (0); + mtx_unlock(&poll_mtx); + return (ENOENT); } poll_handlers--; if (i < poll_handlers) { /* Last entry replaces this one. */ @@ -528,7 +463,60 @@ pr[i].ifp = pr[poll_handlers].ifp; } mtx_unlock(&poll_mtx); - return (1); + return (0); +} + +/* + * Legacy interface for turning polling on all interfaces at one time. + */ +static int +poll_switch(SYSCTL_HANDLER_ARGS) +{ + struct ifnet *ifp; + int error; + int val; + + mtx_lock(&poll_mtx); + val = polling; + mtx_unlock(&poll_mtx); + + error = sysctl_handle_int(oidp, &val, sizeof(int), req); + if (error || !req->newptr ) + return (error); + + if (val == polling) + return (0); + + if (val < 0 || val > 1) + return (EINVAL); + + mtx_lock(&poll_mtx); + polling = val; + mtx_unlock(&poll_mtx); + + NET_LOCK_GIANT(); + IFNET_RLOCK(); + TAILQ_FOREACH(ifp, &ifnet, if_link) { + if (ifp->if_capabilities & IFCAP_POLLING) { + struct ifreq ifr; + + if (val == 1) + ifr.ifr_reqcap = + ifp->if_capenable | IFCAP_POLLING; + else + ifr.ifr_reqcap = + ifp->if_capenable & ~IFCAP_POLLING; + IFF_LOCKGIANT(ifp); /* LOR here */ + (void) (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr); + IFF_UNLOCKGIANT(ifp); + } + } + IFNET_RUNLOCK(); + NET_UNLOCK_GIANT(); + + log(LOG_ERR, "kern.polling.enable is deprecated. Use ifconfig(8)"); + + return (0); } static void Index: net/if.h =================================================================== RCS file: /home/ncvs/src/sys/net/if.h,v retrieving revision 1.98 diff -u -r1.98 if.h --- net/if.h 9 Aug 2005 12:56:20 -0000 1.98 +++ net/if.h 29 Sep 2005 11:25:05 -0000 @@ -148,7 +148,7 @@ #define IFF_LINK2 0x4000 /* per link layer defined bit */ #define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ #define IFF_MULTICAST 0x8000 /* (i) supports multicast */ -#define IFF_POLLING 0x10000 /* (n) Interface is in polling mode. */ +/* 0x10000 */ #define IFF_PPROMISC 0x20000 /* (n) user-requested promisc mode */ #define IFF_MONITOR 0x40000 /* (n) user-requested monitor mode */ #define IFF_STATICARP 0x80000 /* (n) static ARP */ @@ -166,8 +166,7 @@ /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_DRV_RUNNING|IFF_DRV_OACTIVE|\ - IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC|\ - IFF_POLLING) + IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC) /* * Values for if_link_state. Index: net/if_var.h =================================================================== RCS file: /home/ncvs/src/sys/net/if_var.h,v retrieving revision 1.102 diff -u -r1.102 if_var.h --- net/if_var.h 9 Aug 2005 10:16:17 -0000 1.102 +++ net/if_var.h 29 Sep 2005 10:19:43 -0000 @@ -660,7 +660,7 @@ LLADDR((struct sockaddr_dl *) ifaddr_byindex((ifp)->if_index)->ifa_addr) #ifdef DEVICE_POLLING -enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS, POLL_DEREGISTER }; +enum poll_cmd { POLL_ONLY, POLL_AND_CHECK_STATUS }; typedef void poll_handler_t(struct ifnet *ifp, enum poll_cmd cmd, int count); int ether_poll_register(poll_handler_t *h, struct ifnet *ifp); --5/uDoXvLw7AC5HRs-- From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 16:22:40 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 8C95316A41F for ; Fri, 30 Sep 2005 16:22:40 +0000 (GMT) (envelope-from khaled@ipbill.com) Received: from mail.ipbill.com (mail.ipbill.com [217.73.64.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6358143D55 for ; Fri, 30 Sep 2005 16:22:39 +0000 (GMT) (envelope-from khaled@ipbill.com) Received: (qmail 99473 invoked from network); 30 Sep 2005 15:22:37 -0000 Received: from unknown (HELO khaledpc) (192.168.129.200) by mail.ipbill.com with SMTP; 30 Sep 2005 15:22:37 -0000 From: "Khaled" To: "FreeBSD General" Date: Fri, 30 Sep 2005 16:22:02 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Importance: Normal Subject: arplookup/arpresolved failure messages in mailserver X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 16:22:40 -0000 Hi, I am seeing a lot of these messages in my /var/log/messages directory and cannot understand why: arplookup 192.168.0.12 failed: could not allocate llinfo arpresolve: can't allocate llinfo for 192.168.0.12rt There were more of these messages for two other IPs (one external), but this is the only one with 'rt' trailed at the end of the IP. Whats this for? Its been happenning since yesterday and it seems that the server is attempting this every 2-3 seconds, which I think is the cause for a sluggish mailserver (this litterally happened over night!). Also, would this be linked to another incident which meant that all mail was being dumped in queue (im running qmail MTA)? Following a restart of the mail server, we experienced routing problems such that we were not able to access the server from the office LAN but could be accessed by another machine on its LAN; zebrad and ospfd did not start at restart. Why was this? This morning, all seems to be fine accept a couple of the following messages from last night: Sep 29 16:08:26 freebsd10 /kernel: arplookup 217.73.66.16 failed: host is not on local network Sep 29 17:40:50 freebsd10 /kernel: arplookup 217.73.66.16 failed: host is not on local network Sep 29 23:46:38 freebsd10 /kernel: arplookup 217.73.66.16 failed: host is not on local network Forgive me for being such a novice...but I am :) Thanks Khaled From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 16:58:54 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 6979416A41F for ; Fri, 30 Sep 2005 16:58:54 +0000 (GMT) (envelope-from gbryant@roamingsolutions.net) Received: from basillia.speedxs.net (basillia.speedxs.net [83.98.255.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1452943D48 for ; Fri, 30 Sep 2005 16:58:53 +0000 (GMT) (envelope-from gbryant@roamingsolutions.net) Received: from ongers.net (ongers.speedxs.nl [83.98.237.210]) by basillia.speedxs.net (Postfix) with ESMTP id B54FF7071 for ; Fri, 30 Sep 2005 18:47:26 +0200 (CEST) Received: from (66.110.35.16 [66.110.35.16]) by MailEnable Inbound Mail Agent with ESMTP; Fri, 30 Sep 2005 19:03:47 +0200 Message-ID: <433D6EDF.4040208@roamingsolutions.net> Date: Fri, 30 Sep 2005 18:59:11 +0200 From: G Bryant User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: alias vs clone X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 16:58:54 -0000 Can anybody please help with problem. Using natd and ipfw and trying to fwd packets to a non-default router out the same interface. Currently using alias for the second ip, but it doesn't seem to be working for some some reason I'm missing. Would clone maybe work? Any advice would be appreciated. Thanks Graham From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 18:13:41 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 ECDAA16A41F; Fri, 30 Sep 2005 18:13:41 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3012043D49; Fri, 30 Sep 2005 18:13:41 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 8273B52CD0; Fri, 30 Sep 2005 20:13:39 +0200 (CEST) Received: from localhost (dlr254.neoplus.adsl.tpnet.pl [83.24.47.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 21B2A52CA8; Fri, 30 Sep 2005 20:13:31 +0200 (CEST) Date: Fri, 30 Sep 2005 20:13:22 +0200 From: Pawel Jakub Dawidek To: Gleb Smirnoff Message-ID: <20050930181322.GB1768@garage.freebsd.pl> References: <20050930124000.GA45345@cell.sick.ru> <20050930160302.GJ45345@cell.sick.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline In-Reply-To: <20050930160302.GJ45345@cell.sick.ru> X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng devel (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_00,RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: arch@FreeBSD.org, net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 18:13:42 -0000 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 30, 2005 at 08:03:02PM +0400, Gleb Smirnoff wrote: +> On Fri, Sep 30, 2005 at 04:40:00PM +0400, Gleb Smirnoff wrote: +> T> [please, follow-up on net@ only] +> T>=20 +> T> Colleagues, +> T>=20 +> T> here are some patches for review. +>=20 +> I have some changes to patch after last compile, and haven't tested them= =20 +> befire sending patch. Here is an updated one. BTW. Not compiling in DEVICE_POLLING has any advantages except few bytes smaller kernel? I wonder if we could drop yet another kernel option and just set kern.poll.enable to 0 by default. If adding DEVICE_POLLING to the kernel doesn't cost additional locking, etc. in network data flow paths (which could lead to performance impact in some specific environments) can we just compile the code in always? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --VbJkn9YxBvnuCH5J Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDPYBCForvXbEpPzQRAu1KAKC82f6oU99yWlmLAzPKd2mBdTjWugCfU6Tn 12z9G0H9OQwENzjjVXQXMKA= =dcOn -----END PGP SIGNATURE----- --VbJkn9YxBvnuCH5J-- From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 18:23:28 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 ADA2616A41F; Fri, 30 Sep 2005 18:23:28 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 02E3243D48; Fri, 30 Sep 2005 18:23:27 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8UINQ2m049001 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Sep 2005 22:23:26 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8UINQWT049000; Fri, 30 Sep 2005 22:23:26 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 30 Sep 2005 22:23:25 +0400 From: Gleb Smirnoff To: Pawel Jakub Dawidek Message-ID: <20050930182325.GO45345@cell.sick.ru> References: <20050930124000.GA45345@cell.sick.ru> <20050930160302.GJ45345@cell.sick.ru> <20050930181322.GB1768@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20050930181322.GB1768@garage.freebsd.pl> User-Agent: Mutt/1.5.6i Cc: arch@FreeBSD.org, net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 18:23:28 -0000 On Fri, Sep 30, 2005 at 08:13:22PM +0200, Pawel Jakub Dawidek wrote: P> On Fri, Sep 30, 2005 at 08:03:02PM +0400, Gleb Smirnoff wrote: P> +> On Fri, Sep 30, 2005 at 04:40:00PM +0400, Gleb Smirnoff wrote: P> +> T> [please, follow-up on net@ only] P> +> T> P> +> T> Colleagues, P> +> T> P> +> T> here are some patches for review. P> +> P> +> I have some changes to patch after last compile, and haven't tested them P> +> befire sending patch. Here is an updated one. P> P> BTW. Not compiling in DEVICE_POLLING has any advantages except few bytes P> smaller kernel? P> I wonder if we could drop yet another kernel option and just set P> kern.poll.enable to 0 by default. P> If adding DEVICE_POLLING to the kernel doesn't cost additional locking, etc. P> in network data flow paths (which could lead to performance impact in some P> specific environments) can we just compile the code in always? It adds a stub function call every tick. The function returns almost immediately if no interfaces do polling. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 18:29:41 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 EB8C716A422 for ; Fri, 30 Sep 2005 18:29:41 +0000 (GMT) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35A7643D49 for ; Fri, 30 Sep 2005 18:29:39 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 4434 invoked from network); 30 Sep 2005 18:01:56 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.53]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 30 Sep 2005 18:01:56 -0000 Message-ID: <433D8417.D4666378@freebsd.org> Date: Fri, 30 Sep 2005 20:29:43 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Gleb Smirnoff References: <20050930124000.GA45345@cell.sick.ru> <20050930160302.GJ45345@cell.sick.ru> <20050930181322.GB1768@garage.freebsd.pl> <20050930182325.GO45345@cell.sick.ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@FreeBSD.org, Pawel Jakub Dawidek , net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 18:29:42 -0000 Gleb Smirnoff wrote: > > On Fri, Sep 30, 2005 at 08:13:22PM +0200, Pawel Jakub Dawidek wrote: > P> On Fri, Sep 30, 2005 at 08:03:02PM +0400, Gleb Smirnoff wrote: > P> +> On Fri, Sep 30, 2005 at 04:40:00PM +0400, Gleb Smirnoff wrote: > P> +> T> [please, follow-up on net@ only] > P> +> T> > P> +> T> Colleagues, > P> +> T> > P> +> T> here are some patches for review. > P> +> > P> +> I have some changes to patch after last compile, and haven't tested them > P> +> befire sending patch. Here is an updated one. > P> > P> BTW. Not compiling in DEVICE_POLLING has any advantages except few bytes > P> smaller kernel? > P> I wonder if we could drop yet another kernel option and just set > P> kern.poll.enable to 0 by default. > P> If adding DEVICE_POLLING to the kernel doesn't cost additional locking, etc. > P> in network data flow paths (which could lead to performance impact in some > P> specific environments) can we just compile the code in always? > > It adds a stub function call every tick. The function returns almost > immediately if no interfaces do polling. If it does a FOREACH(interface) then it should stay as a kernel option. -- Andre From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 19:33:34 2005 Return-Path: X-Original-To: net@freebsd.org 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 3C27016A41F; Fri, 30 Sep 2005 19:33:34 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id E85AD43D48; Fri, 30 Sep 2005 19:33:33 +0000 (GMT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.12.11) with ESMTP id j8UJXXfT048897; Fri, 30 Sep 2005 12:33:33 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j8UJXX1Z048896; Fri, 30 Sep 2005 12:33:33 -0700 (PDT) (envelope-from rizzo) Date: Fri, 30 Sep 2005 12:33:33 -0700 From: Luigi Rizzo To: Andre Oppermann Message-ID: <20050930123333.A48015@xorpc.icir.org> References: <20050930124000.GA45345@cell.sick.ru> <20050930160302.GJ45345@cell.sick.ru> <20050930181322.GB1768@garage.freebsd.pl> <20050930182325.GO45345@cell.sick.ru> <433D8417.D4666378@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <433D8417.D4666378@freebsd.org>; from andre@freebsd.org on Fri, Sep 30, 2005 at 08:29:43PM +0200 Cc: arch@freebsd.org, Pawel Jakub Dawidek , net@freebsd.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 19:33:34 -0000 On Fri, Sep 30, 2005 at 08:29:43PM +0200, Andre Oppermann wrote: ... > > It adds a stub function call every tick. The function returns almost > > immediately if no interfaces do polling. > > If it does a FOREACH(interface) then it should stay as a kernel option. this wasn't the case when i first wrote it - the list of interfaces actually using polling was stored into an array and the count was in a variable, so the loop was something like for (i=0; i < actively_polling_interfaces; i++) foo[i]->poll() so it's basically just an extra function call per tick if no interfaces are doing polling. cheers luigi From owner-freebsd-net@FreeBSD.ORG Fri Sep 30 21:17:20 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 C203216A41F; Fri, 30 Sep 2005 21:17:20 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1087143D48; Fri, 30 Sep 2005 21:17:19 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j8ULHHFs049824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Oct 2005 01:17:17 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j8ULHG74049823; Sat, 1 Oct 2005 01:17:16 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 1 Oct 2005 01:17:16 +0400 From: Gleb Smirnoff To: Andre Oppermann Message-ID: <20050930211716.GP45345@cell.sick.ru> References: <20050930124000.GA45345@cell.sick.ru> <20050930160302.GJ45345@cell.sick.ru> <20050930181322.GB1768@garage.freebsd.pl> <20050930182325.GO45345@cell.sick.ru> <433D8417.D4666378@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <433D8417.D4666378@freebsd.org> User-Agent: Mutt/1.5.6i Cc: arch@FreeBSD.org, Pawel Jakub Dawidek , net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2005 21:17:20 -0000 On Fri, Sep 30, 2005 at 08:29:43PM +0200, Andre Oppermann wrote: A> > It adds a stub function call every tick. The function returns almost A> > immediately if no interfaces do polling. A> A> If it does a FOREACH(interface) then it should stay as a kernel option. It isn't. Just 'if (poll_handlers == 0) return;'. Anyway, deoptionalizing polling would be a separate commit and discussion. -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE From owner-freebsd-net@FreeBSD.ORG Sat Oct 1 02:44:18 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 94BCA16A41F for ; Sat, 1 Oct 2005 02:44:18 +0000 (GMT) (envelope-from jesus@omniti.com) Received: from mail.omniti.com (longsword.omniti.com [66.80.117.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBAE143D48 for ; Sat, 1 Oct 2005 02:44:17 +0000 (GMT) (envelope-from jesus@omniti.com) Authentication-Results: mail.omniti.com smtp.user=jesus; auth=pass (LOGIN) DomainKey-Status: good X-DomainKeys: Ecelerity dk_sign implementing draft-delany-domainkeys-base-01 DomainKey-Signature: q=dns; a=rsa-sha1; c=nofws; s=test; d=omniti.com; h=Received:In-Reply-To:References:Mime-Version:Content-Type:Message-Id:Cc:Content-Transfer-Encoding:From:Subject:Date:To:X-Mailer; b=UvJCGiHnpDchcrlYMf5MyAwAXwpiKVIptJIADaINIMz3zD235QgnBCQLu/OfHE6u JxtfPsVNXR8L/aVRxv+QRow8IEDQ/t27CTk4qAHyqlKqylZS/SBkXvYQiMI8htEt Received: from ([68.55.212.69:59688] helo=[192.168.218.138]) by mail.omniti.com (ecelerity 2.0 r(6738)) with SMTP id 33/31-12789-BF7FD334 for ; Fri, 30 Sep 2005 22:44:16 -0400 In-Reply-To: <31021C278A7A6B4AB95E9A085C3552181F7608@bjngsmail01> References: <31021C278A7A6B4AB95E9A085C3552181F7608@bjngsmail01> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=UTF-8; delsp=yes; format=flowed Message-Id: <04DBCBC0-C334-48B6-8BD0-80A0DAB2BE93@omniti.com> Content-Transfer-Encoding: quoted-printable From: Theo Schlossnagle Date: Fri, 30 Sep 2005 22:44:07 -0400 To: Ganbold X-Mailer: Apple Mail (2.734) Cc: freebsd-net@freebsd.org, Marcin Jessa , Mao Shou Yan , Theo Schlossnagle Subject: Re: ipfw bridge + fwd questions X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 02:44:18 -0000 Allowing fwd rules on bridged traffic isn't too difficult, but does =20 require kernel modifications (in ipfw). As Mao says it can only work on layer 3 packets. But, that doesn't =20 mean you can't do it. It just means that when you add the FWD option =20= into the layer 2 ipfw switch statement you have to look deep enough =20 into the packet to make sure it is indeed IP and possible to fwd. =20 Then hand it up in the stack. We did this on one of our networking appliances. Basically, qualify =20 the packet in (args->eh) and then unlock the chain and ip_input to =20 push it into layer 3. On Sep 30, 2005, at 3:43 AM, Mao Shou Yan wrote: > NO, fwd can work only on layer 3 packet! > > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-=20 > net@freebsd.org] On Behalf Of Marcin Jessa > Sent: 2005=E5=B9=B49=E6=9C=8830=E6=97=A5 15:35 > To: Ganbold > Cc: freebsd-net@freebsd.org > Subject: Re: ipfw bridge + fwd questions > > On Fri, 30 Sep 2005 15:39:49 +0900 > Ganbold wrote: > > >> Hi, >> >> I have a question regarding ipfw fwd rule. >> I'm using FreeBSD 5.4-STABLE and running on it bridging firewall >> using ipfw. >> >> Now my question comes:) >> Can I use ipfw fwd rules against traffic coming to one of the bridged >> interfaces? >> > Yes you can. > sysctl net.link.ether.bridge_ipfw=3D1 just like in your sysctl =20 > variables. > > >> I would like to forward some packets (which are destined to port >> 110) >> to some other router through third vr0 interface. >> > Use a divert rule for that. > > In this example we send all the port 80 traffic to port 8000: > # ipfw add 1000 divert 8000 tcp from any to any 80 > Read this article for more info: > http://freebsd.rogness.net/snort_inline/ > > Cheers > Marcin. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Sat Oct 1 08:19:26 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 CA76C16A41F; Sat, 1 Oct 2005 08:19:26 +0000 (GMT) (envelope-from bsd@roamingsolutions.net) Received: from basillia.speedxs.net (basillia.speedxs.net [83.98.255.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 565BC43D49; Sat, 1 Oct 2005 08:19:24 +0000 (GMT) (envelope-from bsd@roamingsolutions.net) Received: from ongers.net (ongers.speedxs.nl [83.98.237.210]) by basillia.speedxs.net (Postfix) with ESMTP id CA4E37032; Sat, 1 Oct 2005 10:07:53 +0200 (CEST) Received: from (66.110.35.16 [66.110.35.16]) by MailEnable Inbound Mail Agent with ESMTP; Sat, 01 Oct 2005 10:24:22 +0200 Message-ID: <433E4697.70206@roamingsolutions.net> Date: Sat, 01 Oct 2005 10:19:35 +0200 From: G Bryant User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: FreeBSD , FreeBSD Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: alias ip and natd with ipfw fwd X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 08:19:26 -0000 Not sure if previous posts came through, so please forgive if this is a repeat. Can anybody please help with problem. Using natd and ipfw and trying to fwd packets to a non-default router out the same interface. Currently using alias for the second ip, but it doesn't seem to be working for some some reason I'm missing. Would clone maybe work? Any advice would be appreciated. Thanks Graham From owner-freebsd-net@FreeBSD.ORG Sat Oct 1 09:43:28 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 691F616A41F for ; Sat, 1 Oct 2005 09:43:28 +0000 (GMT) (envelope-from babolo@cicuta.babolo.ru) Received: from ints.mail.pike.ru (ints.mail.pike.ru [85.30.199.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFCDF43D4C for ; Sat, 1 Oct 2005 09:43:26 +0000 (GMT) (envelope-from babolo@cicuta.babolo.ru) Received: (qmail 15023 invoked from network); 1 Oct 2005 09:43:24 -0000 Received: from cicuta.babolo.ru (85.30.224.245) by ints.mail.pike.ru with SMTP; 1 Oct 2005 09:43:24 -0000 Received: (nullmailer pid 7050 invoked by uid 136); Sat, 01 Oct 2005 09:46:40 -0000 X-ELM-OSV: (Our standard violations) hdr-charset=KOI8-R; no-hdr-encoding=1 In-Reply-To: <433E4697.70206@roamingsolutions.net> To: G Bryant Date: Sat, 1 Oct 2005 13:46:40 +0400 (MSD) From: .@babolo.ru X-Mailer: ELM [version 2.4ME+ PL99b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <1128160000.491736.7049.nullmailer@cicuta.babolo.ru> Cc: FreeBSD , FreeBSD Subject: Re: alias ip and natd with ipfw fwd X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 09:43:28 -0000 > Can anybody please help with problem. > Using natd and ipfw and trying to fwd packets to a non-default router > out the same interface. > Currently using alias for the second ip, but it doesn't seem to be > working for some some reason I'm missing. Would clone maybe work? > Any advice would be appreciated. ipfw rules, ifconfig -a and natd options need to be demonstrated. From owner-freebsd-net@FreeBSD.ORG Sat Oct 1 10:13:42 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 48FB616A420; Sat, 1 Oct 2005 10:13:42 +0000 (GMT) (envelope-from bsd@roamingsolutions.net) Received: from basillia.speedxs.net (basillia.speedxs.net [83.98.255.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id A97B843D48; Sat, 1 Oct 2005 10:13:41 +0000 (GMT) (envelope-from bsd@roamingsolutions.net) Received: from ongers.net (ongers.speedxs.nl [83.98.237.210]) by basillia.speedxs.net (Postfix) with ESMTP id 783DC3D015; Sat, 1 Oct 2005 12:02:11 +0200 (CEST) Received: from (66.110.35.16 [66.110.35.16]) by MailEnable Inbound Mail Agent with ESMTP; Sat, 01 Oct 2005 12:18:39 +0200 Message-ID: <433E6135.3020005@roamingsolutions.net> Date: Sat, 01 Oct 2005 12:13:09 +0200 From: G Bryant User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en References: <1128160000.491736.7049.nullmailer@cicuta.babolo.ru> In-Reply-To: <1128160000.491736.7049.nullmailer@cicuta.babolo.ru> Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD , FreeBSD Subject: Re: alias ip and natd with ipfw fwd X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 10:13:42 -0000 # ifconfig -a rl0: flags=8843 mtu 1500 options=8 inet 192.168.8.70 netmask 0xffffff00 broadcast 192.168.8.255 inet 192.168.0.99 netmask 0xffffff00 broadcast 192.168.0.255 ether 00:11:95:5a:e2:da media: Ethernet autoselect (100baseTX ) status: active rl1: flags=8802 mtu 1500 options=8 ether 00:11:95:5a:e2:dc media: Ethernet autoselect (10baseT/UTP) status: no carrier vr0: flags=8943 mtu 1500 inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255 ether 00:11:09:08:11:c4 media: Ethernet autoselect (none) status: no carrier plip0: flags=108810 mtu 1500 lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 # ipfw show 00100 0 0 allow ip from any to any via lo0 00200 0 0 allow ip from 192.168.1.0/24 to any in 00300 0 0 allow ip from any to 192.168.1.0/24 out 00400 184 16728 allow ip from 192.168.0.0/16 to me in 00500 173 14810 allow ip from me to 192.168.0.0/16 out 08000 0 0 divert 8672 ip from any to 192.168.0.0/24 out 08100 0 0 allow ip from me to 192.168.0.0/24 out 08200 0 0 divert 8671 ip from any to 192.168.8.0/24 out 08300 0 0 allow ip from me to 192.168.8.0/24 out 09000 0 0 divert 8672 ip from any to 196.4.160.7 out 09100 0 0 check-state 09200 0 0 fwd 192.168.0.1 log logamount 10 ip from 192.168.0.99 to any out keep-state 09300 9 629 divert 8671 ip from any to any out 09400 9 629 allow ip from me to any out via rl0 09500 0 0 allow ip from any to any out 09600 0 0 divert 8672 ip from any to 192.168.0.99 in via rl0 09700 7 1123 divert 8671 ip from any to 192.168.8.70 in via rl0 09800 42 4241 allow ip from any to any in via rl0 09900 0 0 allow ip from any to any in via rl0 09999 0 0 deny log logamount 10 ip from any to any 65535 0 0 deny ip from any to any ## was testing the divert by pinging 196.4.160.7 # natd1.conf alias_address 192.168.8.70 pid_file /var/run/natd1.pid port natd1 # natd2.conf alias_address 192.168.0.99 pid_file /var/run/natd2.pid port natd2 "."@babolo.ru wrote: Can anybody please help with problem. Using natd and ipfw and trying to fwd packets to a non-default router out the same interface. Currently using alias for the second ip, but it doesn't seem to be working for some some reason I'm missing. Would clone maybe work? Any advice would be appreciated. ipfw rules, ifconfig -a and natd options need to be demonstrated. _______________________________________________ [1]freebsd-net@freebsd.org mailing list [2]http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to [3]"freebsd-net-unsubscribe@freebsd.org" References 1. mailto:freebsd-net@freebsd.org 2. http://lists.freebsd.org/mailman/listinfo/freebsd-net 3. mailto:freebsd-net-unsubscribe@freebsd.org From owner-freebsd-net@FreeBSD.ORG Sat Oct 1 13:15:35 2005 Return-Path: X-Original-To: net@FreeBSD.org 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 B356616A421; Sat, 1 Oct 2005 13:15:35 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 08ABD43D49; Sat, 1 Oct 2005 13:15:34 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j91DFXgZ005575; Sat, 1 Oct 2005 23:15:33 +1000 Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.13.4/8.13.4/Debian-3) with ESMTP id j91DFWm5007952; Sat, 1 Oct 2005 23:15:32 +1000 Date: Sat, 1 Oct 2005 23:15:32 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Gleb Smirnoff In-Reply-To: <20050930124000.GA45345@cell.sick.ru> Message-ID: <20051001221058.G1493@epsplex.bde.org> References: <20050930124000.GA45345@cell.sick.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: net@FreeBSD.org Subject: Re: [REVIEW/TEST] polling(4) changes X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 13:15:35 -0000 On Fri, 30 Sep 2005, Gleb Smirnoff wrote: > The attached patch removes: > ... > - poll in trap feature. Sorry, we can't acquire mutexes in trap(). Anyone > used it, anyway? This is the most broken part of DEVICE_POLLING (which I consider to be mostly broken). Hopefully no one used it. Poll in trap even polled in debugger traps, so userland could invoke polling by debugging any program, and ether_poll() was reentered if it was debugged (in RELENG_4, there is no relevant locking so ether_poll() then just raced itself; in old versions of -current I think Giant locking allowed the same since Giant is recursive; in -current I think this causes deadlock since poll_mtx is not recursive). > The attached patch touches only em(4) and fxp(4). I will write patches for all > other drivers ASAP. But I don't have all the hardware, so if you are using polling(4) > and you run FreeBSD 6 or 7, please help me with testing. ATM only em(4) driver patch > is tested. While you are there, please fix the configuration so that DEVICE_POLLING is a normal option. It is very far from being a global option. Bruce From owner-freebsd-net@FreeBSD.ORG Sat Oct 1 19:48:47 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 B672E16A41F for ; Sat, 1 Oct 2005 19:48:47 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1B62F43D49 for ; Sat, 1 Oct 2005 19:48:46 +0000 (GMT) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: from buffy.york.ac.uk (buffy-128.york.ac.uk [144.32.128.160]) by mail-gw0.york.ac.uk (8.12.10/8.12.10) with ESMTP id j91Jmhrc011664 for ; Sat, 1 Oct 2005 20:48:43 +0100 (BST) Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.13.4/8.13.4) with ESMTP id j91JmhI3007824 for ; Sat, 1 Oct 2005 20:48:43 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) Received: (from ga9@localhost) by buffy.york.ac.uk (8.13.4/8.13.4/Submit) id j91JmhDc007823 for freebsd-net@freebsd.org; Sat, 1 Oct 2005 20:48:43 +0100 (BST) (envelope-from gavin.atkinson@ury.york.ac.uk) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin.atkinson@ury.york.ac.uk using -f From: Gavin Atkinson To: freebsd-net@freebsd.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sat, 01 Oct 2005 20:48:42 +0100 Message-Id: <1128196122.7015.38.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin.atkinson@ury.york.ac.uk Subject: vlan(4), bge(4) and bringing parent interface up X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2005 19:48:47 -0000 Hi, It seems to me that assigning an IP address to a vlan device (parent device bge0) isn't enough to get the interface working - I need to manually bring the parent interface up. Freshly rebooted system with no network configuration in /etc/rc.conf wiggum# uname -a FreeBSD wiggum.york.ac.uk 6.0-BETA5 FreeBSD 6.0-BETA5 #2: Fri Sep 30 15:00:28 BST 2005 root@wiggum.york.ac.uk:/usr/obj/usr/src/sys/GENERIC amd64 wiggum# ifconfig -a bge0: flags=8802 mtu 1500 options=1a ether 00:09:3d:12:6c:06 media: Ethernet autoselect (10baseT/UTP ) status: active wiggum# ifconfig vlan66 inet 144.32.66.59 netmask 255.255.254.0 vlan 66 vlandev bge0 wiggum# ifconfig -a bge0: flags=8802 mtu 1500 options=1a ether 00:09:3d:12:6c:06 media: Ethernet autoselect (10baseT/UTP ) status: active vlan66: flags=8843 mtu 1500 inet 144.32.66.59 netmask 0xfffffe00 broadcast 144.32.67.255 inet6 fe80::209:3dff:fe12:6c06%vlan66 prefixlen 64 scopeid 0x4 ether 00:09:3d:12:6c:06 media: Ethernet autoselect (10baseT/UTP ) status: active vlan: 66 parent interface: bge0 wiggum# ping 144.32.66.200 PING 144.32.66.200 (144.32.66.200): 56 data bytes ^C --- 144.32.66.200 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss wiggum# ifconfig bge0 up wiggum# ifconfig -a bge0: flags=8843 mtu 1500 options=1a inet6 fe80::209:3dff:fe12:6c06%bge0 prefixlen 64 scopeid 0x1 ether 00:09:3d:12:6c:06 media: Ethernet autoselect (10baseT/UTP ) status: active vlan66: flags=8843 mtu 1500 inet 144.32.66.59 netmask 0xfffffe00 broadcast 144.32.67.255 inet6 fe80::209:3dff:fe12:6c06%vlan66 prefixlen 64 scopeid 0x4 ether 00:09:3d:12:6c:06 media: Ethernet autoselect (10baseT/UTP ) status: active vlan: 66 parent interface: bge0 wiggum# ping 144.32.66.200 PING 144.32.66.200 (144.32.66.200): 56 data bytes 64 bytes from 144.32.66.200: icmp_seq=0 ttl=128 time=0.880 ms 64 bytes from 144.32.66.200: icmp_seq=1 ttl=128 time=0.960 ms ^C --- 144.32.66.200 ping statistics --- 2 packets transmitted, 2 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.880/0.920/0.960/0.040 ms Is this expected? I suspect it's a bug in either the vlan layer, or the bge interface code, but if it is expected it would be good to see this documented. I don't ever remember having to do anything special to get fxp cards working with vlans. Thanks, Gavin