From owner-freebsd-net@FreeBSD.ORG Sun Aug 14 13:54: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 A2EEF16A41F for ; Sun, 14 Aug 2005 13:54:56 +0000 (GMT) (envelope-from allyann@allyann.demon.co.uk) Received: from anchor-post-32.mail.demon.net (anchor-post-32.mail.demon.net [194.217.242.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4453843D45 for ; Sun, 14 Aug 2005 13:54:55 +0000 (GMT) (envelope-from allyann@allyann.demon.co.uk) Received: from dynamic-62-56-51-223.park-s46b.dslaccess.co.uk ([62.56.51.223] helo=rwpuyfbgy1a4l0i) by anchor-post-32.mail.demon.net with esmtpa (AUTH allyann) (Exim 4.42) id 1E4Iww-000HEv-94 for freebsd-net@freebsd.org; Sun, 14 Aug 2005 13:54:54 +0000 Message-ID: <000501c5a0d7$d4bf5950$0201a8c0@rwpuyfbgy1a4l0i> From: "Alistair & Ann Dickson" To: Date: Sun, 14 Aug 2005 14:55:27 +0100 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: ADSL PPoA or RFC1483, any solutions ? 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, 14 Aug 2005 13:54:56 -0000 Hi there: I'm using a speedtouch broadband modem at the moment with my isp Demon. I have a laptop which I wish to network by a router. The router is U.S = Robotics. The laptop is using Windows 98 sec and, the PC is Windows xp = pro. I get connected but unable to access any WebPages from the PC. A = message comes up with ppoe is needed. I contacted my isp and they say = that they use ppoa. Is there any way I can get around this? Thank you Ally & Ann Dickson From owner-freebsd-net@FreeBSD.ORG Sun Aug 14 22:12: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 11E3E16A41F for ; Sun, 14 Aug 2005 22:12:34 +0000 (GMT) (envelope-from neon777@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7994843D45 for ; Sun, 14 Aug 2005 22:12:33 +0000 (GMT) (envelope-from neon777@gmail.com) Received: by nproxy.gmail.com with SMTP id c2so160060nfe for ; Sun, 14 Aug 2005 15:12:31 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Qc29aaGSmYRAWbkq2OIMFvEGUNvjebY0mfJZedvWgvCK7Qx4bgMtOL3/EtJNLgg6CG3R4F3/j1R0/X8m+VOYcB5xVBcJjax1s+h9kt840UoatHq12P8FUMdN+6MPdl6xmOf62i5FGKKSuaTqmySN2NyB3rJ946yHbw3QhInBnxQ= Received: by 10.48.143.1 with SMTP id q1mr79007nfd; Sun, 14 Aug 2005 15:12:31 -0700 (PDT) Received: by 10.48.249.20 with HTTP; Sun, 14 Aug 2005 15:12:31 -0700 (PDT) Message-ID: <46a3a47205081415122806a653@mail.gmail.com> Date: Mon, 15 Aug 2005 01:12:31 +0300 From: noname To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: why ng_bridge does not like 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, 14 Aug 2005 22:12:34 -0000 freebsd 5.4 stable. xl0 is connected via ng_bridge to ngeth0 in this way: [root@asd:~]# ifconfig xl0 up [root@asd:~]# ngctl mkpeer . eiface hook ether [root@asd:~]# ifconfig ngeth0 up [root@asd:~]# ngctl mkpeer xl0: bridge lower link0 [root@asd:~]# ngctl name xl0:lower mybridge [root@asd:~]# ngctl connect ngeth0: mybridge: lower link1 [root@asd:~]# ngctl connect ngeth0: mybridge: upper link2 [root@asd:~]# ngctl msg xl0: setautosrc 0 [root@asd:~]# ngctl msg xl0: setpromisc 1 [root@asd:~]# ifconfig ngeth0 ether 00:12:12:12:12:12 [root@asd:~]# dhclient ngeth0 using tcpdump I can see dhcp request leaving from ngeth0, passing through xl0, dhcp reply comes back through xl0 but it doesn't reach ngeth0. Why? If I give ip-address with ifconfig, everything works fine. Also getting ip with dhcp to xl0, without touching netgraph works fine. Any clues? From owner-freebsd-net@FreeBSD.ORG Mon Aug 15 11:01: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 916E016A41F for ; Mon, 15 Aug 2005 11:01:54 +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 4B3C943D49 for ; Mon, 15 Aug 2005 11:01:54 +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 j7FB1sUl007556 for ; Mon, 15 Aug 2005 11:01:54 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7FB1q7D007550 for freebsd-net@freebsd.org; Mon, 15 Aug 2005 11:01:52 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 15 Aug 2005 11:01:52 GMT Message-Id: <200508151101.j7FB1q7D007550@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, 15 Aug 2005 11:01:56 -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 Tue Aug 16 02:04: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 90AD516A41F for ; Tue, 16 Aug 2005 02:04:17 +0000 (GMT) (envelope-from boris@ntmk.ru) Received: from mail.ntmk.ru (mail.ntmk.ru [217.114.241.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2548F43D45 for ; Tue, 16 Aug 2005 02:04:16 +0000 (GMT) (envelope-from boris@ntmk.ru) Received: from boris.nikom.ru ([10.1.16.195]) by mail.ntmk.ru with esmtp (Exim 4.51) id 1E4qoI-0001vX-HZ for freebsd-net@freebsd.org; Tue, 16 Aug 2005 08:04:14 +0600 Message-ID: <4301499E.8040704@ntmk.ru> Date: Tue, 16 Aug 2005 08:04:14 +0600 From: Boris Kovalenko User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050809) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: PR bin/82306 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, 16 Aug 2005 02:04:17 -0000 Hello! Is there news on PR 82306? Will it be fixed at least with 5.5R? -- With respect, Boris From owner-freebsd-net@FreeBSD.ORG Tue Aug 16 05:28: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 CCA6F16A41F for ; Tue, 16 Aug 2005 05:28:28 +0000 (GMT) (envelope-from donatas@lrtc.net) Received: from mail.lrtc.lt (pegasus.lrtc.lt [217.9.240.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id F014F43D5A for ; Tue, 16 Aug 2005 05:28:27 +0000 (GMT) (envelope-from donatas@lrtc.net) Received: (qmail 1714 invoked from network); 16 Aug 2005 05:27:31 -0000 Received: from p2p-241-242-ird.vln0.lrtc.net (HELO donatas) (d.gendvilas@[217.9.241.242]) (envelope-sender ) by mail.lrtc.lt (qmail-ldap-1.03) with SMTP for ; 16 Aug 2005 05:27:31 -0000 Message-ID: <000d01c5a223$53799840$0500a8c0@donatas> From: "Donatas" To: "Julian Elischer" , References: <026001c59e7a$c6ca69c0$9f90a8c0@donatas> <42FBC0AE.8020803@elischer.org> <027701c59f02$0eb808a0$9f90a8c0@donatas> <42FCF148.5010400@elischer.org> Date: Tue, 16 Aug 2005 08:28:24 +0300 Organization: AB Lietuvos Radijo ir Televizijos Centras MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: Subject: Re: routing problem (with corrected scheme) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Donatas List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 05:28:28 -0000 Hello Julian, > Do the users have to have real IP addresses or can they have > NAT'd addresses? In other words, do they have INCOMING sessions > or just outgoing sessions? actualy there are hundreds of users with registered(real) IP's. So = nat'ing, looking the most logical solution, in this case can't be = realized. =20 > If the latter then you could put a NATD on each of the vlan > interfaces on the user router, so that the return packets will > automatically go back to the vlan from which they came. > Why do you need DIFFERENT VLANS between the two routers for > data that will eventually go to different places? > Why can't that decision be made on the core router? > Is it just so you can shape traffic between the two routers? > why not do the shaping on the core router? as far as shaping of unsecure zone cannot be realized on the core router = (due tu enormous load of machine), we must put those options on = user-router. We need to shape USA and EUROPE traffic separately and = differently per user. Using ipfw that traffic can be recognized only = using two different interfaces. We can't avoid usage of vlan's by adding = aditinal physical interface on core router, but it won't solve = inbound-routes problem. > actually you should be able to do it with ipfw's 'fwd' rule > without NAT. > ipfw add 1000 fwd ip4 ip from any to ${USER_NETWORK} in recv em0 > ipfw add 1001 fwd ip3 ip from any to ${USER_NETWORK} in recv em1 yes, i've been thinking of "fwd" rules, but as I have allready mentioned = - there are hundreds of real IP's behind the user router, all of them = are in differen (mixed) subents. Core router's average cpu load (running = on dual xeon 2.8) is 80%.We can't describe all inbound traffic with two = ipfw rules because of subnet difference. If we put several hundred of = fwd rules on core-router, it will simply fail. And the number of these = rules has a tendence to increase in about 40/month. So, the only solution in this case seems to be routing-back to those two = USA and EUROPE vlan's.=20 From owner-freebsd-net@FreeBSD.ORG Tue Aug 16 07:38: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 D7EB016A41F for ; Tue, 16 Aug 2005 07:38:11 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 905BF43D48 for ; Tue, 16 Aug 2005 07:38:11 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 1730220901F; Tue, 16 Aug 2005 00:38:11 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7G7c9vR044036; Tue, 16 Aug 2005 00:38:10 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <430197E1.9060803@elischer.org> Date: Tue, 16 Aug 2005 00:38:09 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Donatas References: <026001c59e7a$c6ca69c0$9f90a8c0@donatas> <42FBC0AE.8020803@elischer.org> <027701c59f02$0eb808a0$9f90a8c0@donatas> <42FCF148.5010400@elischer.org> <000d01c5a223$53799840$0500a8c0@donatas> In-Reply-To: <000d01c5a223$53799840$0500a8c0@donatas> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: routing problem (with corrected scheme) 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, 16 Aug 2005 07:38:12 -0000 Donatas wrote: > Hello Julian, > > >> Do the users have to have real IP addresses or can they have NAT'd addresses? In other words, >> do they have INCOMING sessions or just outgoing sessions? > > actualy there are hundreds of users with registered(real) IP's. So nat'ing, looking the most > logical solution, in this case can't be realized. > > >> If the latter then you could put a NATD on each of the vlan interfaces on the user router, so >> that the return packets will automatically go back to the vlan from which they came. > > >> Why do you need DIFFERENT VLANS between the two routers for data that will eventually go to >> different places? Why can't that decision be made on the core router? Is it just so you can >> shape traffic between the two routers? why not do the shaping on the core router? > > as far as shaping of unsecure zone cannot be realized on the core router (due tu enormous load of > machine), we must put those options on user-router. We need to shape USA and EUROPE traffic > separately and differently per user. Using ipfw that traffic can be recognized only using two > different interfaces. We can't avoid usage of vlan's by adding aditinal physical interface on > core router, but it won't solve inbound-routes problem. > > >> actually you should be able to do it with ipfw's 'fwd' rule without NAT. >> ipfw add 1000 fwd ip4 ip from any to ${USER_NETWORK} in recv em0 >> ipfw add 1001 fwd ip3 ip from any to ${USER_NETWORK} in recv em1 > > yes, i've been thinking of "fwd" rules, but as I have allready mentioned - there are hundreds of > real IP's behind the user router, all of them are in differen (mixed) subents. Core router's > average cpu load (running on dual xeon 2.8) is 80%.We can't describe all inbound traffic with two > ipfw rules because of subnet difference. If we put several hundred of fwd rules on core-router, > it will simply fail. And the number of these rules has a tendence to increase in about 40/month. > So, the only solution in this case seems to be routing-back to those two USA and EUROPE vlan's. Actually, I jsut realised that you do not need to specify each subnet and you can do it with just 1 firewall rule. you make all the routes for the custommers use only one of the VLANS, and then you use the fwd rule to divert those that came in through one the trunks (say the Europe trunk) to use the other vlan.. e.g. for each custommer: route add $CUSTOMER_NET1 ip3 route add $CUSTOMER_NET2 1p3 then for the firewall you just need to add one simple rule: ipfw add 1000 fwd ip4 ip from any to any out recv em0 xmit vlan{mumble} where vlan{mumble} is the vlan that goes to ip3 this says "if you are going out an dyou are going to ip3 but came in on em0 then go to ip4 instead." The trick is to do it on OUTPUT processing so that the route has already been chosen and to filter on that. > From owner-freebsd-net@FreeBSD.ORG Tue Aug 16 11:03: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 0871716A41F for ; Tue, 16 Aug 2005 11:03:05 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (silver.iplus.pl [80.48.250.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FFE843D45 for ; Tue, 16 Aug 2005 11:03:04 +0000 (GMT) (envelope-from dunstan@freebsd.czest.pl) Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4]) by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id j7GBHwGW059993; Tue, 16 Aug 2005 11:17:58 GMT (envelope-from dunstan@freebsd.czest.pl) Received: (from dunstan@localhost) by freebsd.czest.pl (8.12.10/8.12.9/Submit) id j7GBHujH059992; Tue, 16 Aug 2005 11:17:56 GMT (envelope-from dunstan) Date: Tue, 16 Aug 2005 11:17:55 +0000 From: "Wojciech A. Koszek" To: Brooks Davis Message-ID: <20050816111754.GA59968@freebsd.czest.pl> References: <200508090854.21278.darcy@wavefire.com> <20050809181601.GB20908@odin.ac.hmc.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050809181601.GB20908@odin.ac.hmc.edu> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org Subject: Re: panic: if_attach called without if_alloc'd input() 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, 16 Aug 2005 11:03:05 -0000 On Tue, Aug 09, 2005 at 11:16:01AM -0700, Brooks Davis wrote: > On Tue, Aug 09, 2005 at 08:54:21AM -0700, Darcy Buskermolen wrote: > > I'm getting the following panic on my RELENG_6 test box: > > > > xl1f0: BUG: if_attach called without if_alloc'd input() > > > > Where should I be looking to track this down? I suspect it has to do with a > > custom kernel, it wasn't doing it when i was running GENERIC > > The ef(4) device is currently broken. I haven't had time to look at it > much though it seems mostly correct by inspection so I'm not sure what's > going on. > > If you could compile with debugging and get be a stack trace from the > panic, that might help be track this down. I'm assuming there's a path > through the code that I'm missing that results in using a bogus cast to > get an ifnet pointer and thus causes a panic. You might also try the > following patch which fixes a couple bugs I think are unrelated, but may > not be. Hello, As I've written earlier, I had some time to analyze it. Detailed description: kern/84987 Patch is here: http://freebsd.czest.pl/dunstan/FreeBSD/diff.0.if.c Could someone review that patch? -- * Wojciech A. Koszek && dunstan@FreeBSD.czest.pl From owner-freebsd-net@FreeBSD.ORG Tue Aug 16 14:17: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 9BBAA16A41F for ; Tue, 16 Aug 2005 14:17:55 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id D01D443D49 for ; Tue, 16 Aug 2005 14:17:54 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3EB83.dip.t-dialin.net [84.163.235.131] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKxQS-1E52G70EFr-0005e1; Tue, 16 Aug 2005 16:17:43 +0200 From: Max Laier To: freebsd-net@freebsd.org Date: Tue, 16 Aug 2005 16:17:50 +0200 User-Agent: KMail/1.8.2 References: <4301499E.8040704@ntmk.ru> In-Reply-To: <4301499E.8040704@ntmk.ru> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1762813.IeyQ2jLzbZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508161618.02485.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Boris Kovalenko Subject: Re: PR bin/82306 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, 16 Aug 2005 14:17:55 -0000 --nextPart1762813.IeyQ2jLzbZ Content-Type: multipart/mixed; boundary="Boundary-01=_VWfADM86mhQ4UA0" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_VWfADM86mhQ4UA0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 16 August 2005 04:04, Boris Kovalenko wrote: > Hello! > > Is there news on PR 82306? Will it be fixed at least with 5.5R? In case anybody is watching here ... please try the attached diff. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_VWfADM86mhQ4UA0 Content-Type: text/x-diff; charset="koi8-r"; name="in.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="in.c.diff" Index: in.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/store/mlaier/fcvs/src/sys/netinet/in.c,v retrieving revision 1.85 diff -u -r1.85 in.c =2D-- in.c 2 Jun 2005 00:04:08 -0000 1.85 +++ in.c 16 Aug 2005 13:41:08 -0000 @@ -67,6 +67,10 @@ static int subnetsarelocal =3D 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &subnetsarelocal, 0, "Treat all subnets as directly connected"); +static int sameprefixcarponly =3D 0; +SYSCTL_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, + &sameprefixcarponly, 0, + "Refuse to create same prefixes on different interfaces"); =20 struct in_multihead in_multihead; /* XXX BSS initialization */ =20 @@ -815,8 +819,15 @@ * If we got a matching prefix route inserted by other * interface address, we are done here. */ =2D if (ia->ia_flags & IFA_ROUTE) =2D return 0; + if (ia->ia_flags & IFA_ROUTE) { + if (sameprefixcarponly && + target->ia_ifp->if_type !=3D IFT_CARP && + ia->ia_ifp->if_type !=3D IFT_CARP) + return (0); + else + return (EEXIST); + } else + continue; } =20 /* --Boundary-01=_VWfADM86mhQ4UA0-- --nextPart1762813.IeyQ2jLzbZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDAfWaXyyEoT62BG0RAq+PAJ4lSfF0TtCh91GYiEa50VDPR43SQQCfRbsK V/70C920KsW8M3aOTU/L7IE= =YrtF -----END PGP SIGNATURE----- --nextPart1762813.IeyQ2jLzbZ-- From owner-freebsd-net@FreeBSD.ORG Tue Aug 16 22:56:12 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 086AC16A41F for ; Tue, 16 Aug 2005 22:56:12 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: from mail27.sea5.speakeasy.net (mail27.sea5.speakeasy.net [69.17.117.29]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D77343D75 for ; Tue, 16 Aug 2005 22:55:19 +0000 (GMT) (envelope-from mi+mx@aldan.algebra.com) Received: (qmail 22428 invoked from network); 16 Aug 2005 22:55:19 -0000 Received: from aldan.algebra.com ([216.254.65.224]) (envelope-sender ) by mail27.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 16 Aug 2005 22:55:17 -0000 Received: from corbulon.video-collage.com (static-151-204-231-237.bos.east.verizon.net [151.204.231.237]) by aldan.algebra.com (8.13.1/8.13.1) with ESMTP id j7GMtE3t007736 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 16 Aug 2005 18:55:15 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (195-11.customer.cloud9.net [168.100.195.11]) by corbulon.video-collage.com (8.13.4/8.13.1) with ESMTP id j7GMt6K3034302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Aug 2005 18:55:07 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from mteterin.us.murex.com (mteterin@localhost [127.0.0.1]) by mteterin.us.murex.com (8.13.3/8.13.3) with ESMTP id j7GMt1MJ027346; Tue, 16 Aug 2005 18:55:01 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) Received: from localhost (localhost [[UNIX: localhost]]) by mteterin.us.murex.com (8.13.3/8.13.3/Submit) id j7GMsxRF027328; Tue, 16 Aug 2005 18:54:59 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: mteterin.us.murex.com: mteterin set sender to mi+mx@aldan.algebra.com using -f From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Q , net@freebsd.org, amd64@freebsd.org Date: Tue, 16 Aug 2005 18:54:59 -0400 User-Agent: KMail/1.8.2 References: <200504220128.17540@aldan> <3597b10b1fe23e85f87632829a3e9d2c@onthenet.com.au> In-Reply-To: <3597b10b1fe23e85f87632829a3e9d2c@onthenet.com.au> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_D7mADdPvPDVPD/Z" Message-Id: <200508161854.59560.mi+mx@aldan.algebra.com> X-Virus-Scanned: ClamAV devel-20050525/1023/Mon Aug 15 16:15:08 2005 on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 Cc: Subject: Re: nvnet does not see NVidia's adapter on amd64 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, 16 Aug 2005 22:56:12 -0000 --Boundary-00=_D7mADdPvPDVPD/Z Content-Type: text/plain; charset="koi8-u" Content-Transfer-Encoding: 8bit Content-Disposition: inline Hi, Quinton! Friday, April 22, 2005 01:34, Q wrote: > Err yes it is. šMy firewall/router at home has an uptime of 28 days and > has 0 errrors. Looks like a duplex problem, which will explain your > poor performance. Why it's happening is another story. Have you tried > this motherboard using linux or windows with these switches to ensure > that they function correctly and it's not a hardware issue. I have a > switch at home that will not sync with one of my motherboards unless > you use a crossover into the uplink port for some reason. Ok, in the 4 months since our last exchange on this matter, we did try WindowsXP/64 on the machine. There were no problems using the interface (after I added NVidia's drivers, that is). I'm now trying to net-install 6.0-BETA2 and am seeing the same symptoms however. The interface works (very) intermittently. For example, during install, it was unable to obtain the DHCP information. But, when we entered the info by hand, it was able to resolve the name 'ftp3.freebsd.org'. But then it was again unable to login to the ftp-server. While the install was struggling with that, I looked at the debug screen -- Alt-F2. It kept showing "Interface nve0 UP" and "Interface nve0 DOWN". Have you made any updates to the driver/port recently, that may not be in 6.0? Is the net/nvnet port newer -- we can try to install 5.4 and add this port... Thanks! -mi P.S. The machine has no OS on it right now -- I'm attaching the dmesg and the pciconf output from April 13. --Boundary-00=_D7mADdPvPDVPD/Z Content-Type: text/plain; charset="koi8-u"; name="dmesg.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dmesg.txt" ata3-slave: stat=0x7f err=0xff lsb=0xff msb=0xff ata3: reset tp2 stat0=ff stat1=ff devices=0x0 ata3: [MPSAFE] pcib1: at device 11.0 on pci0 pcib1: secondary bus 2 pcib1: subordinate bus 2 pcib1: I/O decode 0x9000-0x9fff pcib1: memory decode 0xff100000-0xff1fffff pcib1: prefetched decode 0xe6900000-0xee8fffff pcib1: could not get PCI interrupt routing table for \\_SB_.PCI0.P0P2 - AE_NOT_FOUND pci2: on pcib1 pci2: physical bus=2 map[10]: type 3, range 32, base e8000000, size 26, enabled pcib1: device (null) requested decoded memory range 0xe8000000-0xebffffff map[14]: type 4, range 32, base 00009800, size 8, enabled pcib1: device (null) requested decoded I/O range 0x9800-0x98ff map[18]: type 1, range 32, base ff1fc000, size 14, enabled pcib1: device (null) requested decoded memory range 0xff1fc000-0xff1fffff pcib0: matched entry for 0.11.INTA (src \\_SB_.LNKE) pcib0: possible interrupts: 16 17 18 19 ACPI PCI link arbitrated settings: \\_SB_.LNKB (references 3, priority 840): interrupts: 19 18 17 16 penalty: 280 280 280 280 \\_SB_.LKSM (references 1, priority 706): interrupts: 20 22 21 penalty: 640 740 740 \\_SB_.LKMO (references 1, priority 706): interrupts: 20 22 21 penalty: 640 740 740 \\_SB_.LTIE (references 1, priority 706): interrupts: 20 22 21 penalty: 640 740 740 \\_SB_.LNKE (references 1, priority 280): interrupts: 19 18 17 16 penalty: 280 280 280 280 pcib0: slot 11 INTA routed to irq 19 via \\_SB_.LNKE pcib1: slot 0 INTA is routed to irq 19 found-> vendor=0x1002, dev=0x5446, revid=0x00 bus=2, slot=0, func=0 class=03-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0087, statreg=0x02b0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x08 (2000 ns), maxlat=0x00 (0 ns) intpin=a, irq=19 powerspec 2 supports D0 D1 D3 current D0 pci2: at device 0.0 (no driver attached) pcib2: at device 14.0 on pci0 pcib2: secondary bus 1 pcib2: subordinate bus 1 pcib2: I/O decode 0xf000-0xfff pcib2: memory decode 0xff000000-0xff0fffff pcib2: prefetched decode 0xfff00000-0xfffff ACPI link \\_SB_.LNKD has invalid initial irq 10, ignoring ACPI link \\_SB_.LNKC has invalid initial irq 10, ignoring ACPI PCI link initial configuration: \\_SB_.LNKD irq 0: [16 17 18 19] 0+ low,level,sharable 1.7.0 \\_SB_.LNKA irq 0: [16 17 18 19] 0+ low,level,sharable 1.7.1 \\_SB_.LNKB irq 0: [16 17 18 19] 0+ low,level,sharable 1.7.2 \\_SB_.LNKC irq 0: [16 17 18 19] 0+ low,level,sharable 1.7.3 \\_SB_.LNKC irq 0: [16 17 18 19] 0+ low,level,sharable 1.6.0 \\_SB_.LNKD irq 0: [16 17 18 19] 0+ low,level,sharable 1.6.1 \\_SB_.LNKA irq 0: [16 17 18 19] 0+ low,level,sharable 1.6.2 \\_SB_.LNKB irq 0: [16 17 18 19] 0+ low,level,sharable 1.6.3 pci1: on pcib2 pci1: physical bus=1 map[10]: type 1, range 32, base ff0ff800, size 11, enabled pcib2: device (null) requested decoded memory range 0xff0ff800-0xff0fffff map[14]: type 1, range 32, base ff0f8000, size 14, enabled pcib2: device (null) requested decoded memory range 0xff0f8000-0xff0fbfff pcib2: matched entry for 1.6.INTA (src \\_SB_.LNKC) pcib2: possible interrupts: 16 17 18 19 ACPI PCI link arbitrated settings: \\_SB_.LNKB (references 5, priority 2212): interrupts: 18 17 16 19 penalty: 440 440 440 450 \\_SB_.LNKD (references 2, priority 885): interrupts: 18 17 16 19 penalty: 440 440 440 450 \\_SB_.LNKA (references 2, priority 885): interrupts: 18 17 16 19 penalty: 440 440 440 450 \\_SB_.LNKC (references 2, priority 885): interrupts: 18 17 16 19 penalty: 440 440 440 450 \\_SB_.LKSM (references 1, priority 706): interrupts: 20 21 22 penalty: 640 740 740 \\_SB_.LKMO (references 1, priority 706): interrupts: 20 21 22 penalty: 640 740 740 \\_SB_.LTIE (references 1, priority 706): interrupts: 20 21 22 penalty: 640 740 740 pcib2: slot 6 INTA routed to irq 18 via \\_SB_.LNKC found-> vendor=0x104c, dev=0x8023, revid=0x00 bus=1, slot=6, func=0 class=0c-00-10, hdrtype=0x00, mfdev=0 cmdreg=0x0116, statreg=0x0210, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x02 (500 ns), maxlat=0x04 (1000 ns) intpin=a, irq=18 powerspec 2 supports D0 D1 D2 D3 current D0 fwohci0: mem 0xff0f8000-0xff0fbfff,0xff0ff800-0xff0fffff irq 18 at device 6.0 on pci1 fwohci0: Reserved 0x800 bytes for rid 0x10 type 3 at 0xff0ff800 fwohci0: [MPSAFE] fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:00:00:00:00:01:46:87 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:00:00:01:46:87 fwe0: bpf attached fwe0: Ethernet address: 02:00:00:01:46:87 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) pcib3: on acpi0 pcib3: could not get PCI interrupt routing table for \\_SB_.PCIB - AE_NOT_FOUND pci3: on pcib3 pci3: physical bus=3 found-> vendor=0x1022, dev=0x7450, revid=0x12 bus=3, slot=1, func=0 class=06-04-00, hdrtype=0x01, mfdev=1 cmdreg=0x0117, statreg=0x0230, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x07 (1750 ns), maxlat=0x04 (1000 ns) map[10]: type 1, range 64, base ff6fe000, size 12, enabled found-> vendor=0x1022, dev=0x7451, revid=0x01 bus=3, slot=1, func=1 class=08-00-10, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0200, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x1022, dev=0x7450, revid=0x12 bus=3, slot=2, func=0 class=06-04-00, hdrtype=0x01, mfdev=1 cmdreg=0x0116, statreg=0x0230, cachelnsz=0 (dwords) lattimer=0x40 (1920 ns), mingnt=0x07 (1750 ns), maxlat=0x00 (0 ns) map[10]: type 1, range 64, base ff6ff000, size 12, enabled found-> vendor=0x1022, dev=0x7451, revid=0x01 bus=3, slot=2, func=1 class=08-00-10, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0200, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) pcib4: at device 1.0 on pci3 pcib4: secondary bus 5 pcib4: subordinate bus 5 pcib4: I/O decode 0xd000-0xefff pcib4: memory decode 0xff400000-0xff5fffff pcib4: prefetched decode 0xfff00000-0xfffff ACPI PCI link initial configuration: pci5: on pcib4 pci5: physical bus=5 map[10]: type 4, range 32, base 0000ec00, size 3, enabled pcib4: device (null) requested decoded I/O range 0xec00-0xec07 map[14]: type 4, range 32, base 0000e800, size 2, enabled pcib4: device (null) requested decoded I/O range 0xe800-0xe803 map[18]: type 4, range 32, base 0000e400, size 3, enabled pcib4: device (null) requested decoded I/O range 0xe400-0xe407 map[1c]: type 4, range 32, base 0000e000, size 2, enabled pcib4: device (null) requested decoded I/O range 0xe000-0xe003 map[20]: type 4, range 32, base 0000dc00, size 4, enabled pcib4: device (null) requested decoded I/O range 0xdc00-0xdc0f map[24]: type 1, range 32, base ff5ffc00, size 10, enabled pcib4: device (null) requested decoded memory range 0xff5ffc00-0xff5fffff pcib4: matched entry for 5.3.INTA pcib4: slot 3 INTA hardwired to IRQ 27 found-> vendor=0x1095, dev=0x3114, revid=0x02 bus=5, slot=3, func=0 class=01-80-00, hdrtype=0x00, mfdev=0 cmdreg=0x0107, statreg=0x02b0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=27 powerspec 2 supports D0 D1 D2 D3 current D0 atapci2: port 0xdc00-0xdc0f,0xe000-0xe003,0xe400-0xe407,0xe800-0xe803,0xec00-0xec07 mem 0xff5ffc00-0xff5fffff irq 27 at device 3.0 on pci5 atapci2: Reserved 0x10 bytes for rid 0x20 type 4 at 0xdc00 atapci2: [MPSAFE] atapci2: Reserved 0x400 bytes for rid 0x24 type 3 at 0xff5ffc00 ata4: channel #0 on atapci2 ata4: reset tp1 mask=01 ostat0=50 ostat1=50 ata4-master: stat=0xd0 err=0xd0 lsb=0xd0 msb=0xd0 ata4-master: stat=0xd0 err=0xd0 lsb=0xd0 msb=0xd0 ata4-master: stat=0x50 err=0x01 lsb=0x00 msb=0x00 ata4: reset tp2 stat0=50 stat1=00 devices=0x1 ata4: [MPSAFE] ata5: channel #1 on atapci2 ata5: reset tp1 mask=01 ostat0=50 ostat1=50 ata5-master: stat=0x50 err=0x01 lsb=0x00 msb=0x00 ata5: reset tp2 stat0=50 stat1=00 devices=0x1 ata5: [MPSAFE] ata6: channel #2 on atapci2 ata6: reset tp1 mask=01 ostat0=7f ostat1=7f ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata6: reset tp2 stat0=ff stat1=00 devices=0x0 ata6: [MPSAFE] ata7: channel #3 on atapci2 ata7: reset tp1 mask=01 ostat0=7f ostat1=7f ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7-master: stat=0x7f err=0x00 lsb=0x00 msb=0x00 ata7: reset tp2 stat0=ff stat1=00 devices=0x0 ata7: [MPSAFE] pci3: at device 1.1 (no driver attached) pcib5: at device 2.0 on pci3 pcib5: secondary bus 4 pcib5: subordinate bus 4 pcib5: I/O decode 0x0-0x0 pcib5: memory decode 0xff300000-0xff3fffff pcib5: prefetched decode 0xfea00000-0xfeafffff ACPI PCI link initial configuration: pci4: on pcib5 pci4: physical bus=4 map[10]: type 3, range 32, base feaf0000, size 16, enabled pcib5: device (null) requested decoded memory range 0xfeaf0000-0xfeafffff pcib5: matched entry for 4.1.INTA pcib5: slot 1 INTA hardwired to IRQ 29 found-> vendor=0x1000, dev=0x1960, revid=0x01 bus=4, slot=1, func=0 class=01-04-00, hdrtype=0x00, mfdev=0 cmdreg=0x0116, statreg=0x04b0, cachelnsz=16 (dwords) lattimer=0x40 (1920 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=29 powerspec 2 supports D0 D3 current D0 amr0: mem 0xfeaf0000-0xfeafffff irq 29 at device 1.0 on pci4 amr0: Reserved 0x10000 bytes for rid 0x10 type 3 at 0xfeaf0000 amr0: [MPSAFE] amr0: Firmware 712T, BIOS G116, 64MB RAM pci3: at device 2.1 (no driver attached) acpi_button0: on acpi0 unknown: not probed (disabled) sio0: irq maps: 0xa3 0xb3 0xa3 0xa3 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: irq maps: 0xa3 0xab 0xa3 0xa3 sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fdc0: ic_type 90 part_id 80 fdc0: [MPSAFE] fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 unknown: not probed (disabled) unknown: not probed (disabled) unknown: not probed (disabled) atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0065 atkbd: keyboard ID 0x41ab (2) kbd0 at atkbd0 kbd0: atkbd0, AT 101/102 (2), config:0x1, flags:0x3d0000 atkbd0: [GIANT-LOCKED] psm0: unable to allocate IRQ unknown: not probed (disabled) unknown: not probed (disabled) unknown: not probed (disabled) unknown: not probed (disabled) unknown: not probed (disabled) unknown: not probed (disabled) ahc_isa_probe 10: ioport 0xac00 alloc failed ahc_isa_probe 11: ioport 0xbc00 alloc failed ahc_isa_probe 12: ioport 0xcc00 alloc failed ahc_isa_probe 13: ioport 0xdc00 alloc failed ahc_isa_probe 14: ioport 0xec00 alloc failed ex_isa_identify() atkbdc: atkbdc0 already exists; skipping it fdc: fdc0 already exists; skipping it sio: sio0 already exists; skipping it sio: sio1 already exists; skipping it Trying Read_Port at 203 Trying Read_Port at 243 Trying Read_Port at 283 Trying Read_Port at 2c3 Trying Read_Port at 303 Trying Read_Port at 343 Trying Read_Port at 383 Trying Read_Port at 3c3 sc: sc0 already exists; skipping it vga: vga0 already exists; skipping it isa_probe_children: disabling PnP devices isa_probe_children: probing non-PnP devices orm0: at iomem 0xc8800-0xccfff,0xc0000-0xc7fff on isa0 ppc0: cannot reserve I/O port range ppc0: failed to probe at irq 7 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> sc0: fb0, kbd0, terminal emulator: sc (syscons terminal) sio2: not probed (disabled) sio3: not probed (disabled) vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 fb0: vga0, vga, type:VGA (5), flags:0x7007f fb0: port:0x3c0-0x3df, crtc:0x3d4, mem:0xa0000 0x20000 fb0: init mode:24, bios mode:3, current mode:24 fb0: window:0xffffffff800b8000 size:32k gran:32k, buf:0 size:32k VGA parameters upon power-up 50 18 10 00 00 00 03 00 02 67 5f 4f 50 82 55 81 bf 1f 00 4f 0d 0e 00 00 07 80 9c 8e 8f 28 1f 96 b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff VGA parameters in BIOS for mode 24 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 EGA/VGA parameters to be used for mode 24 50 18 10 00 00 00 03 00 02 67 5f 4f 50 82 55 81 bf 1f 00 4f 0d 0e 00 00 07 80 9c 8e 8f 28 1f 96 b9 a3 ff 00 01 02 03 04 05 14 07 38 39 3a 3b 3c 3d 3e 3f 0c 00 0f 08 00 00 00 00 00 10 0e 00 ff isa_probe_children: probing PnP devices Device configuration finished. Reducing kern.maxvnodes 132744 -> 100000 procfs registered linprocfs registered Timecounter "TSC" frequency 1800005863 Hz quality 800 Timecounters tick every 1.000 msec Linux ELF exec handler installed lo0: bpf attached ata1-master: pio=0x0c wdma=0x22 udma=0xffffffff cable=40pin ata1-master: setting PIO4 on nVidia nForce3 Pro chip acd0: CDROM drive at ata1 as master acd0: read 5512KB/s (5512KB/s), 256KB buffer, PIO4 acd0: Reads: CDR, CDRW, CDDA, packet acd0: Writes: acd0: Audio: play, 255 volume levels acd0: Mechanism: ejectable tray, unlocked acd0: Medium: no/blank disc ata4-master: pio=0x0c wdma=0x22 udma=0x46 cable=40pin ad8: ATA-6 disk at ata4-master ad8: 190782MB (390721968 sectors), 387621 C, 16 H, 63 S, 512 B ad8: 16 secs/int, 1 depth queue, SATA150 ar: LSI check1 failed ata5-master: FAILURE - ATA_IDENTIFY status=51 error=4 LBA=0 GEOM: new disk ad8 [0] f:00 typ:165 s(CHS):0/1/1 e(CHS):1023/254/63 s:63 l:16771797 [1] f:80 typ:165 s(CHS):1023/255/63 e(CHS):1023/254/63 s:16771860 l:4192965 [2] f:00 typ:165 s(CHS):1023/255/63 e(CHS):1023/254/63 s:20964825 l:16771860 [3] f:00 typ:165 s(CHS):1023/255/63 e(CHS):1023/254/63 s:37736685 l:352980180 GEOM: Configure ad8s1, start 32256 length 8587160064 end 8587192319 GEOM: Configure ad8s2, start 8587192320 length 2146798080 end 10733990399 GEOM: Configure ad8s3, start 10733990400 length 8587192320 end 19321182719 GEOM: Configure ad8s4, start 19321182720 length 180725852160 end 200047034879 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 GEOM: Configure ad8s1b, start 0 length 8587160064 end 8587160063 GEOM: Configure ad8s1c, start 0 length 8587160064 end 8587160063 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 GEOM: Configure ad8s2a, start 0 length 2146798080 end 2146798079 GEOM: Configure ad8s2c, start 0 length 2146798080 end 2146798079 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 GEOM: Configure ad8s3c, start 0 length 8587192320 end 8587192319 GEOM: Configure ad8s3d, start 0 length 8587192320 end 8587192319 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 GEOM: Configure ad8s4c, start 0 length 180725852160 end 180725852159 GEOM: Configure ad8s4d, start 0 length 180725852160 end 180725852159 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 ata5: reiniting channel .. ata5: reset tp1 mask=01 ostat0=50 ostat1=50 ata5-master: stat=0x50 err=0x01 lsb=0x00 msb=0x00 ata5: reset tp2 stat0=50 stat1=00 devices=0x1 ata5: resetting done .. ata5-master: FAILURE - ATA_IDENTIFY status=51 error=4 LBA=0 ata5: reiniting channel .. ata5-master: FAILURE - ATA_IDENTIFY timed out ata5: device config done .. ata5-master: FAILURE - ATA_IDENTIFY timed out amrd0: on amr0 amrd0: 953885MB (1953556480 sectors) RAID 5 (optimal) GEOM: new disk amrd0 (probe21:amr0:0:15:0): error 22 (probe21:amr0:0:15:0): Unretryable Error (probe13:amr0:0:6:0): error 22 (probe13:amr0:0:6:0): Unretryable Error (probe14:amr0:0:8:0): error 22 (probe14:amr0:0:8:0): Unretryable Error (probe15:amr0:0:9:0): error 22 (probe15:amr0:0:9:0): Unretryable Error (probe16:amr0:0:10:0): error 22 (probe16:amr0:0:10:0): Unretryable Error (probe17:amr0:0:11:0): error 22 (probe17:amr0:0:11:0): Unretryable Error (probe18:amr0:0:12:0): error 22 (probe18:amr0:0:12:0): Unretryable Error (probe19:amr0:0:13:0): error 22 (probe19:amr0:0:13:0): Unretryable Error (probe20:amr0:0:14:0): error 22 (probe20:amr0:0:14:0): Unretryable Error (probe12:amr0:0:5:0): error 22 (probe12:amr0:0:5:0): Unretryable Error (probe11:amr0:0:4:0): error 22 (probe11:amr0:0:4:0): Unretryable Error (probe9:amr0:0:2:0): error 22 (probe9:amr0:0:2:0): Unretryable Error (probe7:amr0:0:0:0): error 22 (probe7:amr0:0:0:0): Unretryable Error (probe8:amr0:0:1:0): error 22 (probe8:amr0:0:1:0): Unretryable Error (probe10:amr0:0:3:0): error 22 (probe10:amr0:0:3:0): Unretryable Error (probe3:sbp0:0:3:0): error 22 (probe3:sbp0:0:3:0): Unretryable Error (probe0:sbp0:0:0:0): error 22 (probe0:sbp0:0:0:0): Unretryable Error (probe1:sbp0:0:1:0): error 22 (probe1:sbp0:0:1:0): Unretryable Error (probe2:sbp0:0:2:0): error 22 (probe2:sbp0:0:2:0): Unretryable Error (probe4:sbp0:0:4:0): error 22 (probe4:sbp0:0:4:0): Unretryable Error (probe5:sbp0:0:5:0): error 22 (probe5:sbp0:0:5:0): Unretryable Error (probe6:sbp0:0:6:0): error 22 (probe6:sbp0:0:6:0): Unretryable Error ioapic0: routing intpin 1 (ISA IRQ 1) to cluster 0 ioapic0: routing intpin 3 (ISA IRQ 3) to cluster 0 ioapic0: routing intpin 4 (ISA IRQ 4) to cluster 0 ioapic0: routing intpin 6 (ISA IRQ 6) to cluster 0 ioapic0: routing intpin 8 (ISA IRQ 8) to cluster 0 ioapic0: routing intpin 9 (ISA IRQ 9) to cluster 0 ioapic0: routing intpin 14 (ISA IRQ 14) to cluster 0 ioapic0: routing intpin 15 (ISA IRQ 15) to cluster 0 ioapic0: routing intpin 18 (PCI IRQ 18) to cluster 0 ioapic0: routing intpin 21 (PCI IRQ 21) to cluster 0 ioapic0: routing intpin 22 (PCI IRQ 22) to cluster 0 ioapic1: routing intpin 3 (PCI IRQ 27) to cluster 0 ioapic2: routing intpin 1 (PCI IRQ 29) to cluster 0 Mounting root from ufs:/dev/ad8s2a start_init: trying /sbin/init [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 [0] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [1] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [2] f:00 typ:0 s(CHS):0/0/0 e(CHS):0/0/0 s:0 l:0 [3] f:80 typ:165 s(CHS):0/0/1 e(CHS):1023/254/63 s:0 l:50000 Waiting (max 60 seconds) for system process `vnlru' to stop...done Waiting (max 60 seconds) for system process `bufdaemon' to stop...done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining...3 2 2 1 0 0 done No buffers busy after final sync Copyright (c) 1992-2005 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.4-RC2 #0: Sun Apr 10 04:02:23 UTC 2005 root@portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: AMD Opteron(tm) Processor 244 (1800.01-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0xf58 Stepping = 8 Features=0x78bfbff AMD Features=0xe0500800 real memory = 2146697216 (2047 MB) avail memory = 2060873728 (1965 MB) ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-27 on motherboard ioapic2 irqs 28-31 on motherboard acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 acpi_throttle0: on cpu0 pcib0: port 0xcf8-0xcff on acpi0 ACPI link \\_SB_.LUS0 has invalid initial irq 10, ignoring ACPI link \\_SB_.LKLN has invalid initial irq 5, ignoring ACPI link \\_SB_.LUS1 has invalid initial irq 11, ignoring ACPI link \\_SB_.LUS2 has invalid initial irq 7, ignoring ACPI link \\_SB_.LNKE has invalid initial irq 11, ignoring ACPI link \\_SB_.LNKB has invalid initial irq 10, ignoring ACPI link \\_SB_.LTIE has invalid initial irq 10, ignoring pci0: on pcib0 isab0: at device 1.0 on pci0 isa0: on isab0 pci0: at device 1.1 (no driver attached) ohci0: mem 0xff2fb000-0xff2fbfff irq 22 at device 2.0 on pci0 usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 4 ports with 4 removable, self powered ohci1: mem 0xff2fc000-0xff2fcfff irq 21 at device 2.1 on pci0 usb1: OHCI version 1.0, legacy support usb1: SMM does not respond, resetting usb1: on ohci1 usb1: USB revision 1.0 uhub1: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub1: 4 ports with 4 removable, self powered pci0: at device 2.2 (no driver attached) pci0: at device 5.0 (no driver attached) pci0: at device 6.0 (no driver attached) atapci0: port 0xffa0-0xffaf,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 8.0 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 atapci1: port 0xbc00-0xbc0f,0xc000-0xc003,0xc400-0xc407,0xc800-0xc803,0xcc00-0xcc07 irq 21 at device 10.0 on pci0 ata2: channel #0 on atapci1 ata3: channel #1 on atapci1 pcib1: at device 11.0 on pci0 pci2: on pcib1 pci2: at device 0.0 (no driver attached) pcib2: at device 14.0 on pci0 ACPI link \\_SB_.LNKD has invalid initial irq 10, ignoring ACPI link \\_SB_.LNKC has invalid initial irq 10, ignoring pci1: on pcib2 fwohci0: mem 0xff0f8000-0xff0fbfff,0xff0ff800-0xff0fffff irq 18 at device 6.0 on pci1 fwohci0: OHCI version 1.10 (ROM=1) fwohci0: No. of Isochronous channels is 4. fwohci0: EUI64 00:00:00:00:00:01:46:87 fwohci0: Phy 1394a available S400, 2 ports. fwohci0: Link S400, max_rec 2048 bytes. firewire0: on fwohci0 fwe0: on firewire0 if_fwe0: Fake Ethernet address: 02:00:00:01:46:87 fwe0: Ethernet address: 02:00:00:01:46:87 fwe0: if_start running deferred for Giant sbp0: on firewire0 fwohci0: Initiate bus reset fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me) firewire0: bus manager 0 (me) pcib3: on acpi0 pci3: on pcib3 pcib4: at device 1.0 on pci3 pci5: on pcib4 atapci2: port 0xdc00-0xdc0f,0xe000-0xe003,0xe400-0xe407,0xe800-0xe803,0xec00-0xec07 mem 0xff5ffc00-0xff5fffff irq 27 at device 3.0 on pci5 ata4: channel #0 on atapci2 ata5: channel #1 on atapci2 ata6: channel #2 on atapci2 ata7: channel #3 on atapci2 pci3: at device 1.1 (no driver attached) pcib5: at device 2.0 on pci3 pci4: on pcib5 amr0: mem 0xfeaf0000-0xfeafffff irq 29 at device 1.0 on pci4 amr0: Firmware 712T, BIOS G116, 64MB RAM pci3: at device 2.1 (no driver attached) acpi_button0: on acpi0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 orm0: at iomem 0xc8800-0xccfff,0xc0000-0xc7fff on isa0 ppc0: cannot reserve I/O port range sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounter "TSC" frequency 1800006073 Hz quality 800 Timecounters tick every 1.000 msec acd0: CDROM at ata1-master PIO4 ad8: 190782MB [387621/16/63] at ata4-master SATA150 ata5-master: FAILURE - ATA_IDENTIFY status=51 error=4 LBA=0 ata5-master: FAILURE - ATA_IDENTIFY status=51 error=4 LBA=0 ata5-master: FAILURE - ATA_IDENTIFY timed out ata5-master: FAILURE - ATA_IDENTIFY timed out amrd0: on amr0 amrd0: 953885MB (1953556480 sectors) RAID 5 (optimal) Mounting root from ufs:/dev/ad8s2a --Boundary-00=_D7mADdPvPDVPD/Z Content-Type: text/plain; charset="koi8-u"; name="pciconf.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pciconf.txt" hostb0@pci0:0:0: class=0x060000 card=0x00000000 chip=0x00e110de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' class = bridge subclass = HOST-PCI isab0@pci0:1:0: class=0x060100 card=0x004415d4 chip=0x00e010de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' class = bridge subclass = PCI-ISA none0@pci0:1:1: class=0x0c0500 card=0x004415d4 chip=0x00e410de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'nForce PCI System Management' class = serial bus subclass = SMBus ohci0@pci0:2:0: class=0x0c0310 card=0x004415d4 chip=0x00e710de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' class = serial bus subclass = USB ohci1@pci0:2:1: class=0x0c0310 card=0x004415d4 chip=0x00e710de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' class = serial bus subclass = USB none1@pci0:2:2: class=0x0c0320 card=0x004415d4 chip=0x00e810de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' class = serial bus subclass = USB none2@pci0:5:0: class=0x068000 card=0x004415d4 chip=0x00df10de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'Network Bus Enumerator' class = bridge none3@pci0:6:0: class=0x040100 card=0x004415d4 chip=0x00ea10de rev=0xa1 hdr=0x00 vendor = 'NVIDIA Corporation' class = multimedia subclass = audio atapci0@pci0:8:0: class=0x01018a card=0x004415d4 chip=0x00e510de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'CK8S Parallel ATA Controller' class = mass storage subclass = ATA atapci1@pci0:10:0: class=0x010185 card=0x00000000 chip=0x00e310de rev=0xa2 hdr=0x00 vendor = 'NVIDIA Corporation' device = 'CK8S Serial ATA Controller' class = mass storage subclass = ATA pcib1@pci0:11:0: class=0x060400 card=0x00000000 chip=0x00e210de rev=0xa2 hdr=0x01 vendor = 'NVIDIA Corporation' device = 'nForce3 250 AGP Host to PCI Bridge' class = bridge subclass = PCI-PCI pcib2@pci0:14:0: class=0x060400 card=0x00000000 chip=0x00ed10de rev=0xa2 hdr=0x01 vendor = 'NVIDIA Corporation' class = bridge subclass = PCI-PCI hostb1@pci0:24:0: class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron HyperTransport Technology Configuration' class = bridge subclass = HOST-PCI hostb2@pci0:24:1: class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron Address Map' class = bridge subclass = HOST-PCI hostb3@pci0:24:2: class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron DRAM Controller' class = bridge subclass = HOST-PCI hostb4@pci0:24:3: class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'Athlon 64 / Opteron Miscellaneous Control' class = bridge subclass = HOST-PCI none4@pci2:0:0: class=0x030000 card=0x04081002 chip=0x54461002 rev=0x00 hdr=0x00 vendor = 'ATI Technologies Inc.' device = 'Rage 128 PRO ULTRA Video Controller (VGA Compatible)' class = display subclass = VGA fwohci0@pci1:6:0: class=0x0c0010 card=0x8023104c chip=0x8023104c rev=0x00 hdr=0x00 vendor = 'Texas Instruments (TI)' device = 'TSB43AB22/A IEEE1394a-2000 OHCI PHY/Link-Layer Ctrlr' class = serial bus subclass = FireWire pcib4@pci3:1:0: class=0x060400 card=0x000000a0 chip=0x74501022 rev=0x12 hdr=0x01 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X Bridge' class = bridge subclass = PCI-PCI none5@pci3:1:1: class=0x080010 card=0x36c01022 chip=0x74511022 rev=0x01 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X IOAPIC' class = base peripheral subclass = interrupt controller pcib5@pci3:2:0: class=0x060400 card=0x000000a0 chip=0x74501022 rev=0x12 hdr=0x01 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X Bridge' class = bridge subclass = PCI-PCI none6@pci3:2:1: class=0x080010 card=0x36c01022 chip=0x74511022 rev=0x01 hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' device = 'AMD-8131 PCI-X IOAPIC' class = base peripheral subclass = interrupt controller atapci2@pci5:3:0: class=0x018000 card=0x31141095 chip=0x31141095 rev=0x02 hdr=0x00 vendor = 'Silicon Image Inc (Was: CMD Technology Inc)' device = 'Sil 3114 SATALink/SATARaid Controller' class = mass storage amr0@pci4:1:0: class=0x010400 card=0x05231000 chip=0x19601000 rev=0x01 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' class = mass storage subclass = RAID --Boundary-00=_D7mADdPvPDVPD/Z-- From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 00:05: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 8747216A41F; Wed, 17 Aug 2005 00:05:20 +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 5179F43D45; Wed, 17 Aug 2005 00:05:20 +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 j7H05JNR075086; Tue, 16 Aug 2005 17:05:19 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7H05JnM075085; Tue, 16 Aug 2005 17:05:19 -0700 (PDT) (envelope-from rizzo) Date: Tue, 16 Aug 2005 17:05:19 -0700 From: Luigi Rizzo To: arch@freebsd.org, net@freebsd.org Message-ID: <20050816170519.A74422@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Cc: Subject: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 17 Aug 2005 00:05:20 -0000 [apologies for the cross post but it belongs both to arch and net.] I notice that net/pfil.c and netinet/ip_fw2.c have two copies of aisimilar but slightly different implementation of multiple-reader/single-writer locks, which brings up the question(s): 1. should we rather put this code in the generic kernel code so that other subsystems could make use of it ? E.g. the routing table is certainly a candidate, and especially 2. should we implement it right ? Both implementations are subject to starvation for the writers (which is indeed a problem here, because we might want to modify a ruleset and be prevented from doing it because of incoming traffic that keeps readers active). Also the PFIL_TRY_WLOCK will in fact be blocking if a writer is already in - i have no idea how problematic is this in the way it is actually used. cheers luigi From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 02:35:39 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 77F2C16A41F; Wed, 17 Aug 2005 02:35:39 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id D746843D46; Wed, 17 Aug 2005 02:35:38 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3D793.dip.t-dialin.net [84.163.215.147] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML29c-1E5DmC3q09-0005Ri; Wed, 17 Aug 2005 04:35:36 +0200 From: Max Laier To: Luigi Rizzo Date: Wed, 17 Aug 2005 04:35:19 +0200 User-Agent: KMail/1.8.2 References: <20050816170519.A74422@xorpc.icir.org> In-Reply-To: <20050816170519.A74422@xorpc.icir.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1156185.pn3pmraMmZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508170435.34688.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: arch@freebsd.org, net@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 17 Aug 2005 02:35:39 -0000 --nextPart1156185.pn3pmraMmZ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 17 August 2005 02:05, Luigi Rizzo wrote: > [apologies for the cross post but it belongs both to arch and net.] > > I notice that net/pfil.c and netinet/ip_fw2.c have two copies of > aisimilar but slightly different implementation of > multiple-reader/single-writer locks, which brings up the question(s): > > 1. should we rather put this code in the generic kernel code so that other > subsystems could make use of it ? E.g. the routing table is certainly > a candidate, I have asked this several time on -arch and IRC, but never found anyone=20 willing to pursue it. However, the problem is ... > and especially > > 2. should we implement it right ? > > Both implementations are subject to starvation for the writers > (which is indeed a problem here, because we might want to modify > a ruleset and be prevented from doing it because of incoming traffic > that keeps readers active). > Also the PFIL_TRY_WLOCK will in fact be blocking if a writer > is already in - i have no idea how problematic is this in the > way it is actually used. =2E.. really this. I didn't find a clean way out of the starvation issue. = What=20 I do for pfil is that I set a flag and simply stop serving[2] shared reques= ts=20 once a writer waits for the lock. If a writer can't sleep[1] then we retur= n=20 EBUSY and don't. However, for pfil it's almost ever safe to assume that a= =20 write may sleep (as it is for most instances of this kind of sx-lock where= =20 you have BIGNUMxreads:1xwrite). [1] Note that there is a *big* difference between blocking and sleeping. =20 These two are usually confused. While it is almost always okay to block it= =20 is seldom okay to sleep. The existing sx(9) api has the problem that it=20 *sleeps* in the shared path which renders it unusable for this usecase (as = we=20 might be holding other locks and must not sleep in the shared path). =20 However, sleeping in the shared path is one (?the only?) way out of the=20 starvation problem - other than a problem specific as done for pfil. [2] See pfil(9) BUGS. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1156185.pn3pmraMmZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDAqJ2XyyEoT62BG0RAgM9AJ4kzFxHhG6gUCKDFwfaxNL4NeprdACfSzoW X33PNJnt6EzhMiEntWkt79A= =Ce2y -----END PGP SIGNATURE----- --nextPart1156185.pn3pmraMmZ-- From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 03:20:19 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 ADE7616A41F; Wed, 17 Aug 2005 03:20:19 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A30B43D48; Wed, 17 Aug 2005 03:20:19 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 4A6E4208C8A; Tue, 16 Aug 2005 20:20:19 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7H3KH5E040622; Tue, 16 Aug 2005 20:20:18 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <4302ACF1.6050209@elischer.org> Date: Tue, 16 Aug 2005 20:20:17 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Max Laier References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> In-Reply-To: <200508170435.34688.max@love2party.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Luigi Rizzo , net@freebsd.org, arch@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 17 Aug 2005 03:20:19 -0000 Max Laier wrote: > On Wednesday 17 August 2005 02:05, Luigi Rizzo wrote: > >>[apologies for the cross post but it belongs both to arch and net.] >> >>I notice that net/pfil.c and netinet/ip_fw2.c have two copies of >>aisimilar but slightly different implementation of >>multiple-reader/single-writer locks, which brings up the question(s): >> >>1. should we rather put this code in the generic kernel code so that other >> subsystems could make use of it ? E.g. the routing table is certainly >> a candidate, > > > I have asked this several time on -arch and IRC, but never found anyone > willing to pursue it. However, the problem is ... > > >>and especially >> >>2. should we implement it right ? >> >> Both implementations are subject to starvation for the writers >> (which is indeed a problem here, because we might want to modify >> a ruleset and be prevented from doing it because of incoming traffic >> that keeps readers active). >> Also the PFIL_TRY_WLOCK will in fact be blocking if a writer >> is already in - i have no idea how problematic is this in the >> way it is actually used. > > > ... really this. I didn't find a clean way out of the starvation issue. What > I do for pfil is that I set a flag and simply stop serving[2] shared requests > once a writer waits for the lock. If a writer can't sleep[1] then we return > EBUSY and don't. However, for pfil it's almost ever safe to assume that a > write may sleep (as it is for most instances of this kind of sx-lock where > you have BIGNUMxreads:1xwrite). > > [1] Note that there is a *big* difference between blocking and sleeping. > These two are usually confused. While it is almost always okay to block it > is seldom okay to sleep. The existing sx(9) api has the problem that it > *sleeps* in the shared path which renders it unusable for this usecase (as we > might be holding other locks and must not sleep in the shared path). > However, sleeping in the shared path is one (?the only?) way out of the > starvation problem - other than a problem specific as done for pfil. > > [2] See pfil(9) BUGS. netgraph has yet another implementation of R/W locks. It relies on the fact that every lock action is done on behalf of a command request or a data processing request, each of which is queueable, and each RW lock is associated with a queue. Instead of blocking, the item is queued instead for later processing. > From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 03:29:50 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 17B5016A41F for ; Wed, 17 Aug 2005 03:29:50 +0000 (GMT) (envelope-from boris@ntmk.ru) Received: from mail.ntmk.ru (mail.ntmk.ru [217.114.241.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2F5743D45 for ; Wed, 17 Aug 2005 03:29:48 +0000 (GMT) (envelope-from boris@ntmk.ru) Received: from boris.nikom.ru ([10.1.16.195]) by mail.ntmk.ru with esmtp (Exim 4.51) id 1E5Ecc-0008S2-Py; Wed, 17 Aug 2005 09:29:46 +0600 Message-ID: <4302AF2A.2080809@ntmk.ru> Date: Wed, 17 Aug 2005 09:29:46 +0600 From: Boris Kovalenko User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050809) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Max Laier , freebsd-net@freebsd.org References: <4301499E.8040704@ntmk.ru> <200508161618.02485.max@love2party.net> In-Reply-To: <200508161618.02485.max@love2party.net> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: PR bin/82306 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, 17 Aug 2005 03:29:50 -0000 Max Laier wrote: Hello! > On Tuesday 16 August 2005 04:04, Boris Kovalenko wrote: > >>Hello! >> >> Is there news on PR 82306? Will it be fixed at least with 5.5R? > > > In case anybody is watching here ... please try the attached diff. The behavior has changed. Unfortunatelly I still can assign same ips to the different interfaces but in routes table I see the first installed route only. In other words - the patch did not help. -- With respect, Boris From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 10:24:00 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 AF1D516A41F; Wed, 17 Aug 2005 10:24:00 +0000 (GMT) (envelope-from rebehn@ant.uni-bremen.de) Received: from antsrv1.ant.uni-bremen.de (antsrv1.ant.uni-bremen.de [134.102.176.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id E53E343D45; Wed, 17 Aug 2005 10:23:59 +0000 (GMT) (envelope-from rebehn@ant.uni-bremen.de) Received: from bremerhaven.ant.uni-bremen.de ([134.102.176.10]) by antsrv1.ant.uni-bremen.de with esmtp (Exim 4.52 (FreeBSD)) id 1E5L5O-000H2q-Iw; Wed, 17 Aug 2005 12:23:58 +0200 Message-ID: <4303103A.3000204@ant.uni-bremen.de> Date: Wed, 17 Aug 2005 12:23:54 +0200 From: Heinrich Rebehn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Debian/1.7.8-1 X-Accept-Language: en MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "antsrv1.ant.uni-bremen.de", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi list, Aug 17 12:15:11 antsrv1 kernel: nfsd send error -1 Aug 17 12:15:11 antsrv1 last message repeated 8 times I got several of theese errors in my /var/log/messages. Can someone tell me what this means? -- [...] Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- Subject: 2. try: nfsd send error -1 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, 17 Aug 2005 10:24:00 -0000 Hi list, Aug 17 12:15:11 antsrv1 kernel: nfsd send error -1 Aug 17 12:15:11 antsrv1 last message repeated 8 times I got several of theese errors in my /var/log/messages. Can someone tell me what this means? -- Heinrich Rebehn University of Bremen Physics / Electrical and Electronics Engineering - Department of Telecommunications - Phone : +49/421/218-4664 Fax : -3341 From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 18:23: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 25A3216A41F for ; Wed, 17 Aug 2005 18:23:53 +0000 (GMT) (envelope-from yvan.vanhullebus@netasq.com) Received: from smtp.netasq.com (netasq.netasq.com [213.30.137.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1AFCC43D45 for ; Wed, 17 Aug 2005 18:23:51 +0000 (GMT) (envelope-from yvan.vanhullebus@netasq.com) Received: from [10.2.0.3] (f1000c001440400601.netasq.com [10.0.0.126]) by smtp.netasq.com (Postfix) with ESMTP id EDE56459DB; Wed, 17 Aug 2005 20:20:30 +0200 (CEST) Received: by yvan.netasq.int (Postfix, from userid 1000) id 2DE3954A8; Wed, 17 Aug 2005 20:23:49 +0200 (CEST) Date: Wed, 17 Aug 2005 20:23:49 +0200 From: VANHULLEBUS Yvan To: freebsd-net@freebsd.org Message-ID: <20050817182349.GB2349@yvan.netasq.int> Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="Sr1nOIr3CvdE5hEN" Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: manu@netbsd.org, snap-users@kame.net Subject: Some missing splnet() in key.c 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, 17 Aug 2005 18:23:53 -0000 --Sr1nOIr3CvdE5hEN Content-Type: multipart/mixed; boundary="aM3YZ0Iwxop3KEKx" Content-Disposition: inline --aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all. A few months ago, I reported some missing splnet() in key.c to snap-users@kame.net. I found them by tracking some random and strange problems, which are more likely to happen when running on a "slow" CPU, when having some heavy PFKey activity and when having high IPSec traffic. The attached patch (made against FreeBSD6 version, but should be easy to port to other versions) fixes at least most splnet problems (well, at least, I didn't have any more report for customers which use the latest version including all those locks....). Please note that mixing this patch and the FreeBSD NAT-T patch available on ipsec-tools web site will have a possible dead lock in key_add(), when handling NAT-T extensions (Manu: check that for NetBSD, there is probably the same code !). I'll update quickly FreeBSD6 NAT-T patchset on ipsec-tools web site if this patch is commited on FreeBSD6 source. Yvan. --=20 NETASQ - Secure Internet Connectivity http://www.netasq.com --aM3YZ0Iwxop3KEKx-- --Sr1nOIr3CvdE5hEN Content-Type: application/x-pkcs7-signature Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIINPQYJKoZIhvcNAQcCoIINLjCCDSoCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC CokwggZ/MIIFZ6ADAgECAgpwxrFIFmvykFosMA0GCSqGSIb3DQEBBAUAMIGRMQswCQYDVQQG EwJGUjENMAsGA1UECBMETm9yZDEaMBgGA1UEBxMRVmlsbGVuZXV2ZSBkJ0FzY3ExLjAsBgNV BAoTJU5FVEFTUSAtIFNlY3VyZSBJbnRlcm5ldCBDb25uZWN0aXZpdHkxJzAlBgNVBAsTHk5F VEFTUSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNTA3MTUxNDQ0NDNaFw0wNzA3MTUx NDQ0NDNaMIHYMQswCQYDVQQGEwJGUjENMAsGA1UECBMETm9yZDEuMCwGA1UEChMlTkVUQVNR IC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMeTkVUQVNRIENlcnRp ZmljYXRpb24gQXV0aG9yaXR5MRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEZMBcGA1UE AxMQeXZhbiBWQU5IVUxMRUJVUzEqMCgGCSqGSIb3DQEJARYbeXZhbi52YW5odWxsZWJ1c0Bu ZXRhc3EuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAt0quG0Q0oe+uM8lT HAklvpFArPSxUE8qM+NzfqOUaMaAI9/+Zg1kFOSrcYYRnB0R7ZGj9H+wk92l6+9jdOJx+1cG 9wwhCzTFuN1qxiznhXtryOwZ9vZswnAJXH3b0R0hL0CUsv54KWGsZIDI72KHrEx/KThY7iU7 AMq8/MqGGjSixXzhm89ybWm4N36dWRJvyT3oHFRREDLhGhherC+FJPied4FwIjth7worVD9m SVAPgp0WHpAhMqVe4vp4bJvpT9Qrv38cccfEiaaFaUvOCSF7h5gXy6F+D7xV/3adGqAwZ3sI o1qN4SijkaI6uqbUP+zslX3t78qHSc7HWhVm4QIDAQABo4ICjjCCAoowDAYDVR0TAQH/BAIw ADAdBgNVHQ4EFgQU/CR/mkkP1k1mu7ApVahPzBnqdJowgb4GA1UdIwSBtjCBs4AUJyrrHdlE 2joXc2oJICDJJaj5f7KhgZekgZQwgZExCzAJBgNVBAYTAkZSMQ0wCwYDVQQIEwROb3JkMRow GAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEuMCwGA1UEChMlTkVUQVNRIC0gU2VjdXJlIElu dGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMeTkVUQVNRIENlcnRpZmljYXRpb24gQXV0 aG9yaXR5ggEAMA4GA1UdDwEB/wQEAwIF4DARBglghkgBhvhCAQEEBAMCBaAwKwYJKwYBBAGC NxQCBB4eHABTAG0AYQByAHQAYwBhAHIAZABMAG8AZwBvAG4wLAYDVR0lAQH/BCIwIAYIKwYB BQUHAwQGCCsGAQUFBwMCBgorBgEEAYI3FAICMCsGA1UdEQQkMCKgIAYKKwYBBAGCNxQCA6AS DBB5dmFudkBuZXRhc3EuY29tMIHNBgNVHR8EgcUwgcIwWqBYoFaGVGxkYXA6Ly9wa2kubmV0 YXNxLmNvbS9jbj1md2NhLG91PWNhcyxvPW5ldGFzcSxkYz1mcj9jZXJ0aWZpY2F0ZVJldm9j YXRpb25MaXN0O2JpbmFyeTA4oDagNIYyaHR0cDovL2ludHJhbmV0Lm5ldGFzcS5jb20vaW50 cmFuZXQvcGtpL25ldGFzcS5jcmwwKqAooCaGJGh0dHA6Ly93d3cubmV0YXNxLmNvbS9wa2kv bmV0YXNxLmNybDAfBglghkgBhvhCAQ0EEhYQVXNlciBDZXJ0aWZpY2F0ZTANBgkqhkiG9w0B AQQFAAOCAQEAMlfufwmHT/3KRXLIx0jcRwT9bOboCGMQrI7xK/kk9t0jvGm3KTlVN2uuZ0Hk VU2QWqw6hPPoc1mclOPPWfNW4DHGafbIAqritDMoAtwCe7BkeZFaTRcigrnNJhyIjlfTHrrF Pz8Iul+ZugtAV8gCrpMPrF/RUJ2wgvUiBrp/1zhTZ0WMini5KK/MEiWgvZKHq0Y4riD9Sw5L 84TbPcwQmHG4aQhsKkTNC9S80qurRVmTre+Qo68fzGXznPsSU/atH0OCIka3KYcJmrnoFosh 0fuWOhKRTDfcTVarpCFhFiNvg8gxUxi9kdI2m/u2h7zEYvEH89G4HQ6NFBNvh0XfjjCCBAIw ggLqoAMCAQICAQAwDQYJKoZIhvcNAQEEBQAwgZExCzAJBgNVBAYTAkZSMQ0wCwYDVQQIEwRO b3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEuMCwGA1UEChMlTkVUQVNRIC0gU2Vj dXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMeTkVUQVNRIENlcnRpZmljYXRp b24gQXV0aG9yaXR5MB4XDTAyMDIxOTEyMzQ1NVoXDTIyMDIxNDEyMzQ1NVowgZExCzAJBgNV BAYTAkZSMQ0wCwYDVQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEuMCwG A1UEChMlTkVUQVNRIC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMe TkVUQVNRIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A MIIBCgKCAQEAwYBPi3ref6t0tuJMoj5R4H7sa+WMSZwDh4XHjZV5e6P6LObyrleC6oNFDZJr gBtKk9Swzfnnf4m3xc0QS9kKCPLFwLpmIK3RCx0K4YYi+uBrrL347kH4UPfrI6KvrYcFpG3Y wFZUK+7LZn/Y9HSB6n4gvdiCk7cmkuFr1ifFtDYZqktNUss9yQCPqh0d9dXfuhRV8vyggvVk cfTZcCyVpRaDYaDm0j30Urba62KsKxfh6cEAt6kmPUxviGVaoEiiaABDZVSu6PjS17qDcZaQ zlnwhLacKyM1zR7+lvfFR03/h6m8JYGBPMP7zccH2uJfufh+Of3AvOfCFZFcNhzHCwIDAQAB o2MwYTAdBgNVHQ4EFgQUJyrrHdlE2joXc2oJICDJJaj5f7IwHwYDVR0jBBgwFoAUJyrrHdlE 2joXc2oJICDJJaj5f7IwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZI hvcNAQEEBQADggEBAJclqFN/WqYmhcZlXabrw6KJQNq/TK6TLDHzwZVcyjn0QhujHRr+EcVp aE1pIS4fjsywzpINE3fe9DSlC4IzyeqDq3EtM4eQDSXm4YRGLZp8X2M5TdccmxlElDgZzlVX MOlo/Ehhh4vqzSbc1M4FEfETiEV+vLX5MaWEHH8dmzlEL632mOme19QJN6BQKJPmCCj1VbxJ DrJSpF01kXFJUtyrA0ilrEG0mA+FLFjfsWuZXzYEPjv1/FIPMlSnCCiW8ZSzwstQX2BhLEi0 ugZJRpakVMY/TkdoLEErYt0mjZD+d/oXFR7QNzMxAHpDEPmlZRotP1W7sO6kpBP7lyh/Yc4x ggJ8MIICeAIBATCBoDCBkTELMAkGA1UEBhMCRlIxDTALBgNVBAgTBE5vcmQxGjAYBgNVBAcT EVZpbGxlbmV1dmUgZCdBc2NxMS4wLAYDVQQKEyVORVRBU1EgLSBTZWN1cmUgSW50ZXJuZXQg Q29ubmVjdGl2aXR5MScwJQYDVQQLEx5ORVRBU1EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkC CnDGsUgWa/KQWiwwCQYFKw4DAhoFAKCBsTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwG CSqGSIb3DQEJBTEPFw0wNTA4MTcxODIzNDlaMCMGCSqGSIb3DQEJBDEWBBR4ba9Tmf8G0ls5 OPZXUfd1YtsxKjBSBgkqhkiG9w0BCQ8xRTBDMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIA gDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIBKDANBgkqhkiG9w0BAQEF AASCAQCWfWAlmz3IjlIT7vL8dGS0MdmpazuxN0WS76q2ugRTaQbs1zmhoMOPbQL9hxVNj4Ge CjCAeKy43zGXEOgNwDz9w0dnVy0TDPqlV7xwHskikFs7MNq1RA94vs+NcxImDnmpoDvzBh1n kZU4jKt100dK/NcyAL6sObtbMN9e0XBqAVlgW7aRNyYXzeT1aWqeu2k5PNDX0LvcGlrPOyO/ aHYzDnnfo1m5MKB7zwawWivFwalB+DztemRmiMVAnlHVqiiaHwgSwTbPi00vDseszwZHBhER vg9c1yvuXhmJZc4hf15qjgT53OK0UZTjDkvzdYeZ0DhgZRpT4ah2Z6afgBnz --Sr1nOIr3CvdE5hEN-- From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 18:59: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 A666C16A41F for ; Wed, 17 Aug 2005 18:59:09 +0000 (GMT) (envelope-from yvan.vanhullebus@netasq.com) Received: from smtp.netasq.com (netasq.netasq.com [213.30.137.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4E4243D45 for ; Wed, 17 Aug 2005 18:59:08 +0000 (GMT) (envelope-from yvan.vanhullebus@netasq.com) Received: from [10.2.0.3] (f1000c001440400601.netasq.com [10.0.0.126]) by smtp.netasq.com (Postfix) with ESMTP id 85B5646D50; Wed, 17 Aug 2005 20:55:47 +0200 (CEST) Received: by yvan.netasq.int (Postfix, from userid 1000) id B22E254A8; Wed, 17 Aug 2005 20:59:05 +0200 (CEST) Date: Wed, 17 Aug 2005 20:59:05 +0200 From: VANHULLEBUS Yvan To: freebsd-net@freebsd.org Message-ID: <20050817185905.GA2682@yvan.netasq.int> References: <20050817182349.GB2349@yvan.netasq.int> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline In-Reply-To: <20050817182349.GB2349@yvan.netasq.int> User-Agent: Mutt/1.5.9i X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: manu@netbsd.org, snap-users@kame.net Subject: Re: Some missing splnet() in key.c 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, 17 Aug 2005 18:59:09 -0000 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Looks like there were some problems with SMIME signature and the attachment (my MUA confirms that the attachement was in the sent mail, but I can't see it on the received mail from freebsd-net ML), do here is another try without the SMIME signature... On Wed, Aug 17, 2005 at 08:23:49PM +0200, VANHULLEBUS Yvan wrote: > Hi all. > > A few months ago, I reported some missing splnet() in key.c to > snap-users@kame.net. I found them by tracking some random and strange > problems, which are more likely to happen when running on a "slow" > CPU, when having some heavy PFKey activity and when having high IPSec > traffic. > > The attached patch (made against FreeBSD6 version, but should be easy > to port to other versions) fixes at least most splnet problems (well, > at least, I didn't have any more report for customers which use the > latest version including all those locks....). > > Please note that mixing this patch and the FreeBSD NAT-T patch > available on ipsec-tools web site will have a possible dead lock in > key_add(), when handling NAT-T extensions (Manu: check that for > NetBSD, there is probably the same code !). > > I'll update quickly FreeBSD6 NAT-T patchset on ipsec-tools web site if > this patch is commited on FreeBSD6 source. Yvan. -- NETASQ - Secure Internet Connectivity http://www.netasq.com --UlVJffcvxoiEqYs2-- From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 19:02:50 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 08E6C16A41F for ; Wed, 17 Aug 2005 19:02:50 +0000 (GMT) (envelope-from yvan.vanhullebus@netasq.com) Received: from smtp.netasq.com (netasq.netasq.com [213.30.137.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id A095D43D45 for ; Wed, 17 Aug 2005 19:02:49 +0000 (GMT) (envelope-from yvan.vanhullebus@netasq.com) Received: from [10.2.0.3] (f1000c001440400601.netasq.com [10.0.0.126]) by smtp.netasq.com (Postfix) with ESMTP id 9B9C946E33; Wed, 17 Aug 2005 20:59:24 +0200 (CEST) Received: by yvan.netasq.int (Postfix, from userid 1000) id CAA2F54A8; Wed, 17 Aug 2005 21:02:42 +0200 (CEST) Date: Wed, 17 Aug 2005 21:02:42 +0200 From: VANHULLEBUS Yvan To: freebsd-net@freebsd.org Message-ID: <20050817190242.GA2752@yvan.netasq.int> References: <20050817182349.GB2349@yvan.netasq.int> <20050817185905.GA2682@yvan.netasq.int> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050817185905.GA2682@yvan.netasq.int> User-Agent: Mutt/1.5.9i Cc: manu@netbsd.org, snap-users@kame.net Subject: Re: Some missing splnet() in key.c 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, 17 Aug 2005 19:02:50 -0000 On Wed, Aug 17, 2005 at 08:59:05PM +0200, VANHULLEBUS Yvan wrote: > Looks like there were some problems with SMIME signature and the > attachment (my MUA confirms that the attachement was in the sent mail, > but I can't see it on the received mail from freebsd-net ML), do here > is another try without the SMIME signature... Ok...... Get it at http://vanhu.free.fr/patch-netkey-key.c ! Yvan. -- NETASQ - Secure Internet Connectivity http://www.netasq.com From owner-freebsd-net@FreeBSD.ORG Wed Aug 17 19:07: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 1074E16A41F for ; Wed, 17 Aug 2005 19:07:26 +0000 (GMT) (envelope-from dwlnetnl@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id A655C43D45 for ; Wed, 17 Aug 2005 19:07:25 +0000 (GMT) (envelope-from dwlnetnl@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so205566wra for ; Wed, 17 Aug 2005 12:07:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=DyzBn0w6+OSLKOOc4MsMygrU/R1IKroQftdkRN+4pVqeIR5pWIvSZtc5qhrMhjqdcT1IW0uSfOAVpzean8/YKR9bPUNNLarJh0WvzkNx1GflqDmGzH4/1taVZPVs+MF2kE0SRgiUGr54b/YFPw2ibqfCRHeD5A8mmsLYYCqYYaQ= Received: by 10.54.18.42 with SMTP id 42mr644057wrr; Wed, 17 Aug 2005 12:07:24 -0700 (PDT) Received: by 10.54.32.12 with HTTP; Wed, 17 Aug 2005 12:07:24 -0700 (PDT) Message-ID: <15aa6cf305081712075e42bb57@mail.gmail.com> Date: Wed, 17 Aug 2005 21:07:24 +0200 From: Anner van Hardenbroek To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: Linksys WMP54G don't work with "Project Evil" 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, 17 Aug 2005 19:07:26 -0000 hi, I've today a brand new Linksys WMP54G buyed, but it won't work with 5.4-RELEASE, the if_ndis.ko and ndis.ko. There is no ndis0 device at ifconfig. What can be the problem and how must i solve it? Thanks. Anner. --=20 Anner van Hardenbroek, dwlnetnl at gmail dot com From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 00:02:49 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 CB86C16A41F; Thu, 18 Aug 2005 00:02:49 +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 849D443D49; Thu, 18 Aug 2005 00:02:49 +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 j7I02mEp072251; Wed, 17 Aug 2005 17:02:48 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7I02mBM072250; Wed, 17 Aug 2005 17:02:48 -0700 (PDT) (envelope-from rizzo) Date: Wed, 17 Aug 2005 17:02:48 -0700 From: Luigi Rizzo To: Max Laier Message-ID: <20050817170248.A70991@xorpc.icir.org> References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200508170435.34688.max@love2party.net>; from max@love2party.net on Wed, Aug 17, 2005 at 04:35:19AM +0200 Cc: arch@freebsd.org, net@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 18 Aug 2005 00:02:50 -0000 On Wed, Aug 17, 2005 at 04:35:19AM +0200, Max Laier wrote: > On Wednesday 17 August 2005 02:05, Luigi Rizzo wrote: > > [apologies for the cross post but it belongs both to arch and net.] > > > > I notice that net/pfil.c and netinet/ip_fw2.c have two copies of > > aisimilar but slightly different implementation of > > multiple-reader/single-writer locks, which brings up the question(s): > > > > 1. should we rather put this code in the generic kernel code so that other > > subsystems could make use of it ? E.g. the routing table is certainly > > a candidate, > > I have asked this several time on -arch and IRC, but never found anyone > willing to pursue it. However, the problem is ... > > > and especially > > > > 2. should we implement it right ? > > > > Both implementations are subject to starvation for the writers > > (which is indeed a problem here, because we might want to modify > > a ruleset and be prevented from doing it because of incoming traffic > > that keeps readers active). > > Also the PFIL_TRY_WLOCK will in fact be blocking if a writer > > is already in - i have no idea how problematic is this in the > > way it is actually used. > >... really this. I didn't find a clean way out of the starvation issue. What > I do for pfil is that I set a flag and simply stop serving[2] shared requests > once a writer waits for the lock. If a writer can't sleep[1] then we return > EBUSY and don't. However, for pfil it's almost ever safe to assume that a > write may sleep (as it is for most instances of this kind of sx-lock where > you have BIGNUMxreads:1xwrite). could you guys look at the following code and see if it makes sense, or tell me where i am wrong ? It should solve the starvation and blocking trylock problems, because the active reader does not hold the mutex in the critical section anymore. The lock could well be a spinlock. cheers luigi /* * Implementation of multiple reader-single writer that prevents starvation. * Luigi Rizzo 2005.08.19 * * The mutex m only protects accesses to the struct rwlock. * We can have the following states: * IDLE: readers = 0, writers = 0, br = 0; * any request will be granted immediately. * * READ: readers > 0, writers = 0, br = 0. Read in progress. * Grant read requests immediately, queue write requests and * move to READ1. * When last reader terminates, move to IDLE. * * READ1: readers > 0, writers > 0, br >= 0. * Read in progress, but writers are queued. * Queue read and write requests to qr and wr, respectively. * When the last reader terminates, wakeup the next queued writer * and move to WRITE * * WRITE: readers = 0, writers > 0, br >= 0. * Write in progress, possibly queued readers/writers. * Queue read and write requests to qr and wr, respectively. * When the writer terminates, wake up all readers if any, * otherwise wake up the next writer if any. * Move to READ, READ1, IDLE accordingly. */ struct rwlock { mtx m; /* protects access to the rwlock */ int readers; /* active readers */ int br; /* blocked readers */ int writers; /* active + blocked writers */ cv qr; /* queued readers */ cv qw; /* queued writers */ } int RLOCK(struct rwlock *rwl, int try) { if (!try) mtx_lock(&rwl->m); else if (!mtx_trylock(&rwl->m)) return EBUSY; if (rwl->writers == 0) /* no writer, pass */ rwl->readers++; else { rwl->br++; cv_wait(&rwl->qr, &rwl->m); } mtx_unlock(&rwl->m); return 0; } int WLOCK(struct rwlock *rwl, int try) { if (!try) mtx_lock(&rwl->m); else if (!mtx_trylock(&rwl->m)) return EBUSY; rwl->writers++; if (rwl->readers > 0) /* have readers, must wait */ cv_wait(&rwl->qw, &rwl->m); mtx_unlock(&rwl->m); return 0; } void RUNLOCK(struct rwlock *rwl) { mtx_lock(&rwl->m); rwl->readers--; if (rwl->readers == 0 && rwl->writers > 0) cv_signal(&rwl->qw); mtx_unlock(&rwl->m); } void WUNLOCK(struct rwlock *rwl) { mtx_lock(&rwl->m); rwl->writers--; if (rwl->br > 0) { /* priority to readers */ rwl->readers = rwl->br; rwl->br = 0; cv_broadcast(&rwl->qr); } else if (rwl->writers > 0) cv_signal(&rwl->qw); mtx_unlock(&rwl->m); } From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 01:32:42 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 5974A16A41F; Thu, 18 Aug 2005 01:32:42 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id A442B43D48; Thu, 18 Aug 2005 01:32:41 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3E589.dip.t-dialin.net [84.163.229.137] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwtQ-1E5ZGn3aft-00063d; Thu, 18 Aug 2005 03:32:37 +0200 From: Max Laier To: Luigi Rizzo Date: Thu, 18 Aug 2005 03:32:19 +0200 User-Agent: KMail/1.8.2 References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> <20050817170248.A70991@xorpc.icir.org> In-Reply-To: <20050817170248.A70991@xorpc.icir.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1138726.tHd4SFx7Ar"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508180332.34895.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: arch@freebsd.org, net@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 18 Aug 2005 01:32:42 -0000 --nextPart1138726.tHd4SFx7Ar Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 18 August 2005 02:02, Luigi Rizzo wrote: > On Wed, Aug 17, 2005 at 04:35:19AM +0200, Max Laier wrote: > > On Wednesday 17 August 2005 02:05, Luigi Rizzo wrote: > > > [apologies for the cross post but it belongs both to arch and net.] > > > > > > I notice that net/pfil.c and netinet/ip_fw2.c have two copies of > > > aisimilar but slightly different implementation of > > > multiple-reader/single-writer locks, which brings up the question(s): > > > > > > 1. should we rather put this code in the generic kernel code so that > > > other subsystems could make use of it ? E.g. the routing table is > > > certainly a candidate, > > > > I have asked this several time on -arch and IRC, but never found anyone > > willing to pursue it. However, the problem is ... > > > > > and especially > > > > > > 2. should we implement it right ? > > > > > > Both implementations are subject to starvation for the writers > > > (which is indeed a problem here, because we might want to modify > > > a ruleset and be prevented from doing it because of incoming traff= ic > > > that keeps readers active). > > > Also the PFIL_TRY_WLOCK will in fact be blocking if a writer > > > is already in - i have no idea how problematic is this in the > > > way it is actually used. > > > >... really this. I didn't find a clean way out of the starvation issue.= =20 > > What I do for pfil is that I set a flag and simply stop serving[2] shar= ed > > requests once a writer waits for the lock. If a writer can't sleep[1] > > then we return EBUSY and don't. However, for pfil it's almost ever safe > > to assume that a write may sleep (as it is for most instances of this > > kind of sx-lock where you have BIGNUMxreads:1xwrite). > > could you guys look at the following code and see if it makes sense, > or tell me where i am wrong ? > > It should solve the starvation and blocking trylock problems, > because the active reader does not hold the mutex in the critical > section anymore. The lock could well be a spinlock. The reader doesn't hold the lock over the critical section with the current= =20 implementation either. The write holds the lock over the critical section,= =20 which was a conscious decision. For some cases it does make sense to get r= id=20 of this, however. See inline comments why this doesn't work for pfil. > cheers > luigi > > /* > * Implementation of multiple reader-single writer that prevents > starvation. * Luigi Rizzo 2005.08.19 > * > * The mutex m only protects accesses to the struct rwlock. > * We can have the following states: > * IDLE: readers =3D 0, writers =3D 0, br =3D 0; > * any request will be granted immediately. > * > * READ: readers > 0, writers =3D 0, br =3D 0. Read in progress. > * Grant read requests immediately, queue write requests and > * move to READ1. > * When last reader terminates, move to IDLE. > * > * READ1: readers > 0, writers > 0, br >=3D 0. > * Read in progress, but writers are queued. > * Queue read and write requests to qr and wr, respectively. > * When the last reader terminates, wakeup the next queued writer > * and move to WRITE > * > * WRITE: readers =3D 0, writers > 0, br >=3D 0. > * Write in progress, possibly queued readers/writers. > * Queue read and write requests to qr and wr, respectively. > * When the writer terminates, wake up all readers if any, > * otherwise wake up the next writer if any. > * Move to READ, READ1, IDLE accordingly. > */ > > struct rwlock { > mtx m; /* protects access to the rwlock */ > int readers; /* active readers */ > int br; /* blocked readers */ > int writers; /* active + blocked writers */ > cv qr; /* queued readers */ > cv qw; /* queued writers */ > } > > int > RLOCK(struct rwlock *rwl, int try) > { > if (!try) > mtx_lock(&rwl->m); > else if (!mtx_trylock(&rwl->m)) > return EBUSY; > if (rwl->writers =3D=3D 0) /* no writer, pass */ > rwl->readers++; > else { > rwl->br++; > cv_wait(&rwl->qr, &rwl->m); ^^^^^^^ That we can't do. That's exactly the thing the existing sx(9) implementati= on=20 does and where it breaks. The problem is that cv_wait() is an implicit sle= ep=20 which breaks when we try to RLOCK() with other mutex already acquired. =20 Moreover will this break for recursive reads e.g.: Thread 1: RLOCK() ... RLOCK() -> cv_wait ... Thread 2: WLOCK() -> cv_wait ... This is exactly what pfil_hooks must be able to do as the packet filter may= =20 want to call back to the stack in order to send rejects etc. It would be an idea to use cv_wait() depending on the value in the try=20 argument and return EBUSY for that as well. This is a textbook implementation, that sure will work (given the above=20 change). The problem is, that we still have to invest 4 mutex operations f= or=20 every access. The current implementation has the same basic problem (thoug= h=20 it only uses 2 mutex operations for the WLOCK/UNLOCK). Ideally the RLOCK/= =20 UNLOCK should be free unless there is a writer waiting for the lock. In=20 order to do this I am thinking of a "spl-like" value in the PCPU section. = A=20 write would IPI other CPUs with a request to "raise" the bar once all have= =20 confirmed it would do the write and IPI again. This gives a serious=20 disadvantage to writes, but would allow us to block on failed read requests= =20 instead of erroring out or sleeping. Also, an uncongested read would be fr= ee=20 when compared to the existing solution. I have to read some more to see if this actually works. Comments appreciat= ed! > } > mtx_unlock(&rwl->m); > return 0; > } > > int > WLOCK(struct rwlock *rwl, int try) > { > if (!try) > mtx_lock(&rwl->m); > else if (!mtx_trylock(&rwl->m)) > return EBUSY; > rwl->writers++; > if (rwl->readers > 0) /* have readers, must wait */ > cv_wait(&rwl->qw, &rwl->m); > mtx_unlock(&rwl->m); > return 0; > } > > void > RUNLOCK(struct rwlock *rwl) > { > mtx_lock(&rwl->m); > rwl->readers--; > if (rwl->readers =3D=3D 0 && rwl->writers > 0) > cv_signal(&rwl->qw); > mtx_unlock(&rwl->m); > } > > void > WUNLOCK(struct rwlock *rwl) > { > mtx_lock(&rwl->m); > rwl->writers--; > if (rwl->br > 0) { /* priority to readers */ > rwl->readers =3D rwl->br; > rwl->br =3D 0; > cv_broadcast(&rwl->qr); > } else if (rwl->writers > 0) > cv_signal(&rwl->qw); > mtx_unlock(&rwl->m); > } =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1138726.tHd4SFx7Ar Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDA+UyXyyEoT62BG0RAsJbAJ9deDV6DgsWcpWRrnkqAX3v/CDsVACfZ/fw 35bCcPJKPDG91LbEDylDFPw= =7C2d -----END PGP SIGNATURE----- --nextPart1138726.tHd4SFx7Ar-- From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 07:57:40 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 E5D5C16A41F; Thu, 18 Aug 2005 07:57:40 +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 6671C43D49; Thu, 18 Aug 2005 07:57:40 +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 j7I7veAT083923; Thu, 18 Aug 2005 00:57:40 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7I7vdHi083922; Thu, 18 Aug 2005 00:57:39 -0700 (PDT) (envelope-from rizzo) Date: Thu, 18 Aug 2005 00:57:39 -0700 From: Luigi Rizzo To: Max Laier Message-ID: <20050818005739.A83776@xorpc.icir.org> References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> <20050817170248.A70991@xorpc.icir.org> <200508180332.34895.max@love2party.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200508180332.34895.max@love2party.net>; from max@love2party.net on Thu, Aug 18, 2005 at 03:32:19AM +0200 Cc: arch@freebsd.org, net@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 18 Aug 2005 07:57:41 -0000 On Thu, Aug 18, 2005 at 03:32:19AM +0200, Max Laier wrote: > On Thursday 18 August 2005 02:02, Luigi Rizzo wrote: ... > > could you guys look at the following code and see if it makes sense, > > or tell me where i am wrong ? > > > > It should solve the starvation and blocking trylock problems, > > because the active reader does not hold the mutex in the critical ^^^^^^ i meant 'writer', sorry... as max said even in the current implementation the reader does not hold the lock. > > int > > RLOCK(struct rwlock *rwl, int try) > > { > > if (!try) > > mtx_lock(&rwl->m); > > else if (!mtx_trylock(&rwl->m)) > > return EBUSY; > > if (rwl->writers == 0) /* no writer, pass */ > > rwl->readers++; > > else { > > rwl->br++; > > cv_wait(&rwl->qr, &rwl->m); > ^^^^^^^ > > That we can't do. That's exactly the thing the existing sx(9) implementation > does and where it breaks. The problem is that cv_wait() is an implicit sleep > which breaks when we try to RLOCK() with other mutex already acquired. but that is not a solvable problem given that the *LOCK may be blocking. And the cv_wait is not an unconditioned sleep, it is one where you release the lock right before ans wait for an event to wake you up. In fact i don't understand why you consider spinning and sleeping on a mutex two different things. > Moreover will this break for recursive reads e.g.: > > Thread 1: RLOCK() ... RLOCK() -> cv_wait ... > Thread 2: WLOCK() -> cv_wait ... > > This is exactly what pfil_hooks must be able to do as the packet filter may > want to call back to the stack in order to send rejects etc. that's another story (also in issue in ipfw) and the way it is addressed elsewhere is by releasing and reaquiring the lock. In fact is the topic that started this thread. > change). The problem is, that we still have to invest 4 mutex operations for > every access. The current implementation has the same basic problem (though > it only uses 2 mutex operations for the WLOCK/UNLOCK). Ideally the RLOCK/ > UNLOCK should be free unless there is a writer waiting for the lock. In "free unless" means not free - you always have to check, be it through an atomic cmpswap or something else. But this is what mtx_lock does anyways in the fast path. cheers luigi From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 10:24: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 6B1E216A41F; Thu, 18 Aug 2005 10:24:47 +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 7187043D45; Thu, 18 Aug 2005 10:24:46 +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 j7IAOjWb085397; Thu, 18 Aug 2005 03:24:45 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7IAOjrS085396; Thu, 18 Aug 2005 03:24:45 -0700 (PDT) (envelope-from rizzo) Date: Thu, 18 Aug 2005 03:24:45 -0700 From: Luigi Rizzo To: developers@freebsd.org Message-ID: <20050818032445.B85210@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Cc: net@freebsd.org Subject: in Philadelphia/Sigcomm next week 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, 18 Aug 2005 10:24:47 -0000 hi, i will be in Philadelphia for SIGCOMM next week (mon-thu). (i will also be in Pittsburgh sat&sun, if someone lives there). If any of you is around/interested in meeting please contact me by email. cheers luigi From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 11:45: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 DFA3C16A420 for ; Thu, 18 Aug 2005 11:45:24 +0000 (GMT) (envelope-from shiner_chen@yahoo.com.cn) Received: from web15502.mail.cnb.yahoo.com (web15502.mail.cnb.yahoo.com [202.165.102.31]) by mx1.FreeBSD.org (Postfix) with SMTP id A21B843D48 for ; Thu, 18 Aug 2005 11:45:23 +0000 (GMT) (envelope-from shiner_chen@yahoo.com.cn) Received: (qmail 57105 invoked by uid 60001); 18 Aug 2005 11:45:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=HOT1vA464342YSlm8yNCSCyN+Bs8/lwaqEcaPFOobsqdW2hfwaBRdkfwplqSf98+K6/XEnmGtU5TC54q5uEcpQ8QwJZF9xrg3K9sj8qXVAmjk0o99XMv8rOxgqHRO2/OF4RRGJQYMMoIgfEvsyYP7ZLwKUsw2JQN8hc3BpNSP/o= ; Message-ID: <20050818114522.57103.qmail@web15502.mail.cnb.yahoo.com> Received: from [61.187.16.2] by web15502.mail.cnb.yahoo.com via HTTP; Thu, 18 Aug 2005 19:45:21 CST Date: Thu, 18 Aug 2005 19:45:21 +0800 (CST) From: shiner chen To: freebsd-net@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 18 Aug 2005 12:31:46 +0000 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: who can give me the document about the implement and design of the pfilinterface 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, 18 Aug 2005 11:45:25 -0000 Recently ,I read the code of the pfil interface was designed and implemented by Matthew R. Green. I want to get the Diagram illustrating the flow of TCP/IP packets through the various stages introduced by pfil interface and the document about the implement and design of the pfilinterface. Who can help me ? thanks!! shiner Aug ,18th 2005 --------------------------------- DO YOU YAHOO!? ÑÅ»¢Ãâ·ÑGÓÊÏ䣭ÖйúµÚÒ»¾øÎÞÀ¬»øÓʼþɧÈų¬´óÓÊÏä From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 12:02: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 4EE3116A41F for ; Thu, 18 Aug 2005 12:02:59 +0000 (GMT) (envelope-from shiner_chen@yahoo.com.cn) Received: from web15501.mail.cnb.yahoo.com (web15501.mail.cnb.yahoo.com [202.165.102.30]) by mx1.FreeBSD.org (Postfix) with SMTP id 6A72A43D46 for ; Thu, 18 Aug 2005 12:02:57 +0000 (GMT) (envelope-from shiner_chen@yahoo.com.cn) Received: (qmail 80009 invoked by uid 60001); 18 Aug 2005 12:02:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=rB/I+V6E5JZ4fMy9+K7xshVFM21Ga+jrMBAuKZpfEVIEGb4/AH+9vNVYsay3s+6wvWN9UES0kCaf0/AsQn7iUCKmWMtYhxHQlrJ9115E9SPkBXpkv1hCcKk3cs0U8QGRdOUPkJeZYbhWA8pBoKyMMc3EGLSW2upuEBTmHOVa45o= ; Message-ID: <20050818120256.80007.qmail@web15501.mail.cnb.yahoo.com> Received: from [61.187.16.2] by web15501.mail.cnb.yahoo.com via HTTP; Thu, 18 Aug 2005 20:02:56 CST Date: Thu, 18 Aug 2005 20:02:56 +0800 (CST) From: shiner chen To: freebsd-net@freebsd.org MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 18 Aug 2005 12:31:46 +0000 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: about the implement and design of the pfil interface 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, 18 Aug 2005 12:02:59 -0000 Recently ,I read the code of the pfil interface was designed and implemented by Matthew R. Green. I want to get the Diagram illustrating the flow of TCP/IP packets through the various stages introduced by pfil interface and the document about the implement and design of the pfilinterface. Who can help me ? thanks!! shiner Aug ,18th 2005 --------------------------------- DO YOU YAHOO!? ÑÅ»¢Ãâ·ÑGÓÊÏ䣭ÖйúµÚÒ»¾øÎÞÀ¬»øÓʼþɧÈų¬´óÓÊÏä From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 14:18:38 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 DE7EF16A41F for ; Thu, 18 Aug 2005 14:18:38 +0000 (GMT) (envelope-from ups@tree.com) Received: from smtp.speedfactory.net (smtp.speedfactory.net [66.23.216.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 849F443D46 for ; Thu, 18 Aug 2005 14:18:37 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 9936 invoked by uid 210); 18 Aug 2005 14:19:00 +0000 Received: from 66.23.216.49 by talon (envelope-from , uid 201) with qmail-scanner-1.25st (clamdscan: 0.85.1/1030. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:1(66.23.216.49):. Processed in 0.051598 secs); 18 Aug 2005 14:19:00 -0000 X-Qmail-Scanner-Mail-From: ups@tree.com via talon X-Qmail-Scanner: 1.25st (Clear:RC:1(66.23.216.49):. Processed in 0.051598 secs Process 9926) Received: from 66-23-216-49.clients.speedfactory.net (HELO palm.tree.com) (66.23.216.49) by smtp.speedfactory.net with AES256-SHA encrypted SMTP; 18 Aug 2005 14:19:00 +0000 Received: from [127.0.0.1] (ups@localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j7IEIXrK007363; Thu, 18 Aug 2005 10:18:35 -0400 (EDT) (envelope-from ups@tree.com) From: Stephan Uphoff To: Luigi Rizzo In-Reply-To: <20050818005739.A83776@xorpc.icir.org> References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> <20050817170248.A70991@xorpc.icir.org> <200508180332.34895.max@love2party.net> <20050818005739.A83776@xorpc.icir.org> Content-Type: text/plain Message-Id: <1124374713.1360.64660.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 18 Aug 2005 10:18:33 -0400 Content-Transfer-Encoding: 7bit Cc: Max Laier , net@freebsd.org, arch@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 18 Aug 2005 14:18:39 -0000 On Thu, 2005-08-18 at 03:57, Luigi Rizzo wrote: > On Thu, Aug 18, 2005 at 03:32:19AM +0200, Max Laier wrote: > > On Thursday 18 August 2005 02:02, Luigi Rizzo wrote: > ... > > > could you guys look at the following code and see if it makes sense, > > > or tell me where i am wrong ? > > > > > > It should solve the starvation and blocking trylock problems, > > > because the active reader does not hold the mutex in the critical > ^^^^^^ > > i meant 'writer', sorry... as max said even in the current implementation > the reader does not hold the lock. > > > > int > > > RLOCK(struct rwlock *rwl, int try) > > > { > > > if (!try) > > > mtx_lock(&rwl->m); > > > else if (!mtx_trylock(&rwl->m)) > > > return EBUSY; > > > if (rwl->writers == 0) /* no writer, pass */ > > > rwl->readers++; > > > else { > > > rwl->br++; > > > cv_wait(&rwl->qr, &rwl->m); > > ^^^^^^^ > > > > That we can't do. That's exactly the thing the existing sx(9) implementation > > does and where it breaks. The problem is that cv_wait() is an implicit sleep > > which breaks when we try to RLOCK() with other mutex already acquired. > > but that is not a solvable problem given that the *LOCK may be blocking. > And the cv_wait is not an unconditioned sleep, it is one where you release > the lock right before ans wait for an event to wake you up. > In fact i don't understand why you consider spinning and sleeping > on a mutex two different things. The major difference between sleeping (cv_wait,msleep,..) and blocking on a mutex is priority inheritance. If you need to be able to use (non-spin) mutexes while holding a [R|W]LOCK and use a [R|W]LOCK while holding a (non-spin) mutex then you need to implement priority inheritance for [R|W]LOCKs. For the (single) write lock holder tracking priority is easy. (just like a (non-spin) mutex). However priority inheritance to multiple readers is more difficult as one needs to keep track of all holders of the lock. Keeping track of all readers requires pre-allocated memory resources. This memory could come from 1) A limited global pool 2) A limited per [R|W]LOCK pool 3) A limited per thread pool 4) As a parameter for acquiring a RLOCK None of the choices are really pretty. (1),(2) and (3) can lead to limiting reader parallelism when running out of resources. (4) may be practically for some cases since the memory could be allocated from stack. However since the memory must be valid while holding a read lock choice (4) makes some algorithms (than use for example lock crabbing) a bit harder to implement. > > Moreover will this break for recursive reads e.g.: > > > > Thread 1: RLOCK() ... RLOCK() -> cv_wait ... > > Thread 2: WLOCK() -> cv_wait ... > > > > This is exactly what pfil_hooks must be able to do as the packet filter may > > want to call back to the stack in order to send rejects etc. > > that's another story (also in issue in ipfw) and the way it is addressed > elsewhere is by releasing and reaquiring the lock. In fact is the topic > that started this thread. > > > change). The problem is, that we still have to invest 4 mutex operations for > > every access. The current implementation has the same basic problem (though > > it only uses 2 mutex operations for the WLOCK/UNLOCK). Ideally the RLOCK/ > > UNLOCK should be free unless there is a writer waiting for the lock. In > > "free unless" means not free - you always have to check, be it through > an atomic cmpswap or something else. But this is what mtx_lock does > anyways in the fast path. > > cheers > luigi > From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 14:31:24 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 E253B16A41F; Thu, 18 Aug 2005 14:31:24 +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 A349E43D48; Thu, 18 Aug 2005 14:31:24 +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 j7IEVOYw087693; Thu, 18 Aug 2005 07:31:24 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id j7IEVOQn087692; Thu, 18 Aug 2005 07:31:24 -0700 (PDT) (envelope-from rizzo) Date: Thu, 18 Aug 2005 07:31:24 -0700 From: Luigi Rizzo To: Stephan Uphoff Message-ID: <20050818073124.A87225@xorpc.icir.org> References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> <20050817170248.A70991@xorpc.icir.org> <200508180332.34895.max@love2party.net> <20050818005739.A83776@xorpc.icir.org> <1124374713.1360.64660.camel@palm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <1124374713.1360.64660.camel@palm>; from ups@tree.com on Thu, Aug 18, 2005 at 10:18:33AM -0400 Cc: arch@freebsd.org, Max Laier , net@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 18 Aug 2005 14:31:25 -0000 On Thu, Aug 18, 2005 at 10:18:33AM -0400, Stephan Uphoff wrote: > On Thu, 2005-08-18 at 03:57, Luigi Rizzo wrote: ... > > In fact i don't understand why you consider spinning and sleeping > > on a mutex two different things. > > The major difference between sleeping (cv_wait,msleep,..) and blocking > on a mutex is priority inheritance. > If you need to be able to use (non-spin) mutexes while holding a > [R|W]LOCK and use a [R|W]LOCK while holding a (non-spin) mutex then you > need to implement priority inheritance for [R|W]LOCKs. is that required (in FreeBSD, i mean) for algorithmic correctness or just for performance ? cheers luigi From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 16:07: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 9440A16A447 for ; Thu, 18 Aug 2005 16:07:02 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0137F43D49 for ; Thu, 18 Aug 2005 16:07:01 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3DEDC.dip.t-dialin.net [84.163.222.220] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKxQS-1E5muu0JLQ-0004Ak; Thu, 18 Aug 2005 18:06:56 +0200 From: Max Laier To: freebsd-net@freebsd.org Date: Thu, 18 Aug 2005 18:06:42 +0200 User-Agent: KMail/1.8.2 References: <20050818120256.80007.qmail@web15501.mail.cnb.yahoo.com> In-Reply-To: <20050818120256.80007.qmail@web15501.mail.cnb.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart6337274.4qFF2rcy3S"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508181806.53793.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: shiner chen Subject: Re: about the implement and design of the pfil interface 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, 18 Aug 2005 16:07:02 -0000 --nextPart6337274.4qFF2rcy3S Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 18 August 2005 14:02, shiner chen wrote: > Recently ,I read the code of the pfil interface was designed and > implemented by Matthew R. Green. I want to get the Diagram illustrating > the flow of TCP/IP packets through the various stages introduced by pfil > interface and the document about the implement and design of the > pfilinterface. Who can help me ? thanks!! In FreeBSD we only have pfil_hooks for IP level packets. While the=20 instrumentation is there to provide other hook points with the pfil API it= =20 hasn't happend as it would result in performance degradation (at least one= =20 function call/memory read per hook point). Unless a specific application=20 makes it worthwhile to add another hookup point, I don't think it's=20 worthwhile to provide such. There is some work going on to provide L2 hook= s,=20 however. More information about FreeBSD's pfil implementation can be found in=20 src/sys/net/pfil.? and the pfil(9) manpage. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart6337274.4qFF2rcy3S Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDBLIdXyyEoT62BG0RAnmAAJ0Wq5woq/ruE4z3LckVNgUV9q1Y6QCdEBZr qyU9dq9L/3L9rZ0nooltjrU= =T2Mc -----END PGP SIGNATURE----- --nextPart6337274.4qFF2rcy3S-- From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 16:28:27 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 8D70716A41F; Thu, 18 Aug 2005 16:28:27 +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 0EDE743D48; Thu, 18 Aug 2005 16:28:26 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: from [10.50.40.201] (Not Verified[10.50.40.201]) by mv.twc.weather.com with NetIQ MailMarshal (v6, 0, 3, 8) id ; Thu, 18 Aug 2005 12:43:26 -0400 From: John Baldwin To: freebsd-arch@freebsd.org Date: Thu, 18 Aug 2005 10:26:33 -0400 User-Agent: KMail/1.8 References: <20050816170519.A74422@xorpc.icir.org> <20050818005739.A83776@xorpc.icir.org> <1124374713.1360.64660.camel@palm> In-Reply-To: <1124374713.1360.64660.camel@palm> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200508181026.35502.jhb@FreeBSD.org> Cc: arch@freebsd.org, Luigi Rizzo , net@freebsd.org, Max Laier , Stephan Uphoff Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 18 Aug 2005 16:28:27 -0000 On Thursday 18 August 2005 10:18 am, Stephan Uphoff wrote: > On Thu, 2005-08-18 at 03:57, Luigi Rizzo wrote: > > On Thu, Aug 18, 2005 at 03:32:19AM +0200, Max Laier wrote: > > > On Thursday 18 August 2005 02:02, Luigi Rizzo wrote: > > > > ... > > > > > > could you guys look at the following code and see if it makes sense, > > > > or tell me where i am wrong ? > > > > > > > > It should solve the starvation and blocking trylock problems, > > > > because the active reader does not hold the mutex in the critical > > > > ^^^^^^ > > > > i meant 'writer', sorry... as max said even in the current implementation > > the reader does not hold the lock. > > > > > > int > > > > RLOCK(struct rwlock *rwl, int try) > > > > { > > > > if (!try) > > > > mtx_lock(&rwl->m); > > > > else if (!mtx_trylock(&rwl->m)) > > > > return EBUSY; > > > > if (rwl->writers == 0) /* no writer, pass */ > > > > rwl->readers++; > > > > else { > > > > rwl->br++; > > > > cv_wait(&rwl->qr, &rwl->m); > > > > > > ^^^^^^^ > > > > > > That we can't do. That's exactly the thing the existing sx(9) > > > implementation does and where it breaks. The problem is that cv_wait() > > > is an implicit sleep which breaks when we try to RLOCK() with other > > > mutex already acquired. > > > > but that is not a solvable problem given that the *LOCK may be blocking. > > And the cv_wait is not an unconditioned sleep, it is one where you > > release the lock right before ans wait for an event to wake you up. > > In fact i don't understand why you consider spinning and sleeping > > on a mutex two different things. > > The major difference between sleeping (cv_wait,msleep,..) and blocking > on a mutex is priority inheritance. > If you need to be able to use (non-spin) mutexes while holding a > [R|W]LOCK and use a [R|W]LOCK while holding a (non-spin) mutex then you > need to implement priority inheritance for [R|W]LOCKs. > For the (single) write lock holder tracking priority is easy. (just like > a (non-spin) mutex). However priority inheritance to multiple readers is > more difficult as one needs to keep track of all holders of the lock. > Keeping track of all readers requires pre-allocated memory resources. > This memory could come from > 1) A limited global pool > 2) A limited per [R|W]LOCK pool > 3) A limited per thread pool > 4) As a parameter for acquiring a RLOCK > None of the choices are really pretty. > (1),(2) and (3) can lead to limiting reader parallelism when running out > of resources. (4) may be practically for some cases since the memory > could be allocated from stack. However since the memory must be valid > while holding a read lock choice (4) makes some algorithms (than use for > example lock crabbing) a bit harder to implement. Solaris handles the read case by only tracking the first thread to get a read lock (referred to as the "owner of record" IIRC) and only propagating priority to that thread and ignoring other readers. They admit it's not perfect as well. That's mentioned in the Solaris Internals book. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 16:40:03 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 60AB716A41F for ; Thu, 18 Aug 2005 16:40:03 +0000 (GMT) (envelope-from ern001@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE34943D46 for ; Thu, 18 Aug 2005 16:40:02 +0000 (GMT) (envelope-from ern001@gmail.com) Received: by wproxy.gmail.com with SMTP id i4so401343wra for ; Thu, 18 Aug 2005 09:40:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=XwD8ElwFG8F5oEcq3LxwI/G3oMeixR+BI2WTikuoXBpaj7aghN9yW74kq8facC8FcfBfTE14Ua4wHc09PtUXY47m/ALIMSe8xvBnhLkl53Ydd0VvpddTDDNfl7fbRjsFuZpPyx0Z+2JtZTJirgHOB7CzWfXQ7zrKxxQV2jB+QZw= Received: by 10.54.11.10 with SMTP id 10mr1329195wrk; Thu, 18 Aug 2005 09:40:00 -0700 (PDT) Received: by 10.54.81.11 with HTTP; Thu, 18 Aug 2005 09:40:00 -0700 (PDT) Message-ID: <726b9b2105081809406dffa54f@mail.gmail.com> Date: Thu, 18 Aug 2005 10:40:00 -0600 From: Ernie To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: spdadd IPSec tunnel with AH+ESP 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, 18 Aug 2005 16:40:03 -0000 I'm trying to setup FreeBSD 5.4 in tunnel mode with AH+ESP, what is the appropriate spdadd syntax to pass to setkey to set this policy? Currently I'm trying, spdadd 192.168.1.60 192.168.1.250 any -P out ipsec esp/tunnel/192.168.1.60-192.168.1.250/use ah/tunnel/192.168.1.60-192.168.1.250/use; spdadd 192.168.1.250 192.168.1.60 any -P in ipsec esp/tunnel/192.168.1.250-192.168.1.60/use ah/tunnel/192.168.1.250-192.168.1.60/use; but cannot get it to interop with vxWorks or Windows XP, but those two interop just fine, so I'm supposing that my spd policies are setup incorrectly. Also the same setup works perfectly with both vxWorks and Windows XP in transport mode. Anyway just want to know what is the correct way of setting up AH+ESP for spd. Thanks, Ernie From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 18:36: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 CFF4C16A47B for ; Thu, 18 Aug 2005 18:36:56 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: from web53906.mail.yahoo.com (web53906.mail.yahoo.com [206.190.36.216]) by mx1.FreeBSD.org (Postfix) with SMTP id 267D743D46 for ; Thu, 18 Aug 2005 18:36:56 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: (qmail 22196 invoked by uid 60001); 18 Aug 2005 18:36:55 -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=gQdWjHRb2a2u4ms81JsKvMNrM/X5BQQha4k6kbP0ImyH3wDXDwWaxU8Sa/L/qk7uxWXK29ik2/poibjH3+fvvtrW1NOPCO9urDx3LLds268GafT4oOaxWRITuyX1WBfdwC1luJlGzayqXIL1KrqGNl5JECvPgeFIys7Zw5cOHvs= ; Message-ID: <20050818183655.22192.qmail@web53906.mail.yahoo.com> Received: from [128.200.38.147] by web53906.mail.yahoo.com via HTTP; Thu, 18 Aug 2005 11:36:55 PDT Date: Thu, 18 Aug 2005 11:36:55 -0700 (PDT) From: Daniel Valencia To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: multiple interfaces 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, 18 Aug 2005 18:36:57 -0000 Hello, everybody Is there any limit as of how many interfaces can freebsd handle? Im trying to build a switch in a PC box, putting multiple NICs and some software... The issue is, even though all of the cards work correctly by themselves, once I put them together, it doesnt matter what slots i use, I can never make more than two of them work. For even though all the rest appear up as well, I cant ping neither them nor their peers (Im using crossover cables). Thank you, Daniel __________________________________ Yahoo! Mail for Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 19:16:39 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 E2E1F16A41F for ; Thu, 18 Aug 2005 19:16:39 +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 7D42A43D45 for ; Thu, 18 Aug 2005 19:16:39 +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 j7IJGd33000998; Thu, 18 Aug 2005 12:16:39 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7IJGdLK000997; Thu, 18 Aug 2005 12:16:39 -0700 Date: Thu, 18 Aug 2005 12:16:39 -0700 From: Brooks Davis To: Daniel Valencia Message-ID: <20050818191639.GB28174@odin.ac.hmc.edu> References: <20050818183655.22192.qmail@web53906.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline In-Reply-To: <20050818183655.22192.qmail@web53906.mail.yahoo.com> 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 Subject: Re: multiple interfaces 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, 18 Aug 2005 19:16:40 -0000 --yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 18, 2005 at 11:36:55AM -0700, Daniel Valencia wrote: > Hello, everybody >=20 > Is there any limit as of how many interfaces can > freebsd handle? Im trying to build a switch in a PC > box, putting multiple NICs and some software... The > issue is, even though all of the cards work correctly > by themselves, once I put them together, it doesnt > matter what slots i use, I can never make more than > two of them work. For even though all the rest appear > up as well, I cant ping neither them nor their peers > (Im using crossover cables). The software limit is 2^16-1. It sounds like you are having hardware issues. I'd tend to guess interrupt routing issues. I'd suggest posting details to freebsd-questions or possibly freebsd-stable. -- 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 --yEPQxsgoJgBvi8ip Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDBN6WXY6L6fI4GtQRApnQAKCLjuPxI/to57Bk2k2f1VBhBXOVlgCfd/Al tKNss+urrmeVOSAMll0YQKc= =q0it -----END PGP SIGNATURE----- --yEPQxsgoJgBvi8ip-- From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 19:40:38 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 789EC16A41F for ; Thu, 18 Aug 2005 19:40:38 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: from web53908.mail.yahoo.com (web53908.mail.yahoo.com [206.190.36.218]) by mx1.FreeBSD.org (Postfix) with SMTP id 7946D43D5E for ; Thu, 18 Aug 2005 19:40:32 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: (qmail 59269 invoked by uid 60001); 18 Aug 2005 19:40:31 -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=we/m/aRb4i9s2Wwg+46BX7xe6f29EMLDgYknd9CIRoTY+fYyfGa1Ti7eboDolOBxDjP6Jz/wKR9Qys8o21F5SlZ1gUfW5tbSaXlOkUPQuT3wzOFzmH15Xuqf2rFey4KlxLXKuHdSjKONBJkycaCzmkoljLAlyhBOmhwKSHCkzpc= ; Message-ID: <20050818194031.59265.qmail@web53908.mail.yahoo.com> Received: from [128.200.38.147] by web53908.mail.yahoo.com via HTTP; Thu, 18 Aug 2005 12:40:31 PDT Date: Thu, 18 Aug 2005 12:40:31 -0700 (PDT) From: Daniel Valencia To: freebsd-net@freebsd.org In-Reply-To: <20050818191639.GB28174@odin.ac.hmc.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: multiple interfaces 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, 18 Aug 2005 19:40:38 -0000 Hi from the boot messages, i can see that the network devices are started up properly. Strangely enough, the one that doesnt seem to be assigned an IRQ# is not having any problems, but one of the ones that is. Here are the boot messages de0: port 0x4000-0x407f mem 0xf4a01000-0xf4a0107f at device 11.0 on pci2 de0: SMC 9332BDT 21140A [10-100Mb/s] pass 2.0 de0: Ethernet address: 00:00:c0:7f:a1:fd de0: if_start running deferred for Giant xl0: <3Com 3c905C-TX Fast Etherlink XL> port 0x4080-0x40ff mem 0xf4a01400-0xf4a0147f irq 10 at device 13.0 on pci2 miibus0: on xl0 xlphy0: <3c905C 10/100 internal PHY> on miibus0 xlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl0: Ethernet address: 00:01:02:c1:ba:82 xl1: <3Com 3c905C-TX Fast Etherlink XL> port 0x4400-0x447f mem 0xf4a01800-0xf4a0187f irq 11 at device 15.0 on pci2 miibus1: on xl1 xlphy1: <3c905C 10/100 internal PHY> on miibus1 xlphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto xl1: Ethernet address: 00:01:02:44:3c:22 Here goes my ifconfig > ifconfig de0: flags=108843 mtu 1500 inet 128.200.38.140 netmask 0xffffff00 broadcast 128.200.38.255 inet6 fe80::200:c0ff:fe7f:a1fd%de0 prefixlen 64 scopeid 0x1 ether 00:00:c0:7f:a1:fd media: Ethernet autoselect (100baseTX ) status: active xl0: flags=8843 mtu 1500 options=9 inet 10.0.1.1 netmask 0xffff0000 broadcast 10.0.255.255 inet6 fe80::201:2ff:fec1:ba82%xl0 prefixlen 64 scopeid 0x2 ether 00:01:02:c1:ba:82 media: Ethernet autoselect (100baseTX ) status: active xl1: flags=8843 mtu 1500 options=9 inet 10.0.1.2 netmask 0xffff0000 broadcast 10.0.255.255 inet6 fe80::201:2ff:fe44:3c22%xl1 prefixlen 64 scopeid 0x3 ether 00:01:02:44:3c:22 media: Ethernet autoselect (100baseTX ) status: active lo0: flags=8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > And, at last, a few ping attempts > ping -c 1 128.200.38.140 PING 128.200.38.140 (128.200.38.140): 56 data bytes 64 bytes from 128.200.38.140: icmp_seq=0 ttl=64 time=0.130 ms --- 128.200.38.140 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.130/0.130/0.130/0.000 ms > ping -c 1 10.0.1.1 PING 10.0.1.1 (10.0.1.1): 56 data bytes 64 bytes from 10.0.1.1: icmp_seq=0 ttl=64 time=0.128 ms --- 10.0.1.1 ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.128/0.128/0.128/0.000 ms > ping -c 1 10.0.1.2 PING 10.0.1.2 (10.0.1.2): 56 data bytes --- 10.0.1.2 ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss > Thank you very much, Daniel --- Brooks Davis wrote: > On Thu, Aug 18, 2005 at 11:36:55AM -0700, Daniel > Valencia wrote: > > Hello, everybody > > > > Is there any limit as of how many interfaces can > > freebsd handle? Im trying to build a switch in a > PC > > box, putting multiple NICs and some software... > The > > issue is, even though all of the cards work > correctly > > by themselves, once I put them together, it doesnt > > matter what slots i use, I can never make more > than > > two of them work. For even though all the rest > appear > > up as well, I cant ping neither them nor their > peers > > (Im using crossover cables). > > The software limit is 2^16-1. It sounds like you > are having hardware > issues. I'd tend to guess interrupt routing issues. > I'd suggest > posting details to freebsd-questions or possibly > freebsd-stable. > > -- Brooks > > -- > 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 > ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 19:49: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 D66FA16A41F; Thu, 18 Aug 2005 19:49:33 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2E21D43D49; Thu, 18 Aug 2005 19:49:32 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3F59F.dip.t-dialin.net [84.163.245.159] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0ML2Dk-1E5qOI1aKk-0006kz; Thu, 18 Aug 2005 21:49:30 +0200 From: Max Laier To: freebsd-net@freebsd.org Date: Thu, 18 Aug 2005 21:49:12 +0200 User-Agent: KMail/1.8.2 References: <20050818194031.59265.qmail@web53908.mail.yahoo.com> In-Reply-To: <20050818194031.59265.qmail@web53908.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1295349.fEuikPp24Q"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508182149.28833.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Daniel Valencia Subject: Re: multiple interfaces 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, 18 Aug 2005 19:49:34 -0000 --nextPart1295349.fEuikPp24Q Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 18 August 2005 21:40, Daniel Valencia wrote: > Here goes my ifconfig > > > ifconfig > > inet 10.0.1.1 netmask 0xffff0000 broadcast 10.0.255.255 > inet 10.0.1.2 netmask 0xffff0000 broadcast 10.0.255.255 Can you also show your routing table for this? Please try to disable word= =20 wrap this time ... the ifconfig was barely legible. Thanks. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1295349.fEuikPp24Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDBOZIXyyEoT62BG0RAndkAJ9qtZV+xqtT5esbHssqPBZnpIAVjwCfRBve DiAkSAOcOu+p0HZfqB61EgA= =lYhJ -----END PGP SIGNATURE----- --nextPart1295349.fEuikPp24Q-- From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 19:50:35 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 D8B0F16A41F for ; Thu, 18 Aug 2005 19:50:35 +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 6FAB743D53 for ; Thu, 18 Aug 2005 19:50:35 +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 j7IJoY98005015; Thu, 18 Aug 2005 12:50:34 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7IJoYLY005014; Thu, 18 Aug 2005 12:50:34 -0700 Date: Thu, 18 Aug 2005 12:50:34 -0700 From: Brooks Davis To: Daniel Valencia Message-ID: <20050818195034.GC28174@odin.ac.hmc.edu> References: <20050818191639.GB28174@odin.ac.hmc.edu> <20050818194031.59265.qmail@web53908.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qjNfmADvan18RZcF" Content-Disposition: inline In-Reply-To: <20050818194031.59265.qmail@web53908.mail.yahoo.com> 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 Subject: Re: multiple interfaces 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, 18 Aug 2005 19:50:36 -0000 --qjNfmADvan18RZcF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top pos it loses context. Also, please find a mailer that doens't mangle output. This is really hard to read]. On Thu, Aug 18, 2005 at 12:40:31PM -0700, Daniel Valencia wrote: > Hi >=20 > from the boot messages, i can see that the network > devices are started up properly. Strangely enough, > the one that doesnt seem to be assigned an IRQ# is not > having any problems, but one of the ones that is. >=20 > Here are the boot messages >=20 > de0: port 0x4000-0x407f > mem 0xf4a01000-0xf4a0107f at device 11.0 on pci2 > de0: SMC 9332BDT 21140A [10-100Mb/s] pass 2.0 > de0: Ethernet address: 00:00:c0:7f:a1:fd > de0: if_start running deferred for Giant > xl0: <3Com 3c905C-TX Fast Etherlink XL> port > 0x4080-0x40ff mem 0xf4a01400-0xf4a0147f irq 10 at > device 13.0 on pci2 > miibus0: on xl0 > xlphy0: <3c905C 10/100 internal PHY> on miibus0 > xlphy0: 10baseT, 10baseT-FDX, 100baseTX, > 100baseTX-FDX, auto > xl0: Ethernet address: 00:01:02:c1:ba:82 > xl1: <3Com 3c905C-TX Fast Etherlink XL> port > 0x4400-0x447f mem 0xf4a01800-0xf4a0187f irq 11 at > device 15.0 on pci2 > miibus1: on xl1 > xlphy1: <3c905C 10/100 internal PHY> on miibus1 > xlphy1: 10baseT, 10baseT-FDX, 100baseTX, > 100baseTX-FDX, auto > xl1: Ethernet address: 00:01:02:44:3c:22 >=20 > Here goes my ifconfig >=20 > > ifconfig > de0: > flags=3D108843 > mtu 1500 > inet 128.200.38.140 netmask 0xffffff00 > broadcast 128.200.38.255 > inet6 fe80::200:c0ff:fe7f:a1fd%de0 prefixlen > 64 scopeid 0x1 > ether 00:00:c0:7f:a1:fd > media: Ethernet autoselect (100baseTX > ) > status: active > xl0: > flags=3D8843 mtu > 1500 > options=3D9 > inet 10.0.1.1 netmask 0xffff0000 broadcast > 10.0.255.255 > inet6 fe80::201:2ff:fec1:ba82%xl0 prefixlen 64 > scopeid 0x2 > ether 00:01:02:c1:ba:82 > media: Ethernet autoselect (100baseTX > ) > status: active > xl1: > flags=3D8843 mtu > 1500 > options=3D9 > inet 10.0.1.2 netmask 0xffff0000 broadcast > 10.0.255.255 > inet6 fe80::201:2ff:fe44:3c22%xl1 prefixlen 64 > scopeid 0x3 > ether 00:01:02:44:3c:22 > media: Ethernet autoselect (100baseTX > ) > status: active > lo0: flags=3D8049 mtu > 16384 > inet 127.0.0.1 netmask 0xff000000 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > > What version of FreeBSD are you running? You shouldn't even be able to do this in recent versions (if you have multiple addresses on the same network, all but one of them should have a netmask of 255.255.255.255). This isn't the way to accomplish what you seem to want anyway. The best way would probably be to use if_bridge in 6.0. Alternativly, you may be able to assign an address to one and bridge the two of them together. -- Brooks > --- Brooks Davis wrote: >=20 > > On Thu, Aug 18, 2005 at 11:36:55AM -0700, Daniel > > Valencia wrote: > > > Hello, everybody > > >=20 > > > Is there any limit as of how many interfaces can > > > freebsd handle? Im trying to build a switch in a > > PC > > > box, putting multiple NICs and some software... > > The > > > issue is, even though all of the cards work > > correctly > > > by themselves, once I put them together, it doesnt > > > matter what slots i use, I can never make more > > than > > > two of them work. For even though all the rest > > appear > > > up as well, I cant ping neither them nor their > > peers > > > (Im using crossover cables). > >=20 > > The software limit is 2^16-1. It sounds like you > > are having hardware > > issues. I'd tend to guess interrupt routing issues. > > I'd suggest > > posting details to freebsd-questions or possibly > > freebsd-stable. > >=20 > > -- Brooks > >=20 > > --=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 > >=20 >=20 >=20 >=20 > =09 > ____________________________________________________ > Start your day with Yahoo! - make it your home page=20 > http://www.yahoo.com/r/hs=20 > =20 > _______________________________________________ > 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" --=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 --qjNfmADvan18RZcF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDBOaKXY6L6fI4GtQRAllYAKDYCJJbRmigFzG4bg4zpveHhVoLJACfd7A6 8JDxpKBTjoLzDRyfC+3AzXo= =dGi4 -----END PGP SIGNATURE----- --qjNfmADvan18RZcF-- From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 21:15: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 D92D716A41F for ; Thu, 18 Aug 2005 21:15:53 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: from web53908.mail.yahoo.com (web53908.mail.yahoo.com [206.190.36.218]) by mx1.FreeBSD.org (Postfix) with SMTP id A2A7E43D77 for ; Thu, 18 Aug 2005 21:15:49 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: (qmail 87004 invoked by uid 60001); 18 Aug 2005 21:15:48 -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=utNbhtq5cAfJ5aSb1rO2kOZh6QWCr0+sg/AHYZ5GUpbdjFM9plG+Nhh0wm/hpPOmwI+pKL6nQt4E/8mn2jgMKYBBS4Ld3aSQoYAWXk/jpkClwUsPzKSJ67cDg+XKwsBH9oSOWvBuwkmNTXJ1J5wobSKT0wiApPBLTBl8FF7uI5w= ; Message-ID: <20050818211548.87002.qmail@web53908.mail.yahoo.com> Received: from [128.200.38.147] by web53908.mail.yahoo.com via HTTP; Thu, 18 Aug 2005 14:15:48 PDT Date: Thu, 18 Aug 2005 14:15:48 -0700 (PDT) From: Daniel Valencia To: freebsd-net@freebsd.org In-Reply-To: <200508182149.28833.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re: multiple interfaces 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, 18 Aug 2005 21:15:54 -0000 Hello all, and thanks for your replies. Please let me explain myself a little more. Im going to do research in routing protocols, so I created a switching software for ethernet packets. I plugged 3 computers (a, b, c), all of them running R5.4, in the following manner: a connects to c. b connects to c. c connects to the internet. Of course, the wires that connect c to both a and b are crossover. There is no medium sharing between any of the interfaces, because my software will do the bridging at the ethernet layer. I changed the netmask in the second interface that connects to the 10.0 network to 255.255.255.255 and it didnt solve the problem either. My routing table loooks like this: > netstat -r -f inet Routing tables Internet: Destination Gateway Netif Expire default cs1-rsm-vl038.ucin de0 10/16 link#2 xl0 localhost localhost lo0 128.200.38/24 link#1 de0 cs1-rsm-vl038.ucin 00:90:92:c8:7c:00 de0 1174 schark12 00:01:02:c1:bb:4d de0 1196 > Again, thank you very much Daniel ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From owner-freebsd-net@FreeBSD.ORG Thu Aug 18 21:43: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 9578716A41F for ; Thu, 18 Aug 2005 21:43:33 +0000 (GMT) (envelope-from david.vos@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DD8D43D48 for ; Thu, 18 Aug 2005 21:43:32 +0000 (GMT) (envelope-from david.vos@gmail.com) Received: by wproxy.gmail.com with SMTP id i22so416619wra for ; Thu, 18 Aug 2005 14:43:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=tBGXBKkxdNdQduAwkDirQBroccLaw/iHFZWP5XCkOZs1+sfIGx5ewSDO5tRJ7v3n6GLYCzzHrVf7v2liegO+/Y2tYQzzrCkYN2mu1bdKUGZNNEjyI4lc/bQAojjfbVYuqf6QEf2b/ypk3jI1h1ofQOZQPLxjgCX/Njiwn60gl1c= Received: by 10.54.36.35 with SMTP id j35mr1449541wrj; Thu, 18 Aug 2005 14:43:32 -0700 (PDT) Received: by 10.54.98.5 with HTTP; Thu, 18 Aug 2005 14:43:32 -0700 (PDT) Message-ID: <16e39c5105081814432e922ec4@mail.gmail.com> Date: Thu, 18 Aug 2005 15:43:32 -0600 From: David Vos To: freebsd-net@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: netgraph memory trouble 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, 18 Aug 2005 21:43:33 -0000 I have been playing with the netgraph ng_split node. I discovered that if I sent packets to it, after a period of time, I could no longer use netgraph. If I tried to use ngctl, I got an error back saying that it could not allocate memory to send a message. This also meant that I could not shutdown my nodes (because that required sending a message) and had to reboot my machine to start using netgraph again. vmstat -m would show netgraph_item having 128 items in use. I am sending data to the split node using the macro "NG_FWD_ITEM_HOOK". Since this macro nulls out the item pointer, I assume it takes full responsibility to free the item if something fails. The item then gets sent on to the function: static int ng_split_rcvdata(hook_p hook, item_p item) { =09const priv_p=09priv =3D NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); =09int=09=09error =3D 0; =09if (hook =3D=3D priv->out) { =09=09printf("ng_split: got packet from out hook!\n"); =09=09NG_FREE_ITEM(item); =09=09error =3D EINVAL; =09} else if ((hook =3D=3D priv->in) && (priv->mixed !=3D NULL)) { =09=09NG_FWD_ITEM_HOOK(error, item, priv->mixed); =09} else if ((hook =3D=3D priv->mixed) && (priv->out !=3D NULL)) { =09=09NG_FWD_ITEM_HOOK(error, item, priv->out); =09} =09return (error); } Unfortunately, if priv->mixed or priv->out are NULL, then there is no error generated, and the item is not freed. I modified the function to be: printf("ng_split: got packet hook=3D%x, priv->in=3D%x, priv->out=3D= %x priv->mixed=3D%x\n", hook, priv->in, priv->out, priv->mi= xed); if (hook =3D=3D priv->out) { printf("ng_split: got packet from out hook!\n"); NG_FREE_ITEM(item); error =3D EINVAL; } else if ((hook =3D=3D priv->in) && (priv->mixed !=3D NULL)) { NG_FWD_ITEM_HOOK(error, item, priv->mixed); } else if ((hook =3D=3D priv->mixed) && (priv->out !=3D NULL)) { NG_FWD_ITEM_HOOK(error, item, priv->out); } else { printf("ng_split: got packet from unknown hook, or output hook is null\n"); NG_FREE_ITEM(item); error =3D EINVAL; } In /var/log/messages, I get: Aug 18 15:31:50 foo kernel: ng_split: got packet hook=3Dc53f6800, priv->in=3Dc53f6800, priv->out=3Dc53f8c80 priv->mixed=3D0 Aug 18 15:31:50 foo kernel: ng_split: got packet from unknown hook, or output hook is null After making this modification to the code, I have not experienced any of the memory problems mentioned above. My conclusion is that an else clause needs to be added to the branches in the ng_split_rcfdata() function. I am using FreeBSD 5.4-RELEASE #1. David From owner-freebsd-net@FreeBSD.ORG Fri Aug 19 11:38: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 01FC316A41F for ; Fri, 19 Aug 2005 11:38:05 +0000 (GMT) (envelope-from donatas@lrtc.net) Received: from mail.lrtc.lt (pegasus.lrtc.lt [217.9.240.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30F0943D46 for ; Fri, 19 Aug 2005 11:38:01 +0000 (GMT) (envelope-from donatas@lrtc.net) Received: (qmail 27202 invoked from network); 19 Aug 2005 11:36:43 -0000 Received: from p2p-241-242-ird.vln0.lrtc.net (HELO donatas) (d.gendvilas@[217.9.241.242]) (envelope-sender ) by mail.lrtc.lt (qmail-ldap-1.03) with SMTP for ; 19 Aug 2005 11:36:42 -0000 Message-ID: <076a01c5a4b2$72af4430$9f90a8c0@donatas> From: "Donatas" To: "Daniel Valencia" , References: <20050818183655.22192.qmail@web53906.mail.yahoo.com> Date: Fri, 19 Aug 2005 14:37:58 +0300 Organization: AB Lietuvos Radijo ir Televizijos Centras MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: Subject: Re: multiple interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Donatas List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Aug 2005 11:38:05 -0000 hmm...our machine successfully works with 6 physical ethernet(2x-fxp = 4x-em) adapters and 1 physical ATM(he155)... > Hello, everybody >=20 > Is there any limit as of how many interfaces can > freebsd handle? Im trying to build a switch in a PC > box, putting multiple NICs and some software... The > issue is, even though all of the cards work correctly > by themselves, once I put them together, it doesnt > matter what slots i use, I can never make more than > two of them work. For even though all the rest appear > up as well, I cant ping neither them nor their peers > (Im using crossover cables). >=20 > Thank you, >=20 > Daniel >=20 >=20 >=20 >=20 > __________________________________=20 > Yahoo! Mail for Mobile=20 > Take Yahoo! Mail with you! Check email on your mobile phone.=20 > http://mobile.yahoo.com/learn/mail=20 > _______________________________________________ > 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 Aug 19 12:24: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 0956B16A41F for ; Fri, 19 Aug 2005 12:24:56 +0000 (GMT) (envelope-from ozkan@mersin.edu.tr) Received: from mail.mersin.edu.tr (mail.mersin.edu.tr [193.255.128.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 51BFC43D46 for ; Fri, 19 Aug 2005 12:24:51 +0000 (GMT) (envelope-from ozkan@mersin.edu.tr) Received: from localhost (localhost.mersin.edu.tr [127.0.0.1]) by mail.mersin.edu.tr (Postfix) with ESMTP id 6A450450BE; Fri, 19 Aug 2005 15:24:52 +0300 (EEST) Received: from mail.mersin.edu.tr ([127.0.0.1]) by localhost (mail.mersin.edu.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 60490-34; Fri, 19 Aug 2005 15:24:40 +0300 (EEST) Received: from [10.0.50.20] (unknown [81.213.166.209]) by mail.mersin.edu.tr (Postfix) with ESMTP id 8CF43450BC; Fri, 19 Aug 2005 15:24:39 +0300 (EEST) Message-ID: <4305CF84.60409@mersin.edu.tr> Date: Fri, 19 Aug 2005 15:24:36 +0300 From: =?ISO-8859-9?Q?=D6zkan_KIRIK?= User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Valencia , freebsd-net@freebsd.org References: <20050818194031.59265.qmail@web53908.mail.yahoo.com> In-Reply-To: <20050818194031.59265.qmail@web53908.mail.yahoo.com> X-Enigmail-Version: 0.89.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-9; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mersin.edu.tr Cc: Subject: Re: multiple interfaces 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, 19 Aug 2005 12:24:56 -0000 You cannot define same network to more then one interface! As you post below; xl0: inet 10.0.1.1 netmask 0xffff0000 broadcast 10.0.255.255 xl1: inet 10.0.1.2 netmask 0xffff0000 broadcast 10.0.255.255 They are at the same network, so your freebsd searchs 10.0.1.2 at xl0. You should define your xl1 as inet 10.0.1.2 netmask 255.255.255.255 With Best Regards, Ozkan KIRIK EnderUNIX SDT@Turkey Software Developer Daniel Valencia wrote: >Hi > >from the boot messages, i can see that the network >devices are started up properly. Strangely enough, >the one that doesnt seem to be assigned an IRQ# is not >having any problems, but one of the ones that is. > >Here are the boot messages > >de0: port 0x4000-0x407f >mem 0xf4a01000-0xf4a0107f at device 11.0 on pci2 >de0: SMC 9332BDT 21140A [10-100Mb/s] pass 2.0 >de0: Ethernet address: 00:00:c0:7f:a1:fd >de0: if_start running deferred for Giant >xl0: <3Com 3c905C-TX Fast Etherlink XL> port >0x4080-0x40ff mem 0xf4a01400-0xf4a0147f irq 10 at >device 13.0 on pci2 >miibus0: on xl0 >xlphy0: <3c905C 10/100 internal PHY> on miibus0 >xlphy0: 10baseT, 10baseT-FDX, 100baseTX, >100baseTX-FDX, auto >xl0: Ethernet address: 00:01:02:c1:ba:82 >xl1: <3Com 3c905C-TX Fast Etherlink XL> port >0x4400-0x447f mem 0xf4a01800-0xf4a0187f irq 11 at >device 15.0 on pci2 >miibus1: on xl1 >xlphy1: <3c905C 10/100 internal PHY> on miibus1 >xlphy1: 10baseT, 10baseT-FDX, 100baseTX, >100baseTX-FDX, auto >xl1: Ethernet address: 00:01:02:44:3c:22 > >Here goes my ifconfig > > > >>ifconfig >> >> >de0: >flags=108843 >mtu 1500 > inet 128.200.38.140 netmask 0xffffff00 >broadcast 128.200.38.255 > inet6 fe80::200:c0ff:fe7f:a1fd%de0 prefixlen >64 scopeid 0x1 > ether 00:00:c0:7f:a1:fd > media: Ethernet autoselect (100baseTX >) > status: active >xl0: >flags=8843 mtu >1500 > options=9 > inet 10.0.1.1 netmask 0xffff0000 broadcast >10.0.255.255 > inet6 fe80::201:2ff:fec1:ba82%xl0 prefixlen 64 >scopeid 0x2 > ether 00:01:02:c1:ba:82 > media: Ethernet autoselect (100baseTX >) > status: active >xl1: >flags=8843 mtu >1500 > options=9 > inet 10.0.1.2 netmask 0xffff0000 broadcast >10.0.255.255 > inet6 fe80::201:2ff:fe44:3c22%xl1 prefixlen 64 >scopeid 0x3 > ether 00:01:02:44:3c:22 > media: Ethernet autoselect (100baseTX >) > status: active >lo0: flags=8049 mtu >16384 > inet 127.0.0.1 netmask 0xff000000 > inet6 ::1 prefixlen 128 > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > > > > >And, at last, a few ping attempts > > > >>ping -c 1 128.200.38.140 >> >> >PING 128.200.38.140 (128.200.38.140): 56 data bytes >64 bytes from 128.200.38.140: icmp_seq=0 ttl=64 >time=0.130 ms > >--- 128.200.38.140 ping statistics --- >1 packets transmitted, 1 packets received, 0% packet >loss >round-trip min/avg/max/stddev = >0.130/0.130/0.130/0.000 ms > > >>ping -c 1 10.0.1.1 >> >> >PING 10.0.1.1 (10.0.1.1): 56 data bytes >64 bytes from 10.0.1.1: icmp_seq=0 ttl=64 time=0.128 >ms > >--- 10.0.1.1 ping statistics --- >1 packets transmitted, 1 packets received, 0% packet >loss >round-trip min/avg/max/stddev = >0.128/0.128/0.128/0.000 ms > > >>ping -c 1 10.0.1.2 >> >> >PING 10.0.1.2 (10.0.1.2): 56 data bytes > >--- 10.0.1.2 ping statistics --- >1 packets transmitted, 0 packets received, 100% packet >loss > > >> >> >> > > >Thank you very much, > >Daniel > > >--- Brooks Davis wrote: > > > >>On Thu, Aug 18, 2005 at 11:36:55AM -0700, Daniel >>Valencia wrote: >> >> >>>Hello, everybody >>> >>>Is there any limit as of how many interfaces can >>>freebsd handle? Im trying to build a switch in a >>> >>> >>PC >> >> >>>box, putting multiple NICs and some software... >>> >>> >>The >> >> >>>issue is, even though all of the cards work >>> >>> >>correctly >> >> >>>by themselves, once I put them together, it doesnt >>>matter what slots i use, I can never make more >>> >>> >>than >> >> >>>two of them work. For even though all the rest >>> >>> >>appear >> >> >>>up as well, I cant ping neither them nor their >>> >>> >>peers >> >> >>>(Im using crossover cables). >>> >>> >>The software limit is 2^16-1. It sounds like you >>are having hardware >>issues. I'd tend to guess interrupt routing issues. >> I'd suggest >>posting details to freebsd-questions or possibly >>freebsd-stable. >> >>-- Brooks >> >>-- >>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 >> >> >> > > > > >____________________________________________________ >Start your day with Yahoo! - make it your home page >http://www.yahoo.com/r/hs > >_______________________________________________ >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 Aug 19 17:48: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 53D3216A41F for ; Fri, 19 Aug 2005 17:48:23 +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 C84AE43D48 for ; Fri, 19 Aug 2005 17:48:22 +0000 (GMT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru (8.13.0/vak/3.0) id j7JHjHS2076889 for freebsd-net@freebsd.org.checked; Fri, 19 Aug 2005 21:45:17 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from [144.206.181.94] (hi.cronyx.ru [144.206.181.94]) by hanoi.cronyx.ru (8.13.0/vak/3.0) with ESMTP id j7JHhblb076863; Fri, 19 Aug 2005 21:43:37 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <43061A4F.4050206@cronyx.ru> Date: Fri, 19 Aug 2005 21:43:43 +0400 From: Roman Kurakin User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Vos References: <16e39c5105081814432e922ec4@mail.gmail.com> In-Reply-To: <16e39c5105081814432e922ec4@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: netgraph memory trouble 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, 19 Aug 2005 17:48:23 -0000 It seems reasonable. If no one take care of it, let me know I'll commit it. rik David Vos wrote: >I have been playing with the netgraph ng_split node. I discovered >that if I sent packets to it, after a period of time, I could no >longer use netgraph. If I tried to use ngctl, I got an error back >saying that it could not allocate memory to send a message. This also >meant that I could not shutdown my nodes (because that required >sending a message) and had to reboot my machine to start using >netgraph again. > >vmstat -m would show netgraph_item having 128 items in use. > >I am sending data to the split node using the macro >"NG_FWD_ITEM_HOOK". Since this macro nulls out the item pointer, I >assume it takes full responsibility to free the item if something >fails. > >The item then gets sent on to the function: >static int >ng_split_rcvdata(hook_p hook, item_p item) >{ > const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook)); > int error = 0; > > if (hook == priv->out) { > printf("ng_split: got packet from out hook!\n"); > NG_FREE_ITEM(item); > error = EINVAL; > } else if ((hook == priv->in) && (priv->mixed != NULL)) { > NG_FWD_ITEM_HOOK(error, item, priv->mixed); > } else if ((hook == priv->mixed) && (priv->out != NULL)) { > NG_FWD_ITEM_HOOK(error, item, priv->out); > } > > return (error); >} > > >Unfortunately, if priv->mixed or priv->out are NULL, then there is no >error generated, and the item is not freed. > >I modified the function to be: > printf("ng_split: got packet hook=%x, priv->in=%x, priv->out=%x > priv->mixed=%x\n", hook, priv->in, priv->out, priv->mixed); > > if (hook == priv->out) { > printf("ng_split: got packet from out hook!\n"); > NG_FREE_ITEM(item); > error = EINVAL; > } else if ((hook == priv->in) && (priv->mixed != NULL)) { > NG_FWD_ITEM_HOOK(error, item, priv->mixed); > } else if ((hook == priv->mixed) && (priv->out != NULL)) { > NG_FWD_ITEM_HOOK(error, item, priv->out); > } else { > printf("ng_split: got packet from unknown hook, or >output hook is null\n"); > NG_FREE_ITEM(item); > error = EINVAL; > } > >In /var/log/messages, I get: >Aug 18 15:31:50 foo kernel: ng_split: got packet hook=c53f6800, >priv->in=c53f6800, priv->out=c53f8c80 priv->mixed=0 >Aug 18 15:31:50 foo kernel: ng_split: got packet from unknown hook, or >output hook is null > >After making this modification to the code, I have not experienced any >of the memory problems mentioned above. > > >My conclusion is that an else clause needs to be added to the branches >in the ng_split_rcfdata() function. > >I am using FreeBSD 5.4-RELEASE #1. > > >David >_______________________________________________ >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 Aug 19 19:16: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 0DCB416A41F for ; Fri, 19 Aug 2005 19:16:26 +0000 (GMT) (envelope-from paul@distributel.net) Received: from smtp.distributel.net (cns2.distributel.NET [66.38.181.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D46843D48 for ; Fri, 19 Aug 2005 19:16:25 +0000 (GMT) (envelope-from paul@distributel.net) Received: from localhost (localhost [127.0.0.1]) by smtp.distributel.net (8.12.6/8.12.6) with ESMTP id j7JJGOe8026836 for ; Fri, 19 Aug 2005 15:16:24 -0400 (EDT) Date: Fri, 19 Aug 2005 15:16:24 -0400 (EDT) From: Paul Khavkine X-X-Sender: paul@krusty.mtl.distributel.net To: freebsd-net@freebsd.org Message-ID: <20050819150328.G25493-100000@krusty.mtl.distributel.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Reading raw ethernet 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, 19 Aug 2005 19:16:26 -0000 Hi guys. I'm writing a small program to read raw ethernet frames out of netgraph to capture Spannign Tree packets from the switch. Is it possible to pick up STP frames without putting the interface in promiscuous mode ? Thanx Paul ************************************************ Paul Khavkine Networks/Systems Planning and Engineering DISTRIBUTEL Communications. 740 Notre Dame West, Suite 1135 Montreal, Quebec, Canada, H3C 3X6 +1-514-877-5505 x 263 http://www.distributel.net ************************************************ From owner-freebsd-net@FreeBSD.ORG Fri Aug 19 19:25: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 5B55D16A41F for ; Fri, 19 Aug 2005 19:25:56 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: from web53913.mail.yahoo.com (web53913.mail.yahoo.com [206.190.38.162]) by mx1.FreeBSD.org (Postfix) with SMTP id E91E743D46 for ; Fri, 19 Aug 2005 19:25:55 +0000 (GMT) (envelope-from fetrovsky@yahoo.com) Received: (qmail 677 invoked by uid 60001); 19 Aug 2005 19:25:55 -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=UXVHaeO7AjdU9wyl4Y8waTxrdU+UyIiAE9p/abIPi/05gdc9D7kx5c2pjkXkWvbLGfMvAzP76B3p6wuKn6IA4kGukdEcT1ZW2cUYyRgnmtR+WgdXo6O++uQ8Pme/CNaDQG9KxcRk5Yp/UUhmOfCBk9OnDpNeFCmxVICB3KyP6Ow= ; Message-ID: <20050819192555.675.qmail@web53913.mail.yahoo.com> Received: from [128.200.38.147] by web53913.mail.yahoo.com via HTTP; Fri, 19 Aug 2005 12:25:55 PDT Date: Fri, 19 Aug 2005 12:25:55 -0700 (PDT) From: Daniel Valencia To: "Özkan" KIRIK , freebsd-net@freebsd.org In-Reply-To: <4305CF84.60409@mersin.edu.tr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: multiple interfaces 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, 19 Aug 2005 19:25:56 -0000 Hi Yes, I tried that, and although I can ping the local interface (10.0.1.2), I cant reach the remote interface (10.0.0.2). Thanks, Daniel --- Özkan KIRIK wrote: > You cannot define same network to more then one > interface! > > As you post below; > xl0: inet 10.0.1.1 netmask 0xffff0000 broadcast > 10.0.255.255 > xl1: inet 10.0.1.2 netmask 0xffff0000 broadcast > 10.0.255.255 > > They are at the same network, so your freebsd > searchs 10.0.1.2 at xl0. > You should define your xl1 as inet 10.0.1.2 netmask > 255.255.255.255 > > With Best Regards, > Ozkan KIRIK > EnderUNIX SDT@Turkey > Software Developer > > Daniel Valencia wrote: > > >Hi > > > >from the boot messages, i can see that the network > >devices are started up properly. Strangely enough, > >the one that doesnt seem to be assigned an IRQ# is > not > >having any problems, but one of the ones that is. > > > >Here are the boot messages > > > >de0: port > 0x4000-0x407f > >mem 0xf4a01000-0xf4a0107f at device 11.0 on pci2 > >de0: SMC 9332BDT 21140A [10-100Mb/s] pass 2.0 > >de0: Ethernet address: 00:00:c0:7f:a1:fd > >de0: if_start running deferred for Giant > >xl0: <3Com 3c905C-TX Fast Etherlink XL> port > >0x4080-0x40ff mem 0xf4a01400-0xf4a0147f irq 10 at > >device 13.0 on pci2 > >miibus0: on xl0 > >xlphy0: <3c905C 10/100 internal PHY> on miibus0 > >xlphy0: 10baseT, 10baseT-FDX, 100baseTX, > >100baseTX-FDX, auto > >xl0: Ethernet address: 00:01:02:c1:ba:82 > >xl1: <3Com 3c905C-TX Fast Etherlink XL> port > >0x4400-0x447f mem 0xf4a01800-0xf4a0187f irq 11 at > >device 15.0 on pci2 > >miibus1: on xl1 > >xlphy1: <3c905C 10/100 internal PHY> on miibus1 > >xlphy1: 10baseT, 10baseT-FDX, 100baseTX, > >100baseTX-FDX, auto > >xl1: Ethernet address: 00:01:02:44:3c:22 > > > >Here goes my ifconfig > > > > > > > >>ifconfig > >> > >> > >de0: > >flags=108843 > >mtu 1500 > > inet 128.200.38.140 netmask 0xffffff00 > >broadcast 128.200.38.255 > > inet6 fe80::200:c0ff:fe7f:a1fd%de0 > prefixlen > >64 scopeid 0x1 > > ether 00:00:c0:7f:a1:fd > > media: Ethernet autoselect (100baseTX > >) > > status: active > >xl0: > >flags=8843 > mtu > >1500 > > options=9 > > inet 10.0.1.1 netmask 0xffff0000 broadcast > >10.0.255.255 > > inet6 fe80::201:2ff:fec1:ba82%xl0 prefixlen > 64 > >scopeid 0x2 > > ether 00:01:02:c1:ba:82 > > media: Ethernet autoselect (100baseTX > >) > > status: active > >xl1: > >flags=8843 > mtu > >1500 > > options=9 > > inet 10.0.1.2 netmask 0xffff0000 broadcast > >10.0.255.255 > > inet6 fe80::201:2ff:fe44:3c22%xl1 prefixlen > 64 > >scopeid 0x3 > > ether 00:01:02:44:3c:22 > > media: Ethernet autoselect (100baseTX > >) > > status: active > >lo0: flags=8049 mtu > >16384 > > inet 127.0.0.1 netmask 0xff000000 > > inet6 ::1 prefixlen 128 > > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > > > > > > > > > >And, at last, a few ping attempts > > > > > > > >>ping -c 1 128.200.38.140 > >> > >> > >PING 128.200.38.140 (128.200.38.140): 56 data bytes > >64 bytes from 128.200.38.140: icmp_seq=0 ttl=64 > >time=0.130 ms > > > >--- 128.200.38.140 ping statistics --- > >1 packets transmitted, 1 packets received, 0% > packet > >loss > >round-trip min/avg/max/stddev = > >0.130/0.130/0.130/0.000 ms > > > > > >>ping -c 1 10.0.1.1 > >> > >> > >PING 10.0.1.1 (10.0.1.1): 56 data bytes > >64 bytes from 10.0.1.1: icmp_seq=0 ttl=64 > time=0.128 > >ms > > > >--- 10.0.1.1 ping statistics --- > >1 packets transmitted, 1 packets received, 0% > packet > >loss > >round-trip min/avg/max/stddev = > >0.128/0.128/0.128/0.000 ms > > > > > >>ping -c 1 10.0.1.2 > >> > >> > >PING 10.0.1.2 (10.0.1.2): 56 data bytes > > > >--- 10.0.1.2 ping statistics --- > >1 packets transmitted, 0 packets received, 100% > packet > >loss > > > > > >> > >> > >> > > > > > >Thank you very much, > > > >Daniel > > > > > >--- Brooks Davis wrote: > > > > > > > >>On Thu, Aug 18, 2005 at 11:36:55AM -0700, Daniel > >>Valencia wrote: > >> > >> > >>>Hello, everybody > >>> > >>>Is there any limit as of how many interfaces can > >>>freebsd handle? Im trying to build a switch in a > >>> > >>> > >>PC > >> > >> > >>>box, putting multiple NICs and some software... > >>> > >>> > >>The > >> > >> > >>>issue is, even though all of the cards work > >>> > >>> > >>correctly > >> > >> > >>>by themselves, once I put them together, it > doesnt > >>>matter what slots i use, I can never make more > >>> > >>> > >>than > === message truncated === ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs From owner-freebsd-net@FreeBSD.ORG Fri Aug 19 19:33:36 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 D4C8B16A41F for ; Fri, 19 Aug 2005 19:33:36 +0000 (GMT) (envelope-from yemenstaing@yahoo.com) Received: from web30008.mail.mud.yahoo.com (web30008.mail.mud.yahoo.com [68.142.200.71]) by mx1.FreeBSD.org (Postfix) with SMTP id 5710A43D46 for ; Fri, 19 Aug 2005 19:33:36 +0000 (GMT) (envelope-from yemenstaing@yahoo.com) Received: (qmail 16547 invoked by uid 60001); 19 Aug 2005 19:33:35 -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=ZgCFAvfblOxNk53fW/YEY76tlOGft4RsY9KgcLwLSVuQGMS0UlDrYLdU95sTOF4NwQpWDsEk8miDKd8r5nW6+Q+rxPoQgbWL2NcYaObAKzIMS6GdJRkyaMvhcaNvYs2tYXp5Z0rvjwIc8X7/s37gF3ixO0IUpVxXqIWM4ZQVh9E= ; Message-ID: <20050819193335.16545.qmail@web30008.mail.mud.yahoo.com> Received: from [198.69.12.11] by web30008.mail.mud.yahoo.com via HTTP; Fri, 19 Aug 2005 12:33:35 PDT Date: Fri, 19 Aug 2005 12:33:35 -0700 (PDT) From: yemen staing To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1441674391-1124480015=:84160" Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: dsfsd 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, 19 Aug 2005 19:33:37 -0000 --0-1441674391-1124480015=:84160 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit dfdsfsd --------------------------------- Start your day with Yahoo! - make it your home page --0-1441674391-1124480015=:84160 Content-Type: text/plain; name=fonefinder Content-Description: 2791214801-fonefinder Content-Disposition: inline; filename=fonefinder #!/bin/csh set outfile = ".requested.html" if ( $1 == "" || $2 == "" ) then echo You need to specify 2 parameters echo example: ./thisscript 323 235 echo exit endif w3c -get http://www.primeris.com/fonefind/findome.php -form "npa=$1" "nxx=$2" > $outfile lynx $outfile clear; rm -fr $outfile ./sms_bomber.csh --0-1441674391-1124480015=:84160-- From owner-freebsd-net@FreeBSD.ORG Fri Aug 19 20:43: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 C5E4C16A41F for ; Fri, 19 Aug 2005 20:43:21 +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 5E20543D45 for ; Fri, 19 Aug 2005 20:43:21 +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 j7JKhIZJ017392; Fri, 19 Aug 2005 13:43:18 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7JKhIcT017391; Fri, 19 Aug 2005 13:43:18 -0700 Date: Fri, 19 Aug 2005 13:43:18 -0700 From: Brooks Davis To: Daniel Valencia Message-ID: <20050819204318.GA17019@odin.ac.hmc.edu> References: <4305CF84.60409@mersin.edu.tr> <20050819192555.675.qmail@web53913.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline In-Reply-To: <20050819192555.675.qmail@web53913.mail.yahoo.com> 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: =?iso-8859-1?Q?=D6zkan?= KIRIK , freebsd-net@freebsd.org Subject: Re: multiple interfaces 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, 19 Aug 2005 20:43:22 -0000 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [Please don't top post.] On Fri, Aug 19, 2005 at 12:25:55PM -0700, Daniel Valencia wrote: >=20 > Hi >=20 > Yes, I tried that, and although I can ping the local > interface (10.0.1.2), I cant reach the remote > interface (10.0.0.2). This is expected. Only one of those interfaces has a network route so it will be used for all communications to that network. I'm guessing your route to 10.0/16 is via xl0 though I can't say for sure because you haven't provided the contents of your routing table as previously requested (use "netstat -f inet -rn"). If you want two interfaces to be on the same subnet and to provide the broadcast medium for that subnet, you need to bridge them. If you want the ability to alternate between the two connections to the same host, you may be able to use CARP or ng_one2many. -- Brooks > --- =D6zkan KIRIK wrote: >=20 > > You cannot define same network to more then one > > interface! > >=20 > > As you post below; > > xl0: inet 10.0.1.1 netmask 0xffff0000 broadcast > > 10.0.255.255 > > xl1: inet 10.0.1.2 netmask 0xffff0000 broadcast > > 10.0.255.255 > >=20 > > They are at the same network, so your freebsd > > searchs 10.0.1.2 at xl0. > > You should define your xl1 as inet 10.0.1.2 netmask > > 255.255.255.255 > >=20 > > With Best Regards, > > Ozkan KIRIK > > EnderUNIX SDT@Turkey > > Software Developer > >=20 > > Daniel Valencia wrote: > >=20 > > >Hi > > > > > >from the boot messages, i can see that the network > > >devices are started up properly. Strangely enough, > > >the one that doesnt seem to be assigned an IRQ# is > > not > > >having any problems, but one of the ones that is. > > > > > >Here are the boot messages > > > > > >de0: port > > 0x4000-0x407f > > >mem 0xf4a01000-0xf4a0107f at device 11.0 on pci2 > > >de0: SMC 9332BDT 21140A [10-100Mb/s] pass 2.0 > > >de0: Ethernet address: 00:00:c0:7f:a1:fd > > >de0: if_start running deferred for Giant > > >xl0: <3Com 3c905C-TX Fast Etherlink XL> port > > >0x4080-0x40ff mem 0xf4a01400-0xf4a0147f irq 10 at > > >device 13.0 on pci2 > > >miibus0: on xl0 > > >xlphy0: <3c905C 10/100 internal PHY> on miibus0 > > >xlphy0: 10baseT, 10baseT-FDX, 100baseTX, > > >100baseTX-FDX, auto > > >xl0: Ethernet address: 00:01:02:c1:ba:82 > > >xl1: <3Com 3c905C-TX Fast Etherlink XL> port > > >0x4400-0x447f mem 0xf4a01800-0xf4a0187f irq 11 at > > >device 15.0 on pci2 > > >miibus1: on xl1 > > >xlphy1: <3c905C 10/100 internal PHY> on miibus1 > > >xlphy1: 10baseT, 10baseT-FDX, 100baseTX, > > >100baseTX-FDX, auto > > >xl1: Ethernet address: 00:01:02:44:3c:22 > > > > > >Here goes my ifconfig > > > > > > =20 > > > > > >>ifconfig > > >> =20 > > >> > > >de0: > > > >flags=3D108843 > > >mtu 1500 > > > inet 128.200.38.140 netmask 0xffffff00 > > >broadcast 128.200.38.255 > > > inet6 fe80::200:c0ff:fe7f:a1fd%de0 > > prefixlen > > >64 scopeid 0x1 > > > ether 00:00:c0:7f:a1:fd > > > media: Ethernet autoselect (100baseTX > > >) > > > status: active > > >xl0: > > >flags=3D8843 > > mtu > > >1500 > > > options=3D9 > > > inet 10.0.1.1 netmask 0xffff0000 broadcast > > >10.0.255.255 > > > inet6 fe80::201:2ff:fec1:ba82%xl0 prefixlen > > 64 > > >scopeid 0x2 > > > ether 00:01:02:c1:ba:82 > > > media: Ethernet autoselect (100baseTX > > >) > > > status: active > > >xl1: > > >flags=3D8843 > > mtu > > >1500 > > > options=3D9 > > > inet 10.0.1.2 netmask 0xffff0000 broadcast > > >10.0.255.255 > > > inet6 fe80::201:2ff:fe44:3c22%xl1 prefixlen > > 64 > > >scopeid 0x3 > > > ether 00:01:02:44:3c:22 > > > media: Ethernet autoselect (100baseTX > > >) > > > status: active > > >lo0: flags=3D8049 mtu > > >16384 > > > inet 127.0.0.1 netmask 0xff000000 > > > inet6 ::1 prefixlen 128 > > > inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 > > > =20 > > > > > > > > > > > >And, at last, a few ping attempts > > > > > > =20 > > > > > >>ping -c 1 128.200.38.140 > > >> =20 > > >> > > >PING 128.200.38.140 (128.200.38.140): 56 data bytes > > >64 bytes from 128.200.38.140: icmp_seq=3D0 ttl=3D64 > > >time=3D0.130 ms > > > > > >--- 128.200.38.140 ping statistics --- > > >1 packets transmitted, 1 packets received, 0% > > packet > > >loss > > >round-trip min/avg/max/stddev =3D > > >0.130/0.130/0.130/0.000 ms > > > =20 > > > > > >>ping -c 1 10.0.1.1 > > >> =20 > > >> > > >PING 10.0.1.1 (10.0.1.1): 56 data bytes > > >64 bytes from 10.0.1.1: icmp_seq=3D0 ttl=3D64 > > time=3D0.128 > > >ms > > > > > >--- 10.0.1.1 ping statistics --- > > >1 packets transmitted, 1 packets received, 0% > > packet > > >loss > > >round-trip min/avg/max/stddev =3D > > >0.128/0.128/0.128/0.000 ms > > > =20 > > > > > >>ping -c 1 10.0.1.2 > > >> =20 > > >> > > >PING 10.0.1.2 (10.0.1.2): 56 data bytes > > > > > >--- 10.0.1.2 ping statistics --- > > >1 packets transmitted, 0 packets received, 100% > > packet > > >loss > > > =20 > > > > > >>=20 > > >> =20 > > >> > > > > > > > > >Thank you very much, > > > > > >Daniel > > > > > > > > >--- Brooks Davis wrote: > > > > > > =20 > > > > > >>On Thu, Aug 18, 2005 at 11:36:55AM -0700, Daniel > > >>Valencia wrote: > > >> =20 > > >> > > >>>Hello, everybody > > >>> > > >>>Is there any limit as of how many interfaces can > > >>>freebsd handle? Im trying to build a switch in a > > >>> =20 > > >>> > > >>PC > > >> =20 > > >> > > >>>box, putting multiple NICs and some software... > > >>> =20 > > >>> > > >>The > > >> =20 > > >> > > >>>issue is, even though all of the cards work > > >>> =20 > > >>> > > >>correctly > > >> =20 > > >> > > >>>by themselves, once I put them together, it > > doesnt > > >>>matter what slots i use, I can never make more > > >>> =20 > > >>> > > >>than > >=20 > =3D=3D=3D message truncated =3D=3D=3D >=20 >=20 >=20 > =09 > ____________________________________________________ > Start your day with Yahoo! - make it your home page=20 > http://www.yahoo.com/r/hs=20 > =20 > _______________________________________________ > 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" --=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 --Qxx1br4bt0+wmkIi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDBkRlXY6L6fI4GtQRAkKeAJwNA/UO9d67vH1z99N3QkqJeafvjQCcCN6k iC7DJoWgx/YVUwxJO59ZUG4= =rdsJ -----END PGP SIGNATURE----- --Qxx1br4bt0+wmkIi-- From owner-freebsd-net@FreeBSD.ORG Fri Aug 19 20:50: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 0B0C216A420 for ; Fri, 19 Aug 2005 20:50:54 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 879A543D58 for ; Fri, 19 Aug 2005 20:50:51 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 44AF86E83; Fri, 19 Aug 2005 13:50:51 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7JKookD082909; Fri, 19 Aug 2005 13:50:51 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <4306462A.2070500@elischer.org> Date: Fri, 19 Aug 2005 13:50:50 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Paul Khavkine References: <20050819150328.G25493-100000@krusty.mtl.distributel.net> In-Reply-To: <20050819150328.G25493-100000@krusty.mtl.distributel.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Reading raw ethernet 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, 19 Aug 2005 20:50:54 -0000 Paul Khavkine wrote: > Hi guys. > > > I'm writing a small program to read raw ethernet frames out of netgraph > to capture Spannign Tree packets from the switch. > > Is it possible to pick up STP frames without putting the interface in > promiscuous mode ? If you don't put it in promiscuous mode, then you will only see broadcast packets and packets aimed at you specifically. If that's enough then there is nothing in netgraph that insists that you turn on promiscuous mode. You should probably look at the ng_etf node too BTW. > > Thanx > Paul > > ************************************************ > Paul Khavkine > Networks/Systems Planning and Engineering > DISTRIBUTEL Communications. > 740 Notre Dame West, Suite 1135 > Montreal, Quebec, Canada, H3C 3X6 > +1-514-877-5505 x 263 > http://www.distributel.net > ************************************************ > > _______________________________________________ > 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 Aug 19 22:29: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 0396716A41F for ; Fri, 19 Aug 2005 22:29:18 +0000 (GMT) (envelope-from paul@distributel.net) Received: from smtp.distributel.net (cns2.distributel.NET [66.38.181.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A09A243D45 for ; Fri, 19 Aug 2005 22:29:17 +0000 (GMT) (envelope-from paul@distributel.net) Received: from localhost (localhost [127.0.0.1]) by smtp.distributel.net (8.12.6/8.12.6) with ESMTP id j7JMTECi048460; Fri, 19 Aug 2005 18:29:14 -0400 (EDT) Date: Fri, 19 Aug 2005 18:29:14 -0400 (EDT) From: Paul Khavkine X-X-Sender: paul@krusty.mtl.distributel.net To: Julian Elischer In-Reply-To: <4306462A.2070500@elischer.org> Message-ID: <20050819182437.R47954-100000@krusty.mtl.distributel.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-net@freebsd.org Subject: Re: Reading raw ethernet 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, 19 Aug 2005 22:29:18 -0000 On Fri, 19 Aug 2005, Julian Elischer wrote: >Paul Khavkine wrote: >> Hi guys. >> >> >> I'm writing a small program to read raw ethernet frames out of netgraph >> to capture Spannign Tree packets from the switch. >> >> Is it possible to pick up STP frames without putting the interface in >> promiscuous mode ? > >If you don't put it in promiscuous mode, then you will only see broadcast >packets and packets aimed at you specifically. > >If that's enough then there is nothing in netgraph that insists that >you turn on promiscuous mode. Well STP packets are sent to a well known MAC address (multicast?) so i can't see it if the card is not in promisc mode. I'm not exactly sure if it's good or not to leave it in promisc mode all the time, is there any security/performance issues with that on a busy server? I want to read STP packets to monitor the link with the switch, if i can't hear the switch for X amount oof time, failover to another NIC. Is it possible to have more then one MAC on a NIC ? I have bge and em cards. > >You should probably look at the ng_etf node too BTW. How does ng_etf deal with that ? Thanx Paul > > >> >> Thanx >> Paul >> >> ************************************************ >> Paul Khavkine >> Networks/Systems Planning and Engineering >> DISTRIBUTEL Communications. >> 740 Notre Dame West, Suite 1135 >> Montreal, Quebec, Canada, H3C 3X6 >> +1-514-877-5505 x 263 >> http://www.distributel.net >> ************************************************ >> >> _______________________________________________ >> 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" > > ************************************************ Paul Khavkine Networks/Systems Planning and Engineering DISTRIBUTEL Communications. 740 Notre Dame West, Suite 1135 Montreal, Quebec, Canada, H3C 3X6 +1-514-877-5505 x 263 http://www.distributel.net ************************************************ From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 05:30:41 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 4740116A41F for ; Sat, 20 Aug 2005 05:30:41 +0000 (GMT) (envelope-from julian@elischer.org) Received: from delight.idiom.com (delight.idiom.com [216.240.32.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 06FE143D46 for ; Sat, 20 Aug 2005 05:30:40 +0000 (GMT) (envelope-from julian@elischer.org) Received: from idiom.com (idiom.com [216.240.32.1]) by delight.idiom.com (Postfix) with ESMTP id 99D55217829; Fri, 19 Aug 2005 22:30:40 -0700 (PDT) Received: from [192.168.2.2] (home.elischer.org [216.240.48.38]) by idiom.com (8.12.11/8.12.11) with ESMTP id j7K5Udln036497; Fri, 19 Aug 2005 22:30:39 -0700 (PDT) (envelope-from julian@elischer.org) Message-ID: <4306BFFB.8060307@elischer.org> Date: Fri, 19 Aug 2005 22:30:35 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050424 X-Accept-Language: en, hu MIME-Version: 1.0 To: Paul Khavkine References: <20050819182437.R47954-100000@krusty.mtl.distributel.net> In-Reply-To: <20050819182437.R47954-100000@krusty.mtl.distributel.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Reading raw ethernet 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, 20 Aug 2005 05:30:41 -0000 Paul Khavkine wrote: > On Fri, 19 Aug 2005, Julian Elischer wrote: > > >>Paul Khavkine wrote: >> >>>Hi guys. >>> >>> >>>I'm writing a small program to read raw ethernet frames out of netgraph >>>to capture Spannign Tree packets from the switch. >>> >>>Is it possible to pick up STP frames without putting the interface in >>>promiscuous mode ? >> >>If you don't put it in promiscuous mode, then you will only see broadcast >>packets and packets aimed at you specifically. >> >>If that's enough then there is nothing in netgraph that insists that >>you turn on promiscuous mode. > > > Well STP packets are sent to a well known MAC address (multicast?) > so i can't see it if the card is not in promisc mode. Well it might be a multicast address. I'm not an expert on multicast.. I've never really used it. I think that it depends on what hardware you have as to how it deals with M/C. > I'm not exactly sure if it's good or not to leave it in promisc mode > all the time, is there any security/performance issues with that on a > busy server? some.. usually though the switch is only going to send you packets you might want to receive anyhow.. > I want to read STP packets to monitor the link with the switch, if i can't > hear the switch for X amount oof time, failover to another NIC. > Is it possible to have more then one MAC on a NIC ? I have bge and em > cards. I've never heard of it.. > > >>You should probably look at the ng_etf node too BTW. > > > How does ng_etf deal with that ? no, but as an example of something that is designed to be attached directly to the ng_ether nodes. > From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 17:04:19 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 ADF1C16A41F for ; Sat, 20 Aug 2005 17:04:19 +0000 (GMT) (envelope-from chvogt@tm.uka.de) Received: from iramx2.ira.uni-karlsruhe.de (iramx2.ira.uni-karlsruhe.de [141.3.10.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3BB2643D53 for ; Sat, 20 Aug 2005 17:04:19 +0000 (GMT) (envelope-from chvogt@tm.uka.de) Received: from irams1.ira.uni-karlsruhe.de ([141.3.10.5]) by iramx2.ira.uni-karlsruhe.de with esmtps id 1E6WlS-0003AT-Nc for ; Sat, 20 Aug 2005 19:04:18 +0200 Received: from i72archimedes.tm.uni-karlsruhe.de ([141.3.71.83]) by irams1.ira.uni-karlsruhe.de with esmtpsa id 1E6WlO-0006oz-SO; Sat, 20 Aug 2005 19:04:10 +0200 Message-ID: <4307628A.9050102@tm.uka.de> Date: Sat, 20 Aug 2005 19:04:10 +0200 From: Christian Vogt User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.10) Gecko/20050716 Thunderbird/1.0.6 Mnenhy/0.7.2.0 X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigF91C3FD3F0394203147DC5EC" X-Spam-Score: -10.7 (----------) X-Spam-Status: No Cc: TM-RO2 Subject: Deactivate TCP Hostcache? 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, 20 Aug 2005 17:04:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF91C3FD3F0394203147DC5EC Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi everybody, is there a way to deactivate the TCP hostcache? I could modify the kernel, but probably there is a more convenient way to do this. The reason I want to deactivate the hostcache is because I am doing experiments and later measurements should not be different than earlier ones due to cached information. Thanks! - Christian -- Christian Vogt, Institute of Telematics, University of Karlsruhe www.tm.uka.de/~chvogt/pubkey/ --------------enigF91C3FD3F0394203147DC5EC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFDB2KKwstEk8gl2rURAj0LAKCK7PghhBo2SkyScUGBwb2OjMmdAwCcDKN5 gDOBk5LZLPnYjLnRVNrRL8Q= =wX7h -----END PGP SIGNATURE----- --------------enigF91C3FD3F0394203147DC5EC-- From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 17:06: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 3B53F16A41F for ; Sat, 20 Aug 2005 17:06:15 +0000 (GMT) (envelope-from chvogt@tm.uka.de) Received: from iramx2.ira.uni-karlsruhe.de (iramx2.ira.uni-karlsruhe.de [141.3.10.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id AFC9B43D48 for ; Sat, 20 Aug 2005 17:06:14 +0000 (GMT) (envelope-from chvogt@tm.uka.de) Received: from irams1.ira.uni-karlsruhe.de ([141.3.10.5]) by iramx2.ira.uni-karlsruhe.de with esmtps id 1E6WnI-0003G3-AF for ; Sat, 20 Aug 2005 19:06:14 +0200 Received: from i72archimedes.tm.uni-karlsruhe.de ([141.3.71.83]) by irams1.ira.uni-karlsruhe.de with esmtpsa id 1E6WnH-0006yP-BP; Sat, 20 Aug 2005 19:06:07 +0200 Message-ID: <430762FE.6050909@tm.uka.de> Date: Sat, 20 Aug 2005 19:06:06 +0200 From: Christian Vogt User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.10) Gecko/20050716 Thunderbird/1.0.6 Mnenhy/0.7.2.0 X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: freebsd-net@freebsd.org X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig5899A95B450EB056BCF21808" X-Spam-Score: -10.6 (----------) X-Spam-Status: No Cc: TM-RO2 Subject: Deactivate TCP Hostcache? (2) 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, 20 Aug 2005 17:06:15 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5899A95B450EB056BCF21808 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit BTW, I tried to set net.inet.tcp.hostcache.cachelimit to zero in /boot/loader.conf, but then the system crashes upon reboot. - Christian -- Christian Vogt, Institute of Telematics, University of Karlsruhe www.tm.uka.de/~chvogt/pubkey/ --------------enig5899A95B450EB056BCF21808 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFDB2L+wstEk8gl2rURAvlJAJ9M2+UDDr9cvrFKlEOjzMrv6Oaj1wCfYRPB Ib+9zABd4qPxK1JWP/QhDlc= =iqY4 -----END PGP SIGNATURE----- --------------enig5899A95B450EB056BCF21808-- From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 17:29:57 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 07BC616A41F for ; Sat, 20 Aug 2005 17:29:57 +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 4C02243D55 for ; Sat, 20 Aug 2005 17:29:55 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 4732 invoked from network); 20 Aug 2005 17:09:41 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 20 Aug 2005 17:09:41 -0000 Message-ID: <43076895.7C238E6E@freebsd.org> Date: Sat, 20 Aug 2005 19:29:57 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Christian Vogt References: <4307628A.9050102@tm.uka.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, TM-RO2 Subject: Re: Deactivate TCP Hostcache? 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, 20 Aug 2005 17:29:57 -0000 Christian Vogt wrote: > > Hi everybody, > > is there a way to deactivate the TCP hostcache? > > I could modify the kernel, but probably there is a more convenient way > to do this. No, there is no other way. > The reason I want to deactivate the hostcache is because I am doing > experiments and later measurements should not be different than earlier > ones due to cached information. Comment out the tcp_hc_update() call on line 737 in netinet/tcp_subr.c and it won't cache metrics anymore. The discovered path MTU is still stored though. -- Andre From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 17:31:57 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 BCB6116A41F for ; Sat, 20 Aug 2005 17:31:57 +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 3BC9B43D45 for ; Sat, 20 Aug 2005 17:31:57 +0000 (GMT) (envelope-from andre@freebsd.org) Received: (qmail 4771 invoked from network); 20 Aug 2005 17:11:44 -0000 Received: from unknown (HELO freebsd.org) ([62.48.0.54]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 20 Aug 2005 17:11:44 -0000 Message-ID: <43076910.25F05EDC@freebsd.org> Date: Sat, 20 Aug 2005 19:32:00 +0200 From: Andre Oppermann X-Mailer: Mozilla 4.8 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Christian Vogt References: <430762FE.6050909@tm.uka.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, TM-RO2 Subject: Re: Deactivate TCP Hostcache? (2) 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, 20 Aug 2005 17:31:57 -0000 Christian Vogt wrote: > > BTW, I tried to set net.inet.tcp.hostcache.cachelimit to zero in > /boot/loader.conf, but then the system crashes upon reboot. It doesn't prevent foot shooting for boot time sysctl's. -- Andre From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 17:50:30 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 37D5E16A41F; Sat, 20 Aug 2005 17:50:30 +0000 (GMT) (envelope-from chvogt@tm.uka.de) Received: from iramx2.ira.uni-karlsruhe.de (iramx2.ira.uni-karlsruhe.de [141.3.10.81]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85FBD43D48; Sat, 20 Aug 2005 17:50:29 +0000 (GMT) (envelope-from chvogt@tm.uka.de) Received: from irams1.ira.uni-karlsruhe.de ([141.3.10.5]) by iramx2.ira.uni-karlsruhe.de with esmtps id 1E6XU9-0004XO-Fo; Sat, 20 Aug 2005 19:50:28 +0200 Received: from i72archimedes.tm.uni-karlsruhe.de ([141.3.71.83]) by irams1.ira.uni-karlsruhe.de with esmtpsa id 1E6XU8-0002Lp-8j; Sat, 20 Aug 2005 19:50:24 +0200 Message-ID: <43076D5A.5070703@tm.uka.de> Date: Sat, 20 Aug 2005 19:50:18 +0200 From: Christian Vogt User-Agent: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.10) Gecko/20050716 Thunderbird/1.0.6 Mnenhy/0.7.2.0 X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Andre Oppermann References: <4307628A.9050102@tm.uka.de> <43076895.7C238E6E@freebsd.org> In-Reply-To: <43076895.7C238E6E@freebsd.org> X-Enigmail-Version: 0.90.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig04BF8EF4F8D0F70D4DBDF92D" X-Spam-Score: -10.6 (----------) X-Spam-Status: No Cc: freebsd-net@freebsd.org, TM-RO2 Subject: Re: Deactivate TCP Hostcache? 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, 20 Aug 2005 17:50:30 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig04BF8EF4F8D0F70D4DBDF92D Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Andre, thanks for the info. What I did is this: I changed the TCP_HOSTCACHE_PRUNE constant from 5 minutes to 5 seconds. After one experimentation run, my scripts call 'sysctl net.inet.tcp.hostcache.purge=1 && sleep 5'. This guarantees that there is no remaining info in the TCP hostcache when the next experimentation run takes off. Bye, - Christian -- Christian Vogt, Institute of Telematics, University of Karlsruhe www.tm.uka.de/~chvogt/pubkey/ Andre Oppermann wrote: > Christian Vogt wrote: > >>Hi everybody, >> >>is there a way to deactivate the TCP hostcache? >> >>I could modify the kernel, but probably there is a more convenient way >>to do this. > > > No, there is no other way. > > >>The reason I want to deactivate the hostcache is because I am doing >>experiments and later measurements should not be different than earlier >>ones due to cached information. > > > Comment out the tcp_hc_update() call on line 737 in netinet/tcp_subr.c > and it won't cache metrics anymore. The discovered path MTU is still > stored though. > --------------enig04BF8EF4F8D0F70D4DBDF92D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFDB21fwstEk8gl2rURAirqAKDVGf56jKQqdlVLJSOLYDVpVbiKhwCeN5m5 5OkeOJXLiuatvEQHUd7NHhw= =CPP4 -----END PGP SIGNATURE----- --------------enig04BF8EF4F8D0F70D4DBDF92D-- From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 22:39:54 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 51D1C16A420 for ; Sat, 20 Aug 2005 22:39:54 +0000 (GMT) (envelope-from ups@tree.com) Received: from smtp.speedfactory.net (smtp.speedfactory.net [66.23.216.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EB9B43D46 for ; Sat, 20 Aug 2005 22:39:53 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 4963 invoked by uid 210); 20 Aug 2005 22:40:26 +0000 Received: from 66.23.216.49 by talon (envelope-from , uid 201) with qmail-scanner-1.25st (clamdscan: 0.85.1/1034. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:1(66.23.216.49):. Processed in 0.03338 secs); 20 Aug 2005 22:40:26 -0000 X-Qmail-Scanner-Mail-From: ups@tree.com via talon X-Qmail-Scanner: 1.25st (Clear:RC:1(66.23.216.49):. Processed in 0.03338 secs Process 4958) Received: from 66-23-216-49.clients.speedfactory.net (HELO palm.tree.com) (66.23.216.49) by smtp.speedfactory.net with AES256-SHA encrypted SMTP; 20 Aug 2005 22:40:26 +0000 Received: from [127.0.0.1] (ups@localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j7KMdnrK021451; Sat, 20 Aug 2005 18:39:51 -0400 (EDT) (envelope-from ups@tree.com) From: Stephan Uphoff To: Luigi Rizzo In-Reply-To: <20050818073124.A87225@xorpc.icir.org> References: <20050816170519.A74422@xorpc.icir.org> <200508170435.34688.max@love2party.net> <20050817170248.A70991@xorpc.icir.org> <200508180332.34895.max@love2party.net> <20050818005739.A83776@xorpc.icir.org> <1124374713.1360.64660.camel@palm> <20050818073124.A87225@xorpc.icir.org> Content-Type: text/plain Message-Id: <1124577589.1360.73337.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sat, 20 Aug 2005 18:39:49 -0400 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Max Laier , net@freebsd.org Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 20 Aug 2005 22:39:54 -0000 On Thu, 2005-08-18 at 10:31, Luigi Rizzo wrote: > On Thu, Aug 18, 2005 at 10:18:33AM -0400, Stephan Uphoff wrote: > > On Thu, 2005-08-18 at 03:57, Luigi Rizzo wrote: > ... > > > In fact i don't understand why you consider spinning and sleeping > > > on a mutex two different things. > > > > The major difference between sleeping (cv_wait,msleep,..) and blocking > > on a mutex is priority inheritance. > > If you need to be able to use (non-spin) mutexes while holding a > > [R|W]LOCK and use a [R|W]LOCK while holding a (non-spin) mutex then you > > need to implement priority inheritance for [R|W]LOCKs. > > is that required (in FreeBSD, i mean) for algorithmic > correctness or just for performance ? Hi Luigi, It is theoretically required since otherwise low priority user threads (programs) could block system (interrupt) threads indefinitely long. Example: Extreme low priority (nice?) thread A holds read/write lock RW as reader Thread B is holding mutex M tries to acquire read/write lock RW as writer and sleeps. Thread C with better priority than A runs and enters a busy loop (in user space). Interrupt thread preempts C and tries to acquire Mutex M. Interrupt priority is propagated to B BUT NOT TO A. Interrupt thread blocks on Mutex M. Thread C resumes and will block thread I forever if it can keep a better priority than thread A. In practice you would probably just see bad latency every now and then and may never encounter a hang. Stephan From owner-freebsd-net@FreeBSD.ORG Sat Aug 20 23:02:29 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 D53C516A421 for ; Sat, 20 Aug 2005 23:02:29 +0000 (GMT) (envelope-from ups@tree.com) Received: from smtp.speedfactory.net (smtp.speedfactory.net [66.23.216.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45E3043D55 for ; Sat, 20 Aug 2005 23:02:27 +0000 (GMT) (envelope-from ups@tree.com) Received: (qmail 13794 invoked by uid 210); 20 Aug 2005 23:03:00 +0000 Received: from 66.23.216.49 by talon (envelope-from , uid 201) with qmail-scanner-1.25st (clamdscan: 0.85.1/1034. spamassassin: 3.0.2. perlscan: 1.25st. Clear:RC:1(66.23.216.49):. Processed in 0.039084 secs); 20 Aug 2005 23:03:00 -0000 X-Qmail-Scanner-Mail-From: ups@tree.com via talon X-Qmail-Scanner: 1.25st (Clear:RC:1(66.23.216.49):. Processed in 0.039084 secs Process 13788) Received: from 66-23-216-49.clients.speedfactory.net (HELO palm.tree.com) (66.23.216.49) by smtp.speedfactory.net with AES256-SHA encrypted SMTP; 20 Aug 2005 23:03:00 +0000 Received: from [127.0.0.1] (ups@localhost.tree.com [127.0.0.1]) by palm.tree.com (8.12.10/8.12.10) with ESMTP id j7KN2NrK021532; Sat, 20 Aug 2005 19:02:24 -0400 (EDT) (envelope-from ups@tree.com) From: Stephan Uphoff To: John Baldwin In-Reply-To: <200508181026.35502.jhb@FreeBSD.org> References: <20050816170519.A74422@xorpc.icir.org> <20050818005739.A83776@xorpc.icir.org> <1124374713.1360.64660.camel@palm> <200508181026.35502.jhb@FreeBSD.org> Content-Type: text/plain Message-Id: <1124578943.1360.73407.camel@palm> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Sat, 20 Aug 2005 19:02:23 -0400 Content-Transfer-Encoding: 7bit Cc: Luigi Rizzo , net@FreeBSD.org, Max Laier , arch@FreeBSD.org, "freebsd-arch@freebsd.org" Subject: Re: duplicate read/write locks in net/pfil.c and netinet/ip_fw2.c 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, 20 Aug 2005 23:02:30 -0000 On Thu, 2005-08-18 at 10:26, John Baldwin wrote: > On Thursday 18 August 2005 10:18 am, Stephan Uphoff wrote: > > On Thu, 2005-08-18 at 03:57, Luigi Rizzo wrote: > > > On Thu, Aug 18, 2005 at 03:32:19AM +0200, Max Laier wrote: > > > > On Thursday 18 August 2005 02:02, Luigi Rizzo wrote: > > > > > > ... > > > > > > > > could you guys look at the following code and see if it makes sense, > > > > > or tell me where i am wrong ? > > > > > > > > > > It should solve the starvation and blocking trylock problems, > > > > > because the active reader does not hold the mutex in the critical > > > > > > ^^^^^^ > > > > > > i meant 'writer', sorry... as max said even in the current implementation > > > the reader does not hold the lock. > > > > > > > > int > > > > > RLOCK(struct rwlock *rwl, int try) > > > > > { > > > > > if (!try) > > > > > mtx_lock(&rwl->m); > > > > > else if (!mtx_trylock(&rwl->m)) > > > > > return EBUSY; > > > > > if (rwl->writers == 0) /* no writer, pass */ > > > > > rwl->readers++; > > > > > else { > > > > > rwl->br++; > > > > > cv_wait(&rwl->qr, &rwl->m); > > > > > > > > ^^^^^^^ > > > > > > > > That we can't do. That's exactly the thing the existing sx(9) > > > > implementation does and where it breaks. The problem is that cv_wait() > > > > is an implicit sleep which breaks when we try to RLOCK() with other > > > > mutex already acquired. > > > > > > but that is not a solvable problem given that the *LOCK may be blocking. > > > And the cv_wait is not an unconditioned sleep, it is one where you > > > release the lock right before ans wait for an event to wake you up. > > > In fact i don't understand why you consider spinning and sleeping > > > on a mutex two different things. > > > > The major difference between sleeping (cv_wait,msleep,..) and blocking > > on a mutex is priority inheritance. > > If you need to be able to use (non-spin) mutexes while holding a > > [R|W]LOCK and use a [R|W]LOCK while holding a (non-spin) mutex then you > > need to implement priority inheritance for [R|W]LOCKs. > > For the (single) write lock holder tracking priority is easy. (just like > > a (non-spin) mutex). However priority inheritance to multiple readers is > > more difficult as one needs to keep track of all holders of the lock. > > Keeping track of all readers requires pre-allocated memory resources. > > This memory could come from > > 1) A limited global pool > > 2) A limited per [R|W]LOCK pool > > 3) A limited per thread pool > > 4) As a parameter for acquiring a RLOCK > > None of the choices are really pretty. > > (1),(2) and (3) can lead to limiting reader parallelism when running out > > of resources. (4) may be practically for some cases since the memory > > could be allocated from stack. However since the memory must be valid > > while holding a read lock choice (4) makes some algorithms (than use for > > example lock crabbing) a bit harder to implement. > > Solaris handles the read case by only tracking the first thread to get a read > lock (referred to as the "owner of record" IIRC) and only propagating > priority to that thread and ignoring other readers. They admit it's not > perfect as well. That's mentioned in the Solaris Internals book. Hi John, If I recall correctly Solaris user threads get a better "system priority" when running/blocking in the kernel. This prevents threads holding critical kernel resources from being starved by user processes. I think this would also be a good idea for FreeBSD to prevent unbound priority inversions caused by vnode locks and other non-tracked resources. However even with these changes I don't think the Solaris implementation is the right way to go if we want to freely mix mutexes and [R|W]locks. Stephan