From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 02:31:33 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 276B816A412 for ; Sun, 26 Nov 2006 02:31:33 +0000 (UTC) (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 561DD43D45 for ; Sun, 26 Nov 2006 02:30:41 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.66.6.139] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1Go9nm0Eed-0005QQ; Sun, 26 Nov 2006 03:31:30 +0100 From: Max Laier Organization: FreeBSD To: "Nicolae Namolovan" Date: Sun, 26 Nov 2006 03:31:20 +0100 User-Agent: KMail/1.9.4 References: <20061125015223.GA51565@cdnetworks.co.kr> In-Reply-To: X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4004750.kLhMM41WzV"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200611260331.28847.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-net@freebsd.org Subject: ping -f panic [Re: Marvell Yukon 88E8056 FreeBsd Drivers] 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, 26 Nov 2006 02:31:33 -0000 --nextPart4004750.kLhMM41WzV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello Nicolae, On Saturday 25 November 2006 23:20, Nicolae Namolovan wrote: > But I need to use it on a production server and the CURRENT one is too > unstable, without too much thinking I just run ping -f 127.0.0.1 and > after some minutes I got kernel panic, heh. could you please be more specific about this? My rather recent current=20 box is running for over 45min doing "ping -f 127.0.0.1" with no panic or=20 other ill behavior so far. After about 10min I disabled the icmp=20 limiting which obviously didn't trigger it either. Could you provide a=20 back trace or at least a panic message? 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 --nextPart4004750.kLhMM41WzV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFaPyAXyyEoT62BG0RAv1yAJ9cnRj8Sq4GOYNW6oy/9WHIsQCfvACeO/BN +M6QGK586+rMe904GEy6xrc= =48nP -----END PGP SIGNATURE----- --nextPart4004750.kLhMM41WzV-- From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 06:43:55 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6BF1116A407 for ; Sun, 26 Nov 2006 06:43:55 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2-3.pacific.net.au [61.8.2.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 907A443D5D for ; Sun, 26 Nov 2006 06:43:02 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout2.pacific.net.au (Postfix) with ESMTP id AA0176E31A; Sun, 26 Nov 2006 17:43:52 +1100 (EST) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 6A05B8C03; Sun, 26 Nov 2006 17:43:52 +1100 (EST) Date: Sun, 26 Nov 2006 17:43:45 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Max Laier In-Reply-To: <200611260331.28847.max@love2party.net> Message-ID: <20061126165353.Y47830@delplex.bde.org> References: <20061125015223.GA51565@cdnetworks.co.kr> <200611260331.28847.max@love2party.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Nicolae Namolovan , freebsd-net@freebsd.org Subject: Re: ping -f panic [Re: Marvell Yukon 88E8056 FreeBsd Drivers] 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, 26 Nov 2006 06:43:55 -0000 On Sun, 26 Nov 2006, Max Laier wrote: > On Saturday 25 November 2006 23:20, Nicolae Namolovan wrote: >> But I need to use it on a production server and the CURRENT one is too >> unstable, without too much thinking I just run ping -f 127.0.0.1 and >> after some minutes I got kernel panic, heh. > > could you please be more specific about this? My rather recent current > box is running for over 45min doing "ping -f 127.0.0.1" with no panic or > other ill behavior so far. After about 10min I disabled the icmp > limiting which obviously didn't trigger it either. Could you provide a > back trace or at least a panic message? Thanks. I haven't seen any problems with ping, but ttcp -u causes the panic in sbdrop_internal() about half the time when the client ttcp is killed by ^C. There is apparently a race in close when packets are arriving. The stack trace on the panicing CPU is (always?): ... sigexit exit1 ... closef ... soclose ... sbflush_internal sbdrop_internal panic and on the other CPU, with net.isr.direct=1 it was: bge_rxeof ... netisr_dispatch ip_input ... sbappendaddr_locked mb_ctor_mbuf --- trap (NMI IPI for cpustop). and with net.isr.direct=0, the other CPU was just running "idle: cpuN" and the bge thread was in ithread_loop. Bruce From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 12:39:17 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A997D16A403 for ; Sun, 26 Nov 2006 12:39:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B48A43D70 for ; Sun, 26 Nov 2006 12:38:18 +0000 (GMT) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 4401546C9E; Sun, 26 Nov 2006 07:39:12 -0500 (EST) Date: Sun, 26 Nov 2006 12:39:12 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Bruce Evans In-Reply-To: <20061126165353.Y47830@delplex.bde.org> Message-ID: <20061126123700.G2108@fledge.watson.org> References: <20061125015223.GA51565@cdnetworks.co.kr> <200611260331.28847.max@love2party.net> <20061126165353.Y47830@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Max Laier , freebsd-net@freebsd.org, Nicolae Namolovan Subject: Re: ping -f panic [Re: Marvell Yukon 88E8056 FreeBsd Drivers] 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, 26 Nov 2006 12:39:17 -0000 On Sun, 26 Nov 2006, Bruce Evans wrote: > On Sun, 26 Nov 2006, Max Laier wrote: > >> On Saturday 25 November 2006 23:20, Nicolae Namolovan wrote: >>> But I need to use it on a production server and the CURRENT one is too >>> unstable, without too much thinking I just run ping -f 127.0.0.1 and after >>> some minutes I got kernel panic, heh. >> >> could you please be more specific about this? My rather recent current box >> is running for over 45min doing "ping -f 127.0.0.1" with no panic or other >> ill behavior so far. After about 10min I disabled the icmp limiting which >> obviously didn't trigger it either. Could you provide a back trace or at >> least a panic message? Thanks. > > I haven't seen any problems with ping, but ttcp -u causes the panic in > sbdrop_internal() about half the time when the client ttcp is killed by ^C. > There is apparently a race in close when packets are arriving. The stack > trace on the panicing CPU is (always?): > > ... sigexit exit1 ... closef ... soclose ... > sbflush_internal sbdrop_internal panic > > and on the other CPU, with net.isr.direct=1 it was: > > bge_rxeof ... netisr_dispatch ip_input ... > sbappendaddr_locked mb_ctor_mbuf --- trap (NMI IPI for cpustop). > > and with net.isr.direct=0, the other CPU was just running "idle: cpuN" and > the bge thread was in ithread_loop. Historically, sbflush panics have been a sign of a driver<->stack race, in which the driver touches the mbuf [chain] after injecting it into the stack, corrupting the socket buffer state. For example, freeing it, appending another mbuf, changing the length, etc. It often triggers in sbflush because we notice the inconsistency when we close the socket and flush the buffer later. I wouldn't preclude a network stack bug, but I would definitely take a look at the driver in detail first, making sure all error cases are handled properly, etc. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 18:09:36 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C868216A509 for ; Sun, 26 Nov 2006 18:09:36 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C39C442E5 for ; Sun, 26 Nov 2006 18:03:54 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kAQI37n6065916 for ; Sun, 26 Nov 2006 21:03:07 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kAQI36Rd065915 for freebsd-net@freebsd.org; Sun, 26 Nov 2006 21:03:07 +0300 (MSK) (envelope-from yar) Date: Sun, 26 Nov 2006 21:03:06 +0300 From: Yar Tikhiy To: freebsd-net@freebsd.org Message-ID: <20061126180306.GA64912@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: m_copy & if_simloop 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, 26 Nov 2006 18:09:37 -0000 Hi folks, A friend user reported to me that rwhod wouldn't work in CURRENT due to broken outgoing packets. Here's an example: 16:15:28.212810 IP truncated-ip - 6865 bytes missing! (tos 0x0, ttl 64, id 28554, offset 0, flags [none], proto: UDP (17), length: 7169, bad cksum 11c (->c64b)!) 10.10.10.4.513 > 10.10.10.255.513: UDP, length 276 0x0000: 4500 1c01 6f8a 0000 4011 011c 0a0a 0a04 E...o...@....... ^^^^ ^^^^ broken fields 0x0010: 0a0a 0aff 0201 0201 011c 0000 0101 0000 ................ 0x0020: 4565 9ef0 0000 0000 6467 0000 0000 0000 Ee......dg...... 0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ 0x0040: 0000 0000 0000 0000 0000 001a 0000 000e ................ 0x0050: 0000 0005 4564 a5e7 7474 7976 3000 0000 ....Ed..ttyv0... 0x0060: 726f 6f74 0000 0000 4565 9d4a 0000 01a6 root....Ee.J.... 0x0070: 7474 7976 3100 0000 726f 6f74 0000 0000 ttyv1...root.... 0x0080: 4565 9d4d 0000 000c 7474 7976 3200 0000 Ee.M....ttyv2... 0x0090: 726f 6f74 0000 0000 4565 9d4f 0000 0099 root....Ee.O.... 0x00a0: 7474 7976 3300 0000 726f 6f74 0000 0000 ttyv3...root.... 0x00b0: 4565 9d52 0000 019e 7474 7976 3400 0000 Ee.R....ttyv4... 0x00c0: 726f 6f74 0000 0000 4565 9d54 0000 019c root....Ee.T.... 0x00d0: 7474 7976 3500 0000 726f 6f74 0000 0000 ttyv5...root.... 0x00e0: 4565 9d59 0000 0198 7474 7976 3600 0000 Ee.Y....ttyv6... 0x00f0: 726f 6f74 0000 0000 4565 9d5b 0000 0195 root....Ee.[.... 0x0100: 7474 7976 3700 0000 726f 6f74 0000 0000 ttyv7...root.... 0x0110: 4565 9d5e 0000 0000 7474 7970 3100 0000 Ee.^....ttyp1... 0x0120: 7961 7200 0000 0000 4565 8361 0000 04b2 yar.....Ee.a.... BTW, the problem manifests itself only if the packet is longer than 256 bytes. The problem seems to stem from the following. In ether_output(), the broadcast packet is copied and looped back up the stack, now via if_simloop(). The copy has been made with m_copy() since 4.4BSD. I can't tell about the old days, but today m_copy() alias m_copym() will copy mbufs but not mbuf clusters, which results in an effectively read-only copy. Such a copy must not be passed up the stack because the stack is free to change it and thus destroy the original. For a long time, enough leading bytes were in plain mbuf(s) for the bug to stay unnoticed. However, the pattern changed in CURRENT some day and -- here we are. The problem can be cured by using m_dup() in place of m_copy() (verified). Is my analysis correct? If so, here's an idea of a general fix. Several source files do the following: struct mbuf *mcopy = m_copy(m, 0, M_COPYALL); /* some even don't check mcopy for NULL here! */ if_simloop(ifp, mcopy, family, hdrlen); It's common code, so just a flag to if_simloop() cound be introduced meaning "m_dup() the packet properly". E.g.: if_simloop(ifp, m, family, hdrlen, M_DUP); In STABLE, M_COPYALL can be added to hdrlen instead to preserve the ABI. M_COPYALL is defined as 1000000000 now, which allows for the trick. Comments? Thanks! Yar From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 18:48:17 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 094E816A40F for ; Sun, 26 Nov 2006 18:48:17 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95DAA43D77 for ; Sun, 26 Nov 2006 18:47:20 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id kAQIlqom095590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Nov 2006 10:47:53 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <4569E158.5070800@errno.com> Date: Sun, 26 Nov 2006 10:47:52 -0800 From: Sam Leffler User-Agent: Thunderbird 1.5.0.7 (X11/20060920) MIME-Version: 1.0 To: Yar Tikhiy References: <20061126180306.GA64912@comp.chem.msu.su> In-Reply-To: <20061126180306.GA64912@comp.chem.msu.su> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: m_copy & if_simloop 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, 26 Nov 2006 18:48:17 -0000 Yar Tikhiy wrote: > Hi folks, > > A friend user reported to me that rwhod wouldn't work in CURRENT > due to broken outgoing packets. Here's an example: > > 16:15:28.212810 IP truncated-ip - 6865 bytes missing! (tos 0x0, ttl 64, id 28554, offset 0, flags [none], proto: UDP (17), length: 7169, bad cksum 11c (->c64b)!) 10.10.10.4.513 > 10.10.10.255.513: UDP, length 276 > 0x0000: 4500 1c01 6f8a 0000 4011 011c 0a0a 0a04 E...o...@....... > ^^^^ ^^^^ broken fields > 0x0010: 0a0a 0aff 0201 0201 011c 0000 0101 0000 ................ > 0x0020: 4565 9ef0 0000 0000 6467 0000 0000 0000 Ee......dg...... > 0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ > 0x0040: 0000 0000 0000 0000 0000 001a 0000 000e ................ > 0x0050: 0000 0005 4564 a5e7 7474 7976 3000 0000 ....Ed..ttyv0... > 0x0060: 726f 6f74 0000 0000 4565 9d4a 0000 01a6 root....Ee.J.... > 0x0070: 7474 7976 3100 0000 726f 6f74 0000 0000 ttyv1...root.... > 0x0080: 4565 9d4d 0000 000c 7474 7976 3200 0000 Ee.M....ttyv2... > 0x0090: 726f 6f74 0000 0000 4565 9d4f 0000 0099 root....Ee.O.... > 0x00a0: 7474 7976 3300 0000 726f 6f74 0000 0000 ttyv3...root.... > 0x00b0: 4565 9d52 0000 019e 7474 7976 3400 0000 Ee.R....ttyv4... > 0x00c0: 726f 6f74 0000 0000 4565 9d54 0000 019c root....Ee.T.... > 0x00d0: 7474 7976 3500 0000 726f 6f74 0000 0000 ttyv5...root.... > 0x00e0: 4565 9d59 0000 0198 7474 7976 3600 0000 Ee.Y....ttyv6... > 0x00f0: 726f 6f74 0000 0000 4565 9d5b 0000 0195 root....Ee.[.... > 0x0100: 7474 7976 3700 0000 726f 6f74 0000 0000 ttyv7...root.... > 0x0110: 4565 9d5e 0000 0000 7474 7970 3100 0000 Ee.^....ttyp1... > 0x0120: 7961 7200 0000 0000 4565 8361 0000 04b2 yar.....Ee.a.... > > BTW, the problem manifests itself only if the packet is longer than > 256 bytes. > > The problem seems to stem from the following. In ether_output(), > the broadcast packet is copied and looped back up the stack, now > via if_simloop(). The copy has been made with m_copy() since 4.4BSD. > I can't tell about the old days, but today m_copy() alias m_copym() > will copy mbufs but not mbuf clusters, which results in an effectively > read-only copy. Such a copy must not be passed up the stack because > the stack is free to change it and thus destroy the original. For > a long time, enough leading bytes were in plain mbuf(s) for the bug > to stay unnoticed. However, the pattern changed in CURRENT some > day and -- here we are. > > The problem can be cured by using m_dup() in place of m_copy() > (verified). > > Is my analysis correct? Sounds likely. The read-only'ness definitely. > > If so, here's an idea of a general fix. Several source files do > the following: > > struct mbuf *mcopy = m_copy(m, 0, M_COPYALL); > /* some even don't check mcopy for NULL here! */ > if_simloop(ifp, mcopy, family, hdrlen); > > It's common code, so just a flag to if_simloop() cound be introduced > meaning "m_dup() the packet properly". E.g.: > > if_simloop(ifp, m, family, hdrlen, M_DUP); > > In STABLE, M_COPYALL can be added to hdrlen instead to preserve the > ABI. M_COPYALL is defined as 1000000000 now, which allows for the > trick. > > Comments? Thanks! What you suggest seems ok. You might also look at m_unshare which was added for similar purpose but is not exactly what you want. It may be possible to combine m_copy+m_unshare code (not calls) to create the new mbuf chain more efficiently. Sam From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 20:39:47 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 947D116A4FE for ; Sun, 26 Nov 2006 20:39:47 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 45C8F447CD for ; Sun, 26 Nov 2006 20:22:04 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kAQKMaYl067602; Sun, 26 Nov 2006 23:22:36 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kAQKMUIo067599; Sun, 26 Nov 2006 23:22:30 +0300 (MSK) (envelope-from yar) Date: Sun, 26 Nov 2006 23:22:30 +0300 From: Yar Tikhiy To: Miroslav Slavkov Message-ID: <20061126202230.GB66009@comp.chem.msu.su> References: <20061122141346.d23e0fbb@mail.svishtov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061122141346.d23e0fbb@mail.svishtov.net> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org Subject: Re: strange systat -if output 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, 26 Nov 2006 20:39:47 -0000 On Wed, Nov 22, 2006 at 04:13:46PM +0200, Miroslav Slavkov wrote: > /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 > Load Average ||| > > Interface Traffic Peak Total > > > vlan0 in 4.597 MB/s 4.612 MB/s 14278817138664.000 b > out 2.970 MB/s 3.256 MB/s 9506199897824.000 b > > lo0 in 0.000 KB/s 0.000 KB/s 324.735 KB > out 0.000 KB/s 0.000 KB/s 324.735 KB > > em3 in 0.000 KB/s 0.000 KB/s 1.201 KB > out 0.000 KB/s 0.000 KB/s 0.123 KB > > em2 in 6.754 MB/s 7.164 MB/s 31224775802896.000 b > out 10.949 MB/s 10.949 MB/s 40043778753064.000 b > > em1 in 4.622 MB/s 4.753 MB/s 14388325329216.000 b > out 2.985 MB/s 3.272 MB/s 9555342519960.000 b > > em0 in 6.356 MB/s 6.454 MB/s 26014288927776.000 b > out 3.665 MB/s 4.012 MB/s 21192641392160.000 b > > > Strange isn't it :) > 6.2-PRERELEASE, amd64 platform It's a bug in systat indeed. It used the bogus bit scale for amount >= 1024 GB. Just committed a fix for it. -- Yar From owner-freebsd-net@FreeBSD.ORG Sun Nov 26 20:42:12 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 48C1016A503 for ; Sun, 26 Nov 2006 20:42:12 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8368043D9A for ; Sun, 26 Nov 2006 20:25:16 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kAQKPuWT067681; Sun, 26 Nov 2006 23:25:56 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kAQKPt6C067680; Sun, 26 Nov 2006 23:25:55 +0300 (MSK) (envelope-from yar) Date: Sun, 26 Nov 2006 23:25:55 +0300 From: Yar Tikhiy To: Anton Yuzhaninov Message-ID: <20061126202555.GC66009@comp.chem.msu.su> References: <0174846.20061123150509@citrin.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0174846.20061123150509@citrin.ru> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org Subject: Re: zero kern.ipc.nsfbufs 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: Sun, 26 Nov 2006 20:42:12 -0000 On Thu, Nov 23, 2006 at 03:05:09PM +0300, Anton Yuzhaninov wrote: > Hello All, > > Why on AMD64 kern.ipc.nsfbufs always zero: > > # sysctl kern.ipc | fgrep nsfbufs > kern.ipc.nsfbufsused: 0 > kern.ipc.nsfbufspeak: 0 > kern.ipc.nsfbufs: 0 > # netstat -m | fgrep sfbufs > 0/0/0 sfbufs in use (current/peak/max) > 0 requests for sfbufs denied > 0 requests for sfbufs delayed > # uname -srim > FreeBSD 6.0-RELEASE amd64 GENERIC > > Is this mean, that on amd64 nsfbufs have no limit? amd64 and ia64 neither need nor use nsfbufs. See http://www.usenix.org/events//usenix05/tech/general/full_papers/elmeleegy/elmeleegy_html/index.html -- Yar From owner-freebsd-net@FreeBSD.ORG Mon Nov 27 01:15:25 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EEAC216A412 for ; Mon, 27 Nov 2006 01:15:25 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8128843D5A for ; Mon, 27 Nov 2006 01:14:27 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1355899wxc for ; Sun, 26 Nov 2006 17:15:23 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=mPbzJag8uHT8mM4N+QYMzjrmB8l6cR3on5nksUQYm20kCogKTY02bJJXr54iQhTnbjGwrDiE04pOGduWkXo6CUGU+vULF2gFlzUBJb4r0i8UilIBp+Co72nAtAQrwS7s3SEt77R8FhcTh/diWLkbO+Vu0rlVRzBHLCgwB1x9EvQ= Received: by 10.90.31.19 with SMTP id e19mr9374151age.1164590123725; Sun, 26 Nov 2006 17:15:23 -0800 (PST) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id 35sm26078266wra.2006.11.26.17.15.21; Sun, 26 Nov 2006 17:15:23 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id kAR1HWbW060962 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Nov 2006 10:17:32 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id kAR1HUEh060961; Mon, 27 Nov 2006 10:17:30 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Mon, 27 Nov 2006 10:17:30 +0900 From: Pyun YongHyeon To: Nicolae Namolovan Message-ID: <20061127011729.GA60591@cdnetworks.co.kr> References: <20061125015223.GA51565@cdnetworks.co.kr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org, andre@freebsd.org, support@syskonnect.de Subject: Re: Marvell Yukon 88E8056 FreeBsd Drivers X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Nov 2006 01:15:26 -0000 On Sun, Nov 26, 2006 at 12:20:46AM +0200, Nicolae Namolovan wrote: > Hooray, msk.HEAD.diff worked ! But only on the CURRENT.. > Thanks for the report. It would be even better if you can post dmesg output related with msk(4) and e1000phy(4). > For those who don't know very well the "patch" tool(like me ;p), > msk.HEAD.diff create some new dirs, you must provide to the patch > utility the -p option(thanks to the folk from irc), here's how I got > it work(not sure if that's 100% correct): > cp msk.HEAD.diff /usr/src/ > cd /usr/src/ > patch -i msk.HEAD.diff -p > > But I need to use it on a production server and the CURRENT one is too > unstable, without too much thinking I just run ping -f 127.0.0.1 and > after some minutes I got kernel panic, heh. > I can't sure it's related with msk(4) but I'll try on my box. > I think the msk driver is a great addition to the 7.0 version, great job ! > > If anyone know how to make Marvell Yukon 88E8056 work under FreeBSD 6 > stable version, I would be very pleased to hear.. > Last week I've finally fixed long standing Rx performance issue so it would show up in src tree soon. Due to the API differences between CURRENT and RELENG_6 it needs more work to run msk(4) on REELENG_6. In addition, I should fix e1000phy(4) first to make manual media selection work on msk(4). So please be patient and give me a more time. > On 11/25/06, Pyun YongHyeon wrote: > >On Fri, Nov 24, 2006 at 03:33:21PM +0200, Nicolae Namolovan wrote: > > > I took the hack from http://kerneltrap.org/node/7135, that guy said > > > that in linux you must "add the 4364 devID into sky2.c symply search > > > for 4363". > > > > > > I apply the same idea to > > > http://people.freebsd.org/~andre/mykbsd60x86-8.12.1.3-src.tgz, > > > modifyed oem.c and oem.h, > > > > > > oem.c > > > { VENDOR_ID_MRVL, DEV_ID_MRVL_4361, SUBVENDOR_ID_ANY, SUBDEVICE_ID_ANY, > > > "Marvell 88E8050 Gigabit Ethernet Controller, Ver. 8.12.1.3"}, > > > { VENDOR_ID_MRVL, DEV_ID_MRVL_4362, SUBVENDOR_ID_ANY, SUBDEVICE_ID_ANY, > > > "Marvell 88E8053 Gigabit Ethernet Controller, Ver. 8.12.1.3"}, > > > + /* custom add..not sure */ > > > + { VENDOR_ID_MRVL, DEV_ID_MRVL_4364, SUBVENDOR_ID_ANY, > > SUBDEVICE_ID_ANY, > > > + "Marvell 88E8056 Gigabit Ethernet Controller, Ver. 8.12.1.3"}, > > > > > > > > > oem.h > > > > > > #define DEV_ID_MRVL_4362 0x4362 > > > + /* custom add..not sure */ > > > + #define DEV_ID_MRVL_4364 0x4364 > > > > > > After I compile it. > > > > > > That was sufficient to make this driver to hook mine Marvell Yukon > > > 88E8056, I can see it in ifconfig but i get: > > > > > > "status: no carrier" > > > > > > Tried to make the interface down/up, put away/back the network cable, > > > didn't help.. Still "no carrier". > > > > > > But it works fine under M Windows (so the problem is not in network > > > cable or the network device).. > > > > > > Any suggestions ? > > > > > > Maybe I must load the Windows drivers with NDIS, but I'm afraid of > > > performance degradation/instability ? > > > > > > Marvell Yukon 88E8056 are in the popular ASUS P5B and Gigabyte 965P-S3 > > > motherboards. > > > > > > >You can find latest msk(4) at the following URL. > >http://people.freebsd.org/~yongari/msk/msk.HEAD.diff > > > >It supports the device ID you mentioned but I don't know whether it > >works or not. ATM the driver has three known issues. > > o poor Rx performance > > I'm working on this but had no clue so far. > > o 88E8055 hangup : > > One user reported system freeze when msk(4) is loaded. Since I don't > > have the hardware it's very hard to fix. :-( > > o Manual speed selection doesn't seem to work. > > It needs additional code for e1000phy(4) to fix. > > > >You need latest CURRENT to aplly the patch. The driver will print very > >ugly number sequnces but you can safely ingore it. > > > >-- > >Regards, > >Pyun YongHyeon > > > > > -- > Best regards, > Nicolae Namolovan. -- Regards, Pyun YongHyeon From owner-freebsd-net@FreeBSD.ORG Mon Nov 27 11:09:25 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A32FE16A4FE for ; Mon, 27 Nov 2006 11:09:25 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67F4E43DC0 for ; Mon, 27 Nov 2006 11:07:35 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kARB8ZJ6092033 for ; Mon, 27 Nov 2006 11:08:35 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kARB8XQX092029 for freebsd-net@FreeBSD.org; Mon, 27 Nov 2006 11:08:33 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 27 Nov 2006 11:08:33 GMT Message-Id: <200611271108.kARB8XQX092029@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon 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, 27 Nov 2006 11:09:25 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- a kern/38554 net changing interface ipaddress doesn't seem to work s kern/39937 net ipstealth issue o kern/92552 net A serious bug in most network drivers from 5.X to 6.X s kern/95665 net [if_tun] "ping: sendto: No buffer space available" wit 4 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s kern/19875 net A new protocol family, PF_IPOPTION, to handle IP optio o conf/23063 net [PATCH] for static ARP tables in rc.network s bin/41647 net ifconfig(8) doesn't accept lladdr along with inet addr o kern/54383 net [nfs] [patch] NFS root configurations without dynamic s kern/60293 net FreeBSD arp poison patch o kern/95267 net packet drops periodically appear f kern/95277 net [netinet] IP Encapsulation mask_match() returns wrong o kern/102035 net [plip] plip networking disables parallel port printing o conf/102502 net [patch] ifconfig name does't rename netgraph node in n 9 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Nov 27 11:56:39 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5729216A403 for ; Mon, 27 Nov 2006 11:56:39 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAB2243D4C for ; Mon, 27 Nov 2006 11:55:36 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.3) with ESMTP id kARBu53l080496; Mon, 27 Nov 2006 14:56:05 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.3/Submit) id kARBu3VT080495; Mon, 27 Nov 2006 14:56:03 +0300 (MSK) (envelope-from yar) Date: Mon, 27 Nov 2006 14:56:03 +0300 From: Yar Tikhiy To: Sam Leffler Message-ID: <20061127115602.GB77085@comp.chem.msu.su> References: <20061126180306.GA64912@comp.chem.msu.su> <4569E158.5070800@errno.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4569E158.5070800@errno.com> User-Agent: Mutt/1.5.9i Cc: freebsd-net@freebsd.org Subject: Re: m_copy & if_simloop 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, 27 Nov 2006 11:56:39 -0000 On Sun, Nov 26, 2006 at 10:47:52AM -0800, Sam Leffler wrote: > Yar Tikhiy wrote: > > Hi folks, > > > > A friend user reported to me that rwhod wouldn't work in CURRENT > > due to broken outgoing packets. Here's an example: > > > > 16:15:28.212810 IP truncated-ip - 6865 bytes missing! (tos 0x0, ttl 64, id 28554, offset 0, flags [none], proto: UDP (17), length: 7169, bad cksum 11c (->c64b)!) 10.10.10.4.513 > 10.10.10.255.513: UDP, length 276 > > 0x0000: 4500 1c01 6f8a 0000 4011 011c 0a0a 0a04 E...o...@....... > > ^^^^ ^^^^ broken fields > > 0x0010: 0a0a 0aff 0201 0201 011c 0000 0101 0000 ................ > > 0x0020: 4565 9ef0 0000 0000 6467 0000 0000 0000 Ee......dg...... > > 0x0030: 0000 0000 0000 0000 0000 0000 0000 0000 ................ > > 0x0040: 0000 0000 0000 0000 0000 001a 0000 000e ................ > > 0x0050: 0000 0005 4564 a5e7 7474 7976 3000 0000 ....Ed..ttyv0... > > 0x0060: 726f 6f74 0000 0000 4565 9d4a 0000 01a6 root....Ee.J.... > > 0x0070: 7474 7976 3100 0000 726f 6f74 0000 0000 ttyv1...root.... > > 0x0080: 4565 9d4d 0000 000c 7474 7976 3200 0000 Ee.M....ttyv2... > > 0x0090: 726f 6f74 0000 0000 4565 9d4f 0000 0099 root....Ee.O.... > > 0x00a0: 7474 7976 3300 0000 726f 6f74 0000 0000 ttyv3...root.... > > 0x00b0: 4565 9d52 0000 019e 7474 7976 3400 0000 Ee.R....ttyv4... > > 0x00c0: 726f 6f74 0000 0000 4565 9d54 0000 019c root....Ee.T.... > > 0x00d0: 7474 7976 3500 0000 726f 6f74 0000 0000 ttyv5...root.... > > 0x00e0: 4565 9d59 0000 0198 7474 7976 3600 0000 Ee.Y....ttyv6... > > 0x00f0: 726f 6f74 0000 0000 4565 9d5b 0000 0195 root....Ee.[.... > > 0x0100: 7474 7976 3700 0000 726f 6f74 0000 0000 ttyv7...root.... > > 0x0110: 4565 9d5e 0000 0000 7474 7970 3100 0000 Ee.^....ttyp1... > > 0x0120: 7961 7200 0000 0000 4565 8361 0000 04b2 yar.....Ee.a.... > > > > BTW, the problem manifests itself only if the packet is longer than > > 256 bytes. > > > > The problem seems to stem from the following. In ether_output(), > > the broadcast packet is copied and looped back up the stack, now > > via if_simloop(). The copy has been made with m_copy() since 4.4BSD. > > I can't tell about the old days, but today m_copy() alias m_copym() > > will copy mbufs but not mbuf clusters, which results in an effectively > > read-only copy. Such a copy must not be passed up the stack because > > the stack is free to change it and thus destroy the original. For > > a long time, enough leading bytes were in plain mbuf(s) for the bug > > to stay unnoticed. However, the pattern changed in CURRENT some > > day and -- here we are. > > > > The problem can be cured by using m_dup() in place of m_copy() > > (verified). > > > > Is my analysis correct? > > Sounds likely. The read-only'ness definitely. Thanks! > > If so, here's an idea of a general fix. Several source files do > > the following: > > > > struct mbuf *mcopy = m_copy(m, 0, M_COPYALL); > > /* some even don't check mcopy for NULL here! */ > > if_simloop(ifp, mcopy, family, hdrlen); > > > > It's common code, so just a flag to if_simloop() cound be introduced > > meaning "m_dup() the packet properly". E.g.: > > > > if_simloop(ifp, m, family, hdrlen, M_DUP); > > > > In STABLE, M_COPYALL can be added to hdrlen instead to preserve the > > ABI. M_COPYALL is defined as 1000000000 now, which allows for the > > trick. > > > > Comments? Thanks! > > What you suggest seems ok. You might also look at m_unshare which was > added for similar purpose but is not exactly what you want. It may be > possible to combine m_copy+m_unshare code (not calls) to create the new > mbuf chain more efficiently. I hope I understood your idea right: Currently, m_dup() will produce some copy of a mbuf chain; OTOH, as we have to copy the data around anyway, it's a good chance to optimize its layout as m_unshare() does. Is this your point? In fact, m_dup() just puts the data in mbuf clusters instead of producing an identical, or otherwise suboptimal, copy of the original mbuf chain, so it should be good for the purpose. -- Yar From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 09:41:54 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E33916A40F for ; Tue, 28 Nov 2006 09:41:54 +0000 (UTC) (envelope-from weiwu@sdf.lonestar.org) Received: from bossdog.realss.com (bossdog.realss.com [211.157.108.128]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7190243D6E for ; Tue, 28 Nov 2006 09:41:27 +0000 (GMT) (envelope-from weiwu@sdf.lonestar.org) Received: from localhost (unknown [127.0.0.1]) by bossdog.realss.com (Postfix) with ESMTP id 03FFC1C009F for ; Tue, 28 Nov 2006 17:41:43 +0800 (CST) Received: from bossdog.realss.com ([127.0.0.1]) by localhost (bossdog.realss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18206-17 for ; Tue, 28 Nov 2006 17:41:42 +0800 (CST) Received: from [192.168.0.17] (sappho.realss.com [218.85.101.243]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by bossdog.realss.com (Postfix) with ESMTP id C87231C009C for ; Tue, 28 Nov 2006 17:41:41 +0800 (CST) From: =?UTF-8?Q?=E5=BC=A0=E9=9F=A1=E6=AD=A6?= To: freebsd-net@freebsd.org Content-Type: text/plain Date: Tue, 28 Nov 2006 17:37:47 +0800 Message-Id: <1164706667.11377.0.camel@joe.realss> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at bossdog.realss.com Subject: mount_smbfs: charset convertion (-E) doesn't work 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, 28 Nov 2006 09:41:54 -0000 Hello. I tried a lot of different methods but I cannot mount a Windows share which is in GB18030 charset to my FreeBSD host in UTF-8 charset. I always gets junk text. this process is better illustrated with this screenshot (I don't copy and paste the console text because that way the junk character in it might confuse email clinets). gopher://sdf.lonestar.org/I/users/weiwu/mount_chinese_smbshare.png In the screenshot, I do have mounted the share with -E parameter which should convert GB18030 folder names to UTF-8 but actually no convertion is done (see the ls | iconv which shows what it should be looking like if the convertion is done) Actually I have never succesfully done charset convertion with mount_smbfs, what did I do wrong? -E parameter which should convert GB18030 folder names to UTF-8 but actually no convertion is done (see the ls | iconv which shows what it should be looking like if the convertion is done) Actually I have never succesfully done charset convertion with mount_smbfs, what did I do wrong? From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 10:07:37 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9865716A417 for ; Tue, 28 Nov 2006 10:07:37 +0000 (UTC) (envelope-from weiwu@sdf.lonestar.org) Received: from bossdog.realss.com (bossdog.realss.com [211.157.108.128]) by mx1.FreeBSD.org (Postfix) with ESMTP id D82D043E6B for ; Tue, 28 Nov 2006 10:05:45 +0000 (GMT) (envelope-from weiwu@sdf.lonestar.org) Received: from localhost (unknown [127.0.0.1]) by bossdog.realss.com (Postfix) with ESMTP id 0EB2D1C00A0 for ; Tue, 28 Nov 2006 18:05:46 +0800 (CST) Received: from bossdog.realss.com ([127.0.0.1]) by localhost (bossdog.realss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32389-02 for ; Tue, 28 Nov 2006 18:05:45 +0800 (CST) Received: from [192.168.0.17] (sappho.realss.com [218.85.101.243]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by bossdog.realss.com (Postfix) with ESMTP id 72BC71C0093 for ; Tue, 28 Nov 2006 18:05:44 +0800 (CST) From: =?UTF-8?Q?=E5=BC=A0=E9=9F=A1=E6=AD=A6?= To: freebsd-net@freebsd.org Content-Type: text/plain Date: Tue, 28 Nov 2006 18:05:13 +0800 Message-Id: <1164708313.11743.19.camel@joe.realss> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at bossdog.realss.com Subject: wired PPP problem: ppp connection fail, slow down on FreeBSD but fine on Windows 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, 28 Nov 2006 10:07:37 -0000 The FreeBSD gateway machine has one end connect to ADSL modem through pppoe, the other connects to LAN and act as NAT gateway. PPP connection can be established correctly, then after 5 hour or 10 hour, connection speed become very slow or (more frequently) simply cannot connect (a.k.a. browsing web pages time out). Then, ping from LAN client hosts to external network would simply timeout, ping from NAT gateway to 10.10.10.5 (that's the other end of the PPPOE connection) keep getting this message: ping: send to: No buffer space available At the same time, top(1) shows 80~95 CPU resource is taken by 'interrupt'. stop ppp by "/etc/rc.d/ppp stop" and re-start this process usually will not get re-connected (/var/log/ppp.log is like 'carrier -> stop -> redial', that is we don't reach the step of login). Reboot computer usually also do not help. After fighting the problem for an hour or so, suddenly it (pppoe) become working again. Sometimes, connection become very slow, ping from NAT gateway to 10.10.10.5 gets half of packets dropped (lost) and the other half has a ping delay of 500ms (usually it should be less then 50 ms). This problem is no longer observed after we installed Windows 2000 Professional on the gateway as second OS and use it for PPP/NAT. This problem has troubled me for two weeks and really exhausted me. In the begining we had a Linux network gateway machine, a Pentium-MMX box that has been running fine for almost a year. At 3 weeks ago it become very unstable, have similar behaviour as described above (only that a process called "events" take up 80~95 CPU resource rather then "interrupt"). We replaced it with a Pentium II (300MHz) machine with FreeBSD and got the behaviour described above. When we replace OS from Linux to FreeBSD, we actually replaced the gateway with another machine (including its network cards), so I think chance of network card problem / gateway hardware problem should be very small. Can you provide some suggestions on how to further find out and fix this problem? From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 10:12:55 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8D91216A49E for ; Tue, 28 Nov 2006 10:12:55 +0000 (UTC) (envelope-from weiwu@sdf.lonestar.org) Received: from bossdog.realss.com (bossdog.realss.com [211.157.108.128]) by mx1.FreeBSD.org (Postfix) with ESMTP id 369F043DD4 for ; Tue, 28 Nov 2006 10:10:08 +0000 (GMT) (envelope-from weiwu@sdf.lonestar.org) Received: from localhost (unknown [127.0.0.1]) by bossdog.realss.com (Postfix) with ESMTP id E4DF41C00A0 for ; Tue, 28 Nov 2006 18:10:19 +0800 (CST) Received: from bossdog.realss.com ([127.0.0.1]) by localhost (bossdog.realss.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28084-15 for ; Tue, 28 Nov 2006 18:10:19 +0800 (CST) Received: from [192.168.0.17] (sappho.realss.com [218.85.101.243]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by bossdog.realss.com (Postfix) with ESMTP id BDD561C0093 for ; Tue, 28 Nov 2006 18:10:18 +0800 (CST) From: =?UTF-8?Q?=E5=BC=A0=E9=9F=A1=E6=AD=A6?= To: freebsd-net@freebsd.org In-Reply-To: <1164708313.11743.19.camel@joe.realss> References: <1164708313.11743.19.camel@joe.realss> Content-Type: text/plain; charset=utf-8 Date: Tue, 28 Nov 2006 18:09:48 +0800 Message-Id: <1164708588.11743.23.camel@joe.realss> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at bossdog.realss.com Subject: Re: wired PPP problem: ppp connection fail, slow down on FreeBSD but fine on Windows 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, 28 Nov 2006 10:12:55 -0000 在 2006-11-28二的 18:05 +0800,张韡武写道: > The FreeBSD gateway machine has one end connect to ADSL modem through > pppoe, the other connects to LAN and act as NAT gateway. > > PPP connection can be established correctly, then after 5 hour or 10 > hour, connection speed become very slow or (more frequently) simply > cannot connect (a.k.a. browsing web pages time out). Then, ping from LAN > client hosts to external network would simply timeout, ping from NAT > gateway to 10.10.10.5 (that's the other end of the PPPOE connection) > keep getting this message: > ping: send to: No buffer space available > At the same time, top(1) shows 80~95 CPU resource is taken by > 'interrupt'. > > stop ppp by "/etc/rc.d/ppp stop" and re-start this process usually will > not get re-connected (/var/log/ppp.log is like 'carrier -> stop -> > redial', that is we don't reach the step of login). Reboot computer > usually also do not help. After fighting the problem for an hour or so, > suddenly it (pppoe) become working again. I forgot to mention in such case (connection is slow but not completely broken), top(1) often shows aroudn 20% to 30% CPU resource is taken by 'interrupt', 20% to 30% by ppp and around 50% free. Such situation won't last long before connection become completely useless. From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 13:27:32 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D72E616A492 for ; Tue, 28 Nov 2006 13:27:32 +0000 (UTC) (envelope-from pav@FreeBSD.org) Received: from nat-application.b1.lan.prg.vol.cz (nat-application.b1.lan.prg.vol.cz [195.122.204.152]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE54A43CA6 for ; Tue, 28 Nov 2006 13:27:16 +0000 (GMT) (envelope-from pav@FreeBSD.org) Received: from pav.hide.vol.cz (localhost [127.0.0.1]) by nat-application.b1.lan.prg.vol.cz (8.13.8/8.13.8) with ESMTP id kASDRBp6054481 for ; Tue, 28 Nov 2006 14:27:11 +0100 (CET) (envelope-from pav@FreeBSD.org) Received: (from pav@localhost) by pav.hide.vol.cz (8.13.8/8.13.8/Submit) id kASDRBdr054480 for freebsd-net@FreeBSD.org; Tue, 28 Nov 2006 14:27:11 +0100 (CET) (envelope-from pav@FreeBSD.org) X-Authentication-Warning: pav.hide.vol.cz: pav set sender to pav@FreeBSD.org using -f From: Pav Lucistnik To: freebsd-net@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-HSS59GCfXRccLZImgW8J" Date: Tue, 28 Nov 2006 14:27:10 +0100 Message-Id: <1164720430.26541.24.camel@pav.hide.vol.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.8.2.1 FreeBSD GNOME Team Port Cc: Subject: panic in tcp_discardcb() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pav@FreeBSD.org List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 13:27:32 -0000 --=-HSS59GCfXRccLZImgW8J Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hey, Can anyone make anything out of this panic? It's SMP 6.1-RELEASE on i386. (Yes I know 6.1 is ooold, but it's the latest available release currently, so, it's what we have in production.) kernel trap 12 with interrupts disabled Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address =3D 0x0 fault code =3D supervisor write, page not present instruction pointer =3D 0x20:0xc056b627 stack pointer =3D 0x28:0xd440ab24 frame pointer =3D 0x28:0xd440ab30 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, def32 1, gran 1 processor eflags =3D resume, IOPL =3D 0 current process =3D 13 (swi1: net) trap number =3D 12 panic: page fault cpuid =3D 0 Uptime: 73d21h24m3s (kgdb) bt #0 doadump () at pcpu.h:165 #1 0xc055e50d in boot (howto=3D260) at /usr/src/sys/kern/kern_shutdown.c:4= 02 #2 0xc055e835 in panic (fmt=3D0xc0706511 "%s") at /usr/src/sys/kern/kern_s= hutdown.c:558 #3 0xc06dee30 in trap_fatal (frame=3D0xd440aae4, eva=3D0) at /usr/src/sys/= i386/i386/trap.c:836 #4 0xc06de5e6 in trap (frame=3D {tf_fs =3D -1067909112, tf_es =3D -996671448, tf_ds =3D -734003160, t= f_edi =3D 0, tf_esi =3D -998460540, tf_ebp =3D -733959376, tf_isp =3D -7339= 59408, tf_ebx =3D -1020302720, tf_edx =3D 0, tf_ecx =3D 0, tf_eax =3D 0, tf= _trapno =3D 12, tf_err =3D 2, tf_eip =3D -1068059097, tf_cs =3D 32, tf_efla= gs =3D 65538, tf_esp =3D 0, tf_ss =3D -998460976}) at /usr/src/sys/i386/i38= 6/trap.c:269 #5 0xc06cc0ca in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #6 0xc056b627 in _callout_stop_safe (c=3D0xc47cb384, safe=3D0) at /usr/src= /sys/kern/kern_timeout.c:553 #7 0xc05f3723 in tcp_discardcb (tp=3D0xc47cb1d0) at /usr/src/sys/netinet/t= cp_subr.c:689 #8 0xc05f4e9d in tcp_twstart (tp=3D0xc47cb1d0) at /usr/src/sys/netinet/tcp= _subr.c:1708 #9 0xc05f0724 in tcp_input (m=3D0xc4e3e600, off0=3D20) at /usr/src/sys/net= inet/tcp_input.c:2432 #10 0xc05e770d in ip_input (m=3D0xc4e3e600) at /usr/src/sys/netinet/ip_inpu= t.c:786 #11 0xc05d6717 in netisr_processqueue (ni=3D0xc07842f8) at /usr/src/sys/net= /netisr.c:236 #12 0xc05d6916 in swi_net (dummy=3D0x0) at /usr/src/sys/net/netisr.c:349 #13 0xc05492d5 in ithread_execute_handlers (p=3D0xc32f5624, ie=3D0xc3337b80= ) at /usr/src/sys/kern/kern_intr.c:684 #14 0xc05493f1 in ithread_loop (arg=3D0xc32bb8a0) at /usr/src/sys/kern/kern= _intr.c:767 #15 0xc0548071 in fork_exit (callout=3D0xc054939c , arg=3D0xc= 32bb8a0, frame=3D0xd440ad38) at /usr/src/sys/kern/kern_fork.c:805 #16 0xc06cc12c in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:= 208 (kgdb) up 7 #7 0xc05f3723 in tcp_discardcb (tp=3D0xc47cb1d0) at /usr/src/sys/netinet/t= cp_subr.c:689 689 callout_stop(tp->tt_delack); (kgdb) print *tp $2 =3D {t_segq =3D {lh_first =3D 0x0}, t_segqlen =3D 0, t_dupacks =3D 0, tt= _rexmt =3D 0xc47cb314, tt_persist =3D 0xc47cb330, tt_keep =3D 0xc47cb34c, t= t_2msl =3D 0xc47cb368, tt_delack =3D 0xc47cb384, t_inpcb =3D 0xc53e59d8, t_state =3D 9, t_flags =3D 533, snd_una =3D 1473244779, snd_max =3D 14732= 44779, snd_nxt =3D 1473244779, snd_up =3D 1473239551, snd_wl1 =3D 207142639= 8, snd_wl2 =3D 1473244779, iss =3D 1473217650, irs =3D 2071426082, rcv_nxt =3D 2071426399, rcv_adv =3D 2071491933, rcv_wnd =3D 65700, rcv_up= =3D 2071426398, snd_wnd =3D 16673, snd_cwnd =3D 6428, snd_bwnd =3D 3311178= , snd_ssthresh =3D 2920, snd_bandwidth =3D 1517898, snd_recover =3D 1473244= 779, t_maxopd =3D 1460, t_rcvtime =3D 2089746807, t_starttime =3D 2089699567, = t_rtttime =3D 0, t_rtseq =3D 1473239551, t_bw_rtttime =3D 2089746807, t_bw_= rtseq =3D 1473244779, t_rxtcur =3D 4300, t_maxseg =3D 1460, t_srtt =3D 6564= 5, t_rttvar =3D 8198, t_rxtshift =3D 0, t_rttmin =3D 3, t_rttbest =3D 73843,= t_rttupdated =3D 4, max_sndwnd =3D 17520, t_softerror =3D 0, t_oobflags = =3D 0 '\0', t_iobc =3D 0 '\0', snd_scale =3D 0 '\0', rcv_scale =3D 0 '\0', request_r_scale =3D 0 '\0', requested_s_scale =3D 0 '\0', ts_recent =3D 0= , ts_recent_age =3D 0, last_ack_sent =3D 2071426398, snd_cwnd_prev =3D 5840= , snd_ssthresh_prev =3D 1073725440, snd_recover_prev =3D 1473217651, t_badrxtwin =3D 2089702850, snd_limited =3D 2 '\002', rcv_second =3D 0, r= cv_pps =3D 0, rcv_byps =3D 0, sack_enable =3D 1, snd_numholes =3D 0, snd_ho= les =3D {tqh_first =3D 0x0, tqh_last =3D 0xc47cb2c4}, snd_fack =3D 14732307= 91, rcv_numsacks =3D 0, sackblks =3D {{start =3D 0, end =3D 0}, {start =3D 0,= end =3D 0}, {start =3D 0, end =3D 0}, {start =3D 0, end =3D 0}, {start =3D= 0, end =3D 0}, {start =3D 0, end =3D 0}}, sack_newdata =3D 1473230791, sac= khint =3D { nexthole =3D 0x0, sack_bytes_rexmit =3D 0}, t_rttlow =3D 1827} (kgdb) print *tp->tt_delack $4 =3D {c_links =3D {sle =3D {sle_next =3D 0x0}, tqe =3D {tqe_next =3D 0x0,= tqe_prev =3D 0x0}}, c_time =3D -998460220, c_arg =3D 0xc47cb4e0, c_func = =3D 0xc47cb4fc, c_mtx =3D 0xc47cb518, c_flags =3D -998460112} (kgdb) print *tp->tt_keep $5 =3D {c_links =3D {sle =3D {sle_next =3D 0x0}, tqe =3D {tqe_next =3D 0x0,= tqe_prev =3D 0xcd7511c8}}, c_time =3D 2096946807, c_arg =3D 0xc47cb1d0, c_= func =3D 0xc05f7650 , c_mtx =3D 0x0, c_flags =3D 16} (kgdb) print *tp->tt_2msl $6 =3D {c_links =3D {sle =3D {sle_next =3D 0x0}, tqe =3D {tqe_next =3D 0x0,= tqe_prev =3D 0xcd7567c8}}, c_time =3D 2090346807, c_arg =3D 0xc47cb1d0, c_= func =3D 0xc05f72f8 , c_mtx =3D 0x0, c_flags =3D 0} (kgdb) print *tp->tt_persist $7 =3D {c_links =3D {sle =3D {sle_next =3D 0x0}, tqe =3D {tqe_next =3D 0x0,= tqe_prev =3D 0x0}}, c_time =3D 0, c_arg =3D 0x0, c_func =3D 0, c_mtx =3D 0= x0, c_flags =3D 16} (kgdb) print *tp->tt_rexmt $8 =3D {c_links =3D {sle =3D {sle_next =3D 0x0}, tqe =3D {tqe_next =3D 0x0,= tqe_prev =3D 0xcd74af40}}, c_time =3D 2089751078, c_arg =3D 0xc47cb1d0, c_= func =3D 0xc05f7b8c , c_mtx =3D 0x0, c_flags =3D 16} This looks to me as tt_delack is corrupted somehow...? --=20 Pav Lucistnik I want to earn the right to be obnoxious before I'm too bitter to really enjoy it. -- Able --=-HSS59GCfXRccLZImgW8J Content-Type: application/pgp-signature; name=signature.asc Content-Description: Toto je =?UTF-8?Q?digit=C3=A1ln=C4=9B?= =?ISO-8859-1?Q?_podepsan=E1?= =?UTF-8?Q?_=C4=8D=C3=A1st?= =?ISO-8859-1?Q?_zpr=E1vy?= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFbDkuntdYP8FOsoIRAmCgAKCom0NkJ40iFJAGm8Veuqkjh3dr0ACfXj0t s1JROWdaWL9/XBrH62PDs4U= =EqRt -----END PGP SIGNATURE----- --=-HSS59GCfXRccLZImgW8J-- From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 15:05:56 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5C2BE16A40F for ; Tue, 28 Nov 2006 15:05:56 +0000 (UTC) (envelope-from chrcoluk@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id E283043CA1 for ; Tue, 28 Nov 2006 15:05:50 +0000 (GMT) (envelope-from chrcoluk@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so1290074pyh for ; Tue, 28 Nov 2006 07:05:53 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CBs46Jf5OsDqX1hGpfubRXmnFEl64Q15Zu7aVropGOEyHEDVhQiSabfs0DvbPAt56ReqyqxFjpPu1x9HVV4i54S2orhAwK0cpFpTP89OrDazzUO/Wwu8LDz7g2wOn53D9Tkj0G7LwGAZJjFo33tHvQ9UyJcYzYe0qVSHxwvyDes= Received: by 10.35.79.3 with SMTP id g3mr1786989pyl.1164726353060; Tue, 28 Nov 2006 07:05:53 -0800 (PST) Received: by 10.35.17.16 with HTTP; Tue, 28 Nov 2006 07:05:52 -0800 (PST) Message-ID: <3aaaa3a0611280705i4042e0a7k1d01c0857d0c7af@mail.gmail.com> Date: Tue, 28 Nov 2006 15:05:52 +0000 From: Chris To: "Andre Oppermann" In-Reply-To: <455E068D.1030000@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <455CB311.8040301@freebsd.org> <455E0244.1070903@thedarkside.nl> <455E068D.1030000@freebsd.org> Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, Pieter de Boer Subject: Re: Automatic TCP send socker buffer sizing 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, 28 Nov 2006 15:05:56 -0000 On 17/11/06, Andre Oppermann wrote: > Pieter de Boer wrote: > > Andre Oppermann wrote: > > > > > >> With automatic TCP send socket buffers we can start with a small buffer > >> and quickly grow it in parallel with the TCP congestion window to match > >> real network conditions. > > > > Are you planning to implement something similar for the receive path? > > Yes, but it's a bit harder. > > -- > Andre > _______________________________________________ > 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" > Is there progress on this yet? still no problems with the current patch :) Chris From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 18:47:41 2006 Return-Path: X-Original-To: freebsd-net@FreeBSD.ORG Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 182EA16A4B3; Tue, 28 Nov 2006 18:47:41 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9457A43CB9; Tue, 28 Nov 2006 18:47:34 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id C17BD192913; Tue, 28 Nov 2006 19:47:35 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id 6331E19290C; Tue, 28 Nov 2006 19:47:35 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id D6BA828505; Tue, 28 Nov 2006 19:47:32 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 6F3DB28503; Tue, 28 Nov 2006 19:47:32 +0100 (CET) Date: Tue, 28 Nov 2006 20:47:32 +0200 From: Vladimir Terziev To: freebsd-net@FreeBSD.ORG Message-Id: <20061128204732.3e8790fd.vlady@gbservices.biz> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org Subject: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Nov 2006 18:47:41 -0000 Hi, i have a machine with Pentium 4-D processor utilizing FreeBSD-6.1-RELEASE-p10/amd64. The machine is running SMP kernel. The machine has 2 on-board Broadcom BCM5721 NICs, which are handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are handeled by the ste(4) driver. Machine is targeted for a gateway/firewall and will handle a big amount of network traffic. It seems the bge(4) driver has severe performance problems (may be especially in my configuration). I tried test scp(1) to a remote machine, using one of the BCM5721 NICs. The average speed which has been reached was 200kBps. Just for comparison, when i tryed the same test scp(1), to the same remote machine, but using one of the D-Link DL10050 NICs, the average speed which has been reached was 10MBps. Could someone point me to a good performance tuning document for bge(4) handeled NICs, under SMP kernel or at all? Thanks in advance! Vladimir From owner-freebsd-net@FreeBSD.ORG Tue Nov 28 19:52:09 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58D6216A494; Tue, 28 Nov 2006 19:52:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4888543E8E; Tue, 28 Nov 2006 19:46:11 +0000 (GMT) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DCD4C1CC0D; Tue, 28 Nov 2006 20:46:00 +0100 (CET) Date: Tue, 28 Nov 2006 20:46:00 +0100 From: Ed Schouten To: FreeBSD Networking Message-ID: <20061128194600.GU16100@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+G6m7pD98ON7Rq3z" Content-Disposition: inline User-Agent: Mutt/1.5.13 (2006-08-11) Cc: FreeBSD Stable Subject: re(4) needs promisc to work properly 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, 28 Nov 2006 19:52:09 -0000 --+G6m7pD98ON7Rq3z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, I'm running FreeBSD 6.2-PRERELEASE on my new desktop. It has the following hardware: - Intel Core 2 Duo 6400 - Asus P5B motherboard - On-board Realtek NIC (8168B/8111B) For some reason, it drops all incoming IPv6 packets. I can only SSH to the machine using IPv6 when I run the following command: $ ifconfig re0 promisc Is this a known issue about these NICs? Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --+G6m7pD98ON7Rq3z Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFbJH452SDGA2eCwURAtCYAJ9dxXaafdWiFP6IiQiLYfDWtb2BLQCeJ7+H lNKX5EZLq+H8GYMiIR2/xfI= =Q+xy -----END PGP SIGNATURE----- --+G6m7pD98ON7Rq3z-- From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 00:17:37 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 351E016A412 for ; Wed, 29 Nov 2006 00:17:37 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3FA2243CA1 for ; Wed, 29 Nov 2006 00:17:30 +0000 (GMT) (envelope-from pyunyh@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so1994702wxc for ; Tue, 28 Nov 2006 16:17:35 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:reply-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=r+9VXPI57+mCbyOd4ByGzpbB1Me007qJnFAIC3FdLD/SrxX0+1QXeezXpeSy1KefQG4FYcLKk9x7LZsg+nv99yNbF6oWtpNsqlgI4s0p3R+/DbimZ/shdiSN9u18I4X0YTgcW6Wd1jxdYJe2DeINWPNMMPGsTR7qnfxfUUsGfxM= Received: by 10.90.84.17 with SMTP id h17mr1551962agb.1164759454782; Tue, 28 Nov 2006 16:17:34 -0800 (PST) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTP id 66sm17532869wra.2006.11.28.16.17.32; Tue, 28 Nov 2006 16:17:34 -0800 (PST) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id kAT0K9dk071767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Nov 2006 09:20:09 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id kAT0K84U071766; Wed, 29 Nov 2006 09:20:08 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Wed, 29 Nov 2006 09:20:08 +0900 From: Pyun YongHyeon To: Ed Schouten Message-ID: <20061129002008.GA71523@cdnetworks.co.kr> References: <20061128194600.GU16100@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061128194600.GU16100@hoeg.nl> User-Agent: Mutt/1.4.2.1i Cc: FreeBSD Stable , FreeBSD Networking Subject: Re: re(4) needs promisc to work properly X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 00:17:37 -0000 On Tue, Nov 28, 2006 at 08:46:00PM +0100, Ed Schouten wrote: > Hello, > > I'm running FreeBSD 6.2-PRERELEASE on my new desktop. It has the > following hardware: > > - Intel Core 2 Duo 6400 > - Asus P5B motherboard > - On-board Realtek NIC (8168B/8111B) > > For some reason, it drops all incoming IPv6 packets. I can only SSH to > the machine using IPv6 when I run the following command: > > $ ifconfig re0 promisc > > Is this a known issue about these NICs? No, I'm not aware of the issue. The issue can happen on a NIC with incorrectly programmed ethernet address. Would you show me dmesg/tcpdump output of your system? Make sure to add -e option to tcpdump(1). > > Yours, > -- > Ed Schouten > WWW: http://g-rave.nl/ -- Regards, Pyun YongHyeon From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 07:10:52 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62EC616ABC6; Wed, 29 Nov 2006 07:10:52 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from mrout3.yahoo.com (mrout3.yahoo.com [216.145.54.173]) by mx1.FreeBSD.org (Postfix) with ESMTP id E63A743CCA; Wed, 29 Nov 2006 07:10:35 +0000 (GMT) (envelope-from gnn@neville-neil.com) Received: from minion.local.neville-neil.com (proxy7.corp.yahoo.com [216.145.48.98]) by mrout3.yahoo.com (8.13.6/8.13.6/y.out) with ESMTP id kAT3MsN0099163; Tue, 28 Nov 2006 19:22:55 -0800 (PST) Date: Wed, 29 Nov 2006 11:30:02 +0900 Message-ID: From: gnn@freebsd.org To: Ed Schouten In-Reply-To: <20061128194600.GU16100@hoeg.nl> References: <20061128194600.GU16100@hoeg.nl> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.0.90 (i386-apple-darwin8.8.1) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: FreeBSD Stable , FreeBSD Networking Subject: Re: re(4) needs promisc to work properly 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, 29 Nov 2006 07:10:52 -0000 At Tue, 28 Nov 2006 20:46:00 +0100, Ed Schouten wrote: > > [1 ] > Hello, > > I'm running FreeBSD 6.2-PRERELEASE on my new desktop. It has the > following hardware: > > - Intel Core 2 Duo 6400 > - Asus P5B motherboard > - On-board Realtek NIC (8168B/8111B) > > For some reason, it drops all incoming IPv6 packets. I can only SSH to > the machine using IPv6 when I run the following command: > > $ ifconfig re0 promisc > > Is this a known issue about these NICs? > Is IPv6 turned on? ipv6_enable="YES" in rc.conf What addresses are you using? It would help to have the output of: ifconfig -a netstat -rn Best, George From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 07:33:39 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0470116A521 for ; Wed, 29 Nov 2006 07:33:39 +0000 (UTC) (envelope-from smw2010@gmail.com) Received: from nz-out-0102.google.com (nz-out-0506.google.com [64.233.162.225]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0522143DE8 for ; Wed, 29 Nov 2006 07:30:45 +0000 (GMT) (envelope-from smw2010@gmail.com) Received: by nz-out-0102.google.com with SMTP id i11so1001369nzh for ; Tue, 28 Nov 2006 23:30:45 -0800 (PST) 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; b=blLU1IXGN2VpTkzhBqu8EeYSQQ+crcLTN5Rtot8JNiDSLSxvzkXxHTSEkVuSbTcFEOT8YMfj7B29iaV0x9N59re+e7a85RcKkfRXo3Sl5AF20SKzTJrykjwprOR0RTwxKddZ+MHwhMwbnObJ0LIL1o4SnYdVNrpGEGI9zxIYoe4= Received: by 10.65.224.11 with SMTP id b11mr2302054qbr.1164775545359; Tue, 28 Nov 2006 20:45:45 -0800 (PST) Received: by 10.64.148.18 with HTTP; Tue, 28 Nov 2006 20:45:45 -0800 (PST) Message-ID: Date: Wed, 29 Nov 2006 15:45:45 +1100 From: "Sam Wun" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: wireless card as access point 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, 29 Nov 2006 07:33:39 -0000 Hi, I recently experienced some connection problem when sharing the wireless connection with my brother at home. If I go online first, my connection goes very fast, but my brother's internet connection will go very slow. I heard that some of the wireless card does not handle multiuser network connection. Is this true? The wireless card I m using in my mini WRAP box is a mini card. Its configuratino is; ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413) ath0: mem 0x80080000-0x8008ffff irq 9 at device 17.0 on pci0 ath0: [GIANT-LOCKED] ath0: Ethernet address: 00:15:6d:50:0e:2a ath0: mac 5.9 phy 4.3 radio 4.6 If this card is not good, which mini wireless card is good to work with FreeBSD as wireless access point? Thanks S From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 13:09:55 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E52A716A416; Wed, 29 Nov 2006 13:09:55 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from sccrmhc13.comcast.net (sccrmhc13.comcast.net [204.127.200.83]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BF9143CAE; Wed, 29 Nov 2006 13:09:53 +0000 (GMT) (envelope-from josh@tcbug.org) Received: from gimpy (c-24-118-173-219.hsd1.mn.comcast.net[24.118.173.219]) by comcast.net (sccrmhc13) with ESMTP id <2006112913095401300lrghse>; Wed, 29 Nov 2006 13:09:54 +0000 From: Josh Paetzel To: freebsd-hackers@freebsd.org Date: Wed, 29 Nov 2006 07:09:33 -0600 User-Agent: KMail/1.9.4 References: <20061128204732.3e8790fd.vlady@gbservices.biz> In-Reply-To: <20061128204732.3e8790fd.vlady@gbservices.biz> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611290709.34059.josh@tcbug.org> Cc: Vladimir Terziev , freebsd-net@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 13:09:56 -0000 On Tuesday 28 November 2006 12:47, Vladimir Terziev wrote: > Hi, > > i have a machine with Pentium 4-D processor utilizing > FreeBSD-6.1-RELEASE-p10/amd64. > > The machine is running SMP kernel. > > The machine has 2 on-board Broadcom BCM5721 NICs, which are > handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are > handeled by the ste(4) driver. Machine is targeted for a > gateway/firewall and will handle a big amount of network traffic. > > It seems the bge(4) driver has severe performance problems (may be > especially in my configuration). I tried test scp(1) to a remote > machine, using one of the BCM5721 NICs. The average speed which has > been reached was 200kBps. > > Just for comparison, when i tryed the same test scp(1), to the > same remote machine, but using one of the D-Link DL10050 NICs, the > average speed which has been reached was 10MBps. > > Could someone point me to a good performance tuning document for > bge(4) handeled NICs, under SMP kernel or at all? > > Thanks in advance! > > Vladimir So you have 2 gig-E and 4 100tx interfaces on the same PCI bus? If so you're going to run into bus saturation long before you're able to max out the throughput on the NICs. Which isn't to say that 200 kBps isn't a problem, but perhaps you are dealing with a bad cable or switchport. -- Thanks, Josh Paetzel From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 16:29:19 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB53616A4C2; Wed, 29 Nov 2006 16:29:19 +0000 (UTC) (envelope-from vladimir.terziev@gbservices.biz) Received: from dog.gbservices.biz (dog-mtl.gbservices.biz [213.226.50.51]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD2FB43CC8; Wed, 29 Nov 2006 16:26:04 +0000 (GMT) (envelope-from vladimir.terziev@gbservices.biz) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 5FBBC19284B; Wed, 29 Nov 2006 17:25:37 +0100 (CET) Received: from fs.gbs.gbdom.com (fs.gbs.gbdom.com [192.168.2.244]) by dog.gbservices.biz (Postfix) with ESMTP id F1E39192847; Wed, 29 Nov 2006 17:25:36 +0100 (CET) Received: from localhost (localhost.gbs.gbdom.com [127.0.0.1]) by localhost (Postfix) with ESMTP id B9AC628517; Wed, 29 Nov 2006 17:25:34 +0100 (CET) Received: from daemon.gbs.gbdom.com (daemon.gbs.gbdom.com [192.168.2.104]) by fs.gbs.gbdom.com (Postfix) with SMTP id 7AE3028505; Wed, 29 Nov 2006 17:25:34 +0100 (CET) Date: Wed, 29 Nov 2006 18:25:34 +0200 From: Vladimir Terziev To: Josh Paetzel Message-Id: <20061129182534.5300947f.vlady@gbservices.biz> In-Reply-To: <200611290709.34059.josh@tcbug.org> References: <20061128204732.3e8790fd.vlady@gbservices.biz> <200611290709.34059.josh@tcbug.org> Organization: GB Services Ltd. X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.6.4; i386-unknown-freebsd5.4) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV GBS-F X-Virus-Scanned: ClamAV GBS-D Cc: freebsd-hackers@freebsd.org, freebsd-net@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2006 16:29:19 -0000 The cable and the switch port, both were one and the same in the test with Broadcom NIC and in the test with D-Link NIC. So, the reason is not in them for sure. I didn't mention in my initial e-mail, that since the swtich is 100Mbps, the Broadcom NIC was forced to work on 100mbit, full-duplex. For some reason, when using autodect, the Broadcom NIC negotiates 100mbit, half-duplex. Vladimir On Wed, 29 Nov 2006 07:09:33 -0600 Josh Paetzel wrote: > On Tuesday 28 November 2006 12:47, Vladimir Terziev wrote: > > Hi, > > > > i have a machine with Pentium 4-D processor utilizing > > FreeBSD-6.1-RELEASE-p10/amd64. > > > > The machine is running SMP kernel. > > > > The machine has 2 on-board Broadcom BCM5721 NICs, which are > > handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are > > handeled by the ste(4) driver. Machine is targeted for a > > gateway/firewall and will handle a big amount of network traffic. > > > > It seems the bge(4) driver has severe performance problems (may be > > especially in my configuration). I tried test scp(1) to a remote > > machine, using one of the BCM5721 NICs. The average speed which has > > been reached was 200kBps. > > > > Just for comparison, when i tryed the same test scp(1), to the > > same remote machine, but using one of the D-Link DL10050 NICs, the > > average speed which has been reached was 10MBps. > > > > Could someone point me to a good performance tuning document for > > bge(4) handeled NICs, under SMP kernel or at all? > > > > Thanks in advance! > > > > Vladimir > > So you have 2 gig-E and 4 100tx interfaces on the same PCI bus? If so > you're going to run into bus saturation long before you're able to > max out the throughput on the NICs. > > Which isn't to say that 200 kBps isn't a problem, but perhaps you are > dealing with a bad cable or switchport. > > -- > Thanks, > > Josh Paetzel From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 20:53:04 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A059B16A501 for ; Wed, 29 Nov 2006 20:53:04 +0000 (UTC) (envelope-from tarkhil@webmail.sub.ru) Received: from mail.sub.ru (webmail.sub.ru [213.247.139.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id C539F43CB5 for ; Wed, 29 Nov 2006 20:52:50 +0000 (GMT) (envelope-from tarkhil@webmail.sub.ru) Received: (qmail 17747 invoked by uid 0); 29 Nov 2006 23:52:52 +0300 Received: from tarkhil.rostokino.net (HELO ?85.192.19.9?) (tarkhil%sub.ru@85.192.19.9) by techno.sub.ru with SMTP; 29 Nov 2006 20:52:52 -0000 Message-ID: <456DF2DF.1070702@webmail.sub.ru> Date: Wed, 29 Nov 2006 23:51:43 +0300 From: Alex Povolotsky User-Agent: Thunderbird 1.5 (X11/20060310) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: pipe dropping lots of packets 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, 29 Nov 2006 20:53:04 -0000 Hello! I'm trying to set up FreeBSD-based router, and got troubles with bandwidth limiting. My queues drops lots of packets. [23:38] gw:~ # ipfw pipe 200 config bw 30mbit/s queue 100 [23:42] gw:~ # ipfw add 600 pipe 200 ip from any to any out via vlan333 00600 pipe 200 ip from any to any out via vlan333 seems to be easy. now [23:43] gw:~ # ipfw zero Accounting cleared. make sure we'll catch packets out of pipe [23:43] gw:~ # sysctl net.inet.ip.fw.one_pass net.inet.ip.fw.one_pass: 0 and, waiting a bit [23:43] gw:~ # ipfw show | grep vlan333 00600 2010 140730 pipe 200 ip from any to any out via vlan333 00700 0 0 allow ip from any to table(1) via vlan333 00710 840 142335 allow ip from table(1) to any via vlan333 whoops! No packets left pipe part of ipfw pipe list 00200: 30.000 bit/s 0 ms 100 sl. 1 queues (1 buckets) droptail mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000 BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp 0 tcp 172.23.114.136/6220 217.70.17.154/3931 7292 683466 100 12092 7048 As far as I understand, pipe dropped most of tcp packets, didn't it? Of course, people complaints of network "not working". Eventually, some packets gets out of queue, but with 30 mbit/s pipe on 100 mbit link I'd expect to drop 2/3 packets at most, not 99 of 100 00600 1012 64217 pipe 200 ip from any to any out via vlan333 00700 14 560 allow ip from any to any out via vlan333 What could I do wrong? System is fairly unloaded. External card is Intel PRO 100/1000; last pid: 11209; load averages: 0.52, 0.36, 0.34 up 5+19:37:14 23:52:17 70 processes: 2 running, 68 sleeping CPU states: 1.3% user, 0.0% nice, 6.4% system, 14.1% interrupt, 78.2% idle Mem: 87M Active, 673M Inact, 195M Wired, 33M Cache, 111M Buf, 8324K Free Swap: 4096M Total, 4096M Free top shows quite little load on system. Alex. (FreeBSD 6.1-RELEASE) From owner-freebsd-net@FreeBSD.ORG Wed Nov 29 23:23:31 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 618) id 8E55016A415; Wed, 29 Nov 2006 23:23:31 +0000 (UTC) In-Reply-To: <20061129002008.GA71523@cdnetworks.co.kr> from Pyun YongHyeon at "Nov 29, 2006 09:20:08 am" To: pyunyh@gmail.com Date: Wed, 29 Nov 2006 23:23:31 +0000 (GMT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20061129232331.8E55016A415@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Cc: stable@freebsd.org, ed@fxq.nl, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 29 Nov 2006 23:23:31 -0000 > On Tue, Nov 28, 2006 at 08:46:00PM +0100, Ed Schouten wrote: > > Hello, > > > > I'm running FreeBSD 6.2-PRERELEASE on my new desktop. It has the > > following hardware: > > > > - Intel Core 2 Duo 6400 > > - Asus P5B motherboard > > - On-board Realtek NIC (8168B/8111B) > > > > For some reason, it drops all incoming IPv6 packets. I can only SSH to > > the machine using IPv6 when I run the following command: > > > > $ ifconfig re0 promisc > > > > Is this a known issue about these NICs? > > No, I'm not aware of the issue. > > The issue can happen on a NIC with incorrectly programmed ethernet > address. Would you show me dmesg/tcpdump output of your system? > Make sure to add -e option to tcpdump(1). It's more likely a problem with the multicast filter programming. IPv6 is all about the multicasting (neighbord discovery depends on it to work correctly). I can't explain why it's not working though. I've tested the sample 8168B/8111B cards that RealTek sent me, and I didn't have any multicast problems with them. -Bill > > > > Yours, > > -- > > Ed Schouten > > WWW: http://g-rave.nl/ > -- > Regards, > Pyun YongHyeon > From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 10:20:17 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D80F16A403 for ; Thu, 30 Nov 2006 10:20:17 +0000 (UTC) (envelope-from tobias@netconsultoria.com.br) Received: from srv1.netconsultoria.com.br (srv1.netconsultoria.com.br [200.230.201.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF38F43CA2 for ; Thu, 30 Nov 2006 10:20:07 +0000 (GMT) (envelope-from tobias@netconsultoria.com.br) Received: from [172.16.16.100] (mailgw.netconsultoria.com.br [200.230.201.249]) (authenticated bits=0) by srv1.netconsultoria.com.br (8.13.8/8.13.3) with ESMTP id kAUAK6SH073928; Thu, 30 Nov 2006 08:20:09 -0200 (BRST) (envelope-from tobias@netconsultoria.com.br) Message-ID: <456EB055.7030603@netconsultoria.com.br> Date: Thu, 30 Nov 2006 08:20:05 -0200 From: "Tobias P. Santos" User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: Alex Povolotsky References: <456DF2DF.1070702@webmail.sub.ru> In-Reply-To: <456DF2DF.1070702@webmail.sub.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.6/2263/Thu Nov 30 04:51:08 2006 on srv1.netconsultoria.com.br X-Virus-Status: Clean Cc: freebsd-net@freebsd.org Subject: Re: pipe dropping lots of packets 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, 30 Nov 2006 10:20:17 -0000 Hello! Alex Povolotsky wrote: > Hello! > > I'm trying to set up FreeBSD-based router, and got troubles with > bandwidth limiting. My queues drops lots of packets. > > [23:38] gw:~ # ipfw pipe 200 config bw 30mbit/s queue 100 You should use 30Mbit/s (with capital M). > [23:42] gw:~ # ipfw add 600 pipe 200 ip from any to any out via vlan333 > 00600 pipe 200 ip from any to any out via vlan333 > > seems to be easy. now > > [23:43] gw:~ # ipfw zero > Accounting cleared. > > make sure we'll catch packets out of pipe > > [23:43] gw:~ # sysctl net.inet.ip.fw.one_pass > net.inet.ip.fw.one_pass: 0 > > and, waiting a bit > > [23:43] gw:~ # ipfw show | grep vlan333 > 00600 2010 140730 pipe 200 ip from any to any out via vlan333 > 00700 0 0 allow ip from any to table(1) via vlan333 > 00710 840 142335 allow ip from table(1) to any via vlan333 > > whoops! No packets left pipe > > part of ipfw pipe list > > 00200: 30.000 bit/s 0 ms 100 sl. 1 queues (1 buckets) droptail ^^^^^^^^^^^^ See, 30 bit/s will drop a lot of packets! ;) Regards, Tobias. From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 15:42:50 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C898216A4A0 for ; Thu, 30 Nov 2006 15:42:50 +0000 (UTC) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange22.EDU.epsb.ca (exchange22.epsb.ca [198.161.119.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8B0A643CF4 for ; Thu, 30 Nov 2006 15:42:02 +0000 (GMT) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange21.EDU.epsb.ca ([10.0.5.118]) by Exchange22.EDU.epsb.ca with Microsoft SMTPSVC(6.0.3790.1830); Thu, 30 Nov 2006 08:42:03 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 30 Nov 2006 08:42:02 -0700 Message-ID: <04C71268DFDAA8499EC1A248A44B6A2B0855B143@Exchange21.EDU.epsb.ca> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Broadcom (bce) support and POLLING Thread-Index: AccUlhTApjRb/6vGQ2+tHsgJiY19Ug== From: "Kirk Davis" To: X-OriginalArrivalTime: 30 Nov 2006 15:42:03.0253 (UTC) FILETIME=[14F3F250:01C71496] Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Broadcom (bce) support and POLLING 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, 30 Nov 2006 15:42:51 -0000 Hi, We have just upgraded to a Dell 2950 for our main BGP router. With the constant rise in traffic through the box, I have started to notice some dropped packets so I figured I would take a look at putting the interfaces into polling more to squeeze a little more packets through them. I have added the DEVICE_POLLING and HZ=3D1000 to the kernel. I turned on polling for the bce interfaces and they pass traffic at low volumes (like ping tests). If I put my fluke traffic generators on either side of the box and try to ramp it up to even 100Mb (they are Gig links) then the interfaces will stop responding. Turning off polling will get them to respond again. I know that the bce support in still quite new. Has anyone else testing with polling and the bce interfaces? Is there any more information that I can get for the developers to help track this down. The system is not in production right now so I can use it for testing. As another note... I added some Intel (em) cards into the box and tested with them. Polling worked great on them but I was only able to get about 200k packets per second before it starts dropping packets. Is this about what I should expect? [root@ ~]# uname -a FreeBSD 6.2-RC1 FreeBSD 6.2-RC1 #2: Tue Nov 28 18:10:56 MST 2006 root@:/usr/obj/usr/src/sys/INET-GW i386 ---- Kirk From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 16:03:20 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7806B16A4A0 for ; Thu, 30 Nov 2006 16:03:20 +0000 (UTC) (envelope-from davidch@broadcom.com) Received: from mms1.broadcom.com (mms1.broadcom.com [216.31.210.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id DADFD43EFF for ; Thu, 30 Nov 2006 15:58:13 +0000 (GMT) (envelope-from davidch@broadcom.com) Received: from 10.10.64.154 by mms1.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.3.0)); Thu, 30 Nov 2006 07:57:19 -0800 X-Server-Uuid: D7CB97D3-6392-476F-BE46-AB3D6F515C9A Received: by mail-irva-10.broadcom.com (Postfix, from userid 47) id 9FEA12AF; Thu, 30 Nov 2006 07:57:19 -0800 (PST) Received: from mail-irva-8.broadcom.com (mail-irva-8 [10.10.64.221]) by mail-irva-10.broadcom.com (Postfix) with ESMTP id 686D22AE; Thu, 30 Nov 2006 07:57:19 -0800 (PST) Received: from mail-irva-12.broadcom.com (mail-irva-12.broadcom.com [10.10.64.146]) by mail-irva-8.broadcom.com (MOS 3.7.5a-GA) with ESMTP id ENZ45852; Thu, 30 Nov 2006 07:57:12 -0800 (PST) Received: from NT-IRVA-0750.brcm.ad.broadcom.com (nt-irva-0750 [10.8.194.64]) by mail-irva-12.broadcom.com (Postfix) with ESMTP id A31DB69CA3; Thu, 30 Nov 2006 07:57:12 -0800 (PST) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 30 Nov 2006 07:57:11 -0800 Message-ID: <09BFF2FA5EAB4A45B6655E151BBDD90302836BEB@NT-IRVA-0750.brcm.ad.broadcom.com> In-Reply-To: <04C71268DFDAA8499EC1A248A44B6A2B0855B143@Exchange21.EDU.epsb.ca> Thread-Topic: Broadcom (bce) support and POLLING Thread-Index: AccUlhTApjRb/6vGQ2+tHsgJiY19UgAAge4A From: "David Christensen" To: "Kirk Davis" , freebsd-net@freebsd.org X-WSS-ID: 697020D538014021605-01-01 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: Subject: RE: Broadcom (bce) support and POLLING 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, 30 Nov 2006 16:03:20 -0000 Polling is not currently supported in the bce driver. Dave=20 > Hi, > We have just upgraded to a Dell 2950 for our main BGP router. > With the constant rise in traffic through the box, I have started to > notice some dropped packets so I figured I would take a look=20 > at putting > the interfaces into polling more to squeeze a little more packets > through them. >=20 > I have added the DEVICE_POLLING and HZ=3D1000 to the kernel. I > turned on polling for the bce interfaces and they pass traffic at low > volumes (like ping tests). If I put my fluke traffic generators on > either side of the box and try to ramp it up to even 100Mb=20 > (they are Gig > links) then the interfaces will stop responding. Turning off polling > will get them to respond again. >=20 > I know that the bce support in still quite new. Has anyone else > testing with polling and the bce interfaces? Is there any more > information that I can get for the developers to help track this down. > The system is not in production right now so I can use it for testing. >=20 > As another note... I added some Intel (em) cards into the box > and tested with them. Polling worked great on them but I was=20 > only able > to get about 200k packets per second before it starts=20 > dropping packets. > Is this about what I should expect? >=20 > [root@ ~]# uname -a > FreeBSD 6.2-RC1 FreeBSD 6.2-RC1 #2: Tue Nov 28 18:10:56 MST 2006 > root@:/usr/obj/usr/src/sys/INET-GW i386 >=20 > ---- Kirk >=20 >=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 >=20 From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 16:26:48 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 52E2516A56B for ; Thu, 30 Nov 2006 16:26:48 +0000 (UTC) (envelope-from tarkhil@webmail.sub.ru) Received: from mail.sub.ru (webmail.sub.ru [213.247.139.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19B7E43D8C for ; Thu, 30 Nov 2006 16:15:24 +0000 (GMT) (envelope-from tarkhil@webmail.sub.ru) Received: (qmail 1224 invoked by uid 0); 30 Nov 2006 16:15:14 -0000 Received: from webmail.sub.ru (HELO localhost) (213.247.139.22) by techno.sub.ru with SMTP; 30 Nov 2006 16:15:14 -0000 Received: from unknown ([213.247.139.22]) by localhost (webmail.sub.ru [213.247.139.22]) (amavisd-new, port 10024) with SMTP id 92929-10; Thu, 30 Nov 2006 19:15:02 +0300 (MSK) Received: from unknown (HELO ?192.168.0.239?) (tarkhil%sub.ru@213.152.142.74) by techno.sub.ru with SMTP; 30 Nov 2006 16:15:01 -0000 Message-ID: <456F0382.70409@webmail.sub.ru> Date: Thu, 30 Nov 2006 19:14:58 +0300 From: Alex Povolotsky User-Agent: Thunderbird 1.5.0.8 (X11/20061128) MIME-Version: 1.0 To: "Tobias P. Santos" References: <456DF2DF.1070702@webmail.sub.ru> <456EB055.7030603@netconsultoria.com.br> In-Reply-To: <456EB055.7030603@netconsultoria.com.br> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mail.sub.ru Cc: freebsd-net@freebsd.org Subject: Re: pipe dropping lots of packets 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, 30 Nov 2006 16:26:48 -0000 Tobias P. Santos wrote: > Hello! > > > Alex Povolotsky wrote: >> Hello! >> >> I'm trying to set up FreeBSD-based router, and got troubles with >> bandwidth limiting. My queues drops lots of packets. >> >> [23:38] gw:~ # ipfw pipe 200 config bw 30mbit/s queue 100 > > You should use 30Mbit/s (with capital M). > > >> [23:42] gw:~ # ipfw add 600 pipe 200 ip from any to any out via vlan333 >> 00600 pipe 200 ip from any to any out via vlan333 >> >> seems to be easy. now >> >> [23:43] gw:~ # ipfw zero >> Accounting cleared. >> >> make sure we'll catch packets out of pipe >> >> [23:43] gw:~ # sysctl net.inet.ip.fw.one_pass >> net.inet.ip.fw.one_pass: 0 >> >> and, waiting a bit >> >> [23:43] gw:~ # ipfw show | grep vlan333 >> 00600 2010 140730 pipe 200 ip from any to any out via vlan333 >> 00700 0 0 allow ip from any to table(1) via vlan333 >> 00710 840 142335 allow ip from table(1) to any via vlan333 >> >> whoops! No packets left pipe >> >> part of ipfw pipe list >> >> 00200: 30.000 bit/s 0 ms 100 sl. 1 queues (1 buckets) droptail > ^^^^^^^^^^^^ > > See, 30 bit/s will drop a lot of packets! ;) Whooops!!! Thanks. Alex. From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 16:54:44 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E3EAA16A648 for ; Thu, 30 Nov 2006 16:54:44 +0000 (UTC) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange22.EDU.epsb.ca (exchange22.epsb.ca [198.161.119.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E6F943EDF for ; Thu, 30 Nov 2006 16:51:11 +0000 (GMT) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange21.EDU.epsb.ca ([10.0.5.118]) by Exchange22.EDU.epsb.ca with Microsoft SMTPSVC(6.0.3790.1830); Thu, 30 Nov 2006 09:51:19 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Date: Thu, 30 Nov 2006 09:51:19 -0700 Message-ID: <04C71268DFDAA8499EC1A248A44B6A2B0855B165@Exchange21.EDU.epsb.ca> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Broadcom (bce) support and POLLING Thread-Index: AccUlhTApjRb/6vGQ2+tHsgJiY19UgAAge4AAAHMpfA= From: "Kirk Davis" To: "David Christensen" X-OriginalArrivalTime: 30 Nov 2006 16:51:19.0527 (UTC) FILETIME=[C2490770:01C7149F] Cc: freebsd-net@freebsd.org Subject: RE: Broadcom (bce) support and POLLING 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, 30 Nov 2006 16:54:45 -0000 =20 Hi, > Polling is not currently supported in the bce driver. OK. That would explain it. The man page for polling lists the bce interface as a supported interface so I just assumed that it would work. Does anyone know if someone is working on polling support for the bce interfaces in a Dell 2950? =20 > > Hi, > > We have just upgraded to a Dell 2950 for our main BGP router. > > With the constant rise in traffic through the box, I have started to > > notice some dropped packets so I figured I would take a look=20 > > at putting > > the interfaces into polling more to squeeze a little more packets > > through them. > >=20 > > I have added the DEVICE_POLLING and HZ=3D1000 to the kernel. I > > turned on polling for the bce interfaces and they pass=20 > traffic at low > > volumes (like ping tests). If I put my fluke traffic generators on > > either side of the box and try to ramp it up to even 100Mb=20 > > (they are Gig > > links) then the interfaces will stop responding. Turning=20 > off polling > > will get them to respond again. > >=20 > > I know that the bce support in still quite new. Has anyone else > > testing with polling and the bce interfaces? Is there any more > > information that I can get for the developers to help track=20 > this down. > > The system is not in production right now so I can use it=20 > for testing. > >=20 > > As another note... I added some Intel (em) cards into the box > > and tested with them. Polling worked great on them but I was=20 > > only able > > to get about 200k packets per second before it starts=20 > > dropping packets. > > Is this about what I should expect? > >=20 > > [root@ ~]# uname -a > > FreeBSD 6.2-RC1 FreeBSD 6.2-RC1 #2: Tue Nov 28 18:10:56 MST 2006 > > root@:/usr/obj/usr/src/sys/INET-GW i386 > >=20 > > ---- Kirk > >=20 > >=20 > >=20 > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to=20 > "freebsd-net-unsubscribe@freebsd.org" > >=20 > >=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 From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 18:47:21 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 618) id F14E716A407; Thu, 30 Nov 2006 18:47:21 +0000 (UTC) In-Reply-To: <20061129232331.8E55016A415@hub.freebsd.org> from Bill Paul at "Nov 29, 2006 11:23:31 pm" To: wpaul@FreeBSD.ORG (Bill Paul) Date: Thu, 30 Nov 2006 18:47:21 +0000 (GMT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM826140722-92783-0_ Content-Transfer-Encoding: 7bit Message-Id: <20061130184721.F14E716A407@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Cc: pyunyh@gmail.com, stable@freebsd.org, ed@fxq.nl, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 30 Nov 2006 18:47:22 -0000 --ELM826140722-92783-0_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > > On Tue, Nov 28, 2006 at 08:46:00PM +0100, Ed Schouten wrote: > > > Hello, > > > > > > I'm running FreeBSD 6.2-PRERELEASE on my new desktop. It has the > > > following hardware: > > > > > > - Intel Core 2 Duo 6400 > > > - Asus P5B motherboard > > > - On-board Realtek NIC (8168B/8111B) > > > > > > For some reason, it drops all incoming IPv6 packets. I can only SSH to > > > the machine using IPv6 when I run the following command: > > > > > > $ ifconfig re0 promisc > > > > > > Is this a known issue about these NICs? > > > > No, I'm not aware of the issue. > > > > The issue can happen on a NIC with incorrectly programmed ethernet > > address. Would you show me dmesg/tcpdump output of your system? > > Make sure to add -e option to tcpdump(1). > > It's more likely a problem with the multicast filter programming. > IPv6 is all about the multicasting (neighbord discovery depends on it > to work correctly). I can't explain why it's not working though. > I've tested the sample 8168B/8111B cards that RealTek sent me, and I > didn't have any multicast problems with them. > > -Bill I guess I wasn't diligent enough in my testing. Upon closer inspection of the documentation, it appears RealTek abitrarily decided to reverse the order of the multicast hash registers in the PCIe parts: you have to write the hash table out in reverse order. I have no idea why they did this. In any case, I'm attaching a patch which should fix the problem. -Bill --ELM826140722-92783-0_ Content-Type: text/plain; charset=US-ASCII Content-Disposition: attachment; filename=multicast_patch Content-Description: multicast_patch Content-Transfer-Encoding: 7bit *** if_re.c.orig Thu Nov 30 10:37:42 2006 --- if_re.c Thu Nov 30 10:37:05 2006 *************** *** 620,625 **** --- 620,626 ---- struct ifmultiaddr *ifma; u_int32_t rxfilt; int mcnt = 0; + u_int32_t hwrev; RL_LOCK_ASSERT(sc); *************** *** 660,667 **** rxfilt &= ~RL_RXCFG_RX_MULTI; CSR_WRITE_4(sc, RL_RXCFG, rxfilt); ! CSR_WRITE_4(sc, RL_MAR0, hashes[0]); ! CSR_WRITE_4(sc, RL_MAR4, hashes[1]); } static void --- 661,684 ---- rxfilt &= ~RL_RXCFG_RX_MULTI; CSR_WRITE_4(sc, RL_RXCFG, rxfilt); ! ! /* ! * For some unfathomable reason, RealTek decided to reverse ! * the order of the multicast hash registers in the PCI Express ! * parts. This means we have to write the hash pattern in reverse ! * order for those devices. ! */ ! ! hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; ! ! if (hwrev == RL_HWREV_8100E || hwrev == RL_HWREV_8101E || ! hwrev == RL_HWREV_8168_SPIN1 || hwrev == RL_HWREV_8168_SPIN2) { ! CSR_WRITE_4(sc, RL_MAR0, bswap32(hashes[1])); ! CSR_WRITE_4(sc, RL_MAR4, bswap32(hashes[0])); ! } else { ! CSR_WRITE_4(sc, RL_MAR0, hashes[0]); ! CSR_WRITE_4(sc, RL_MAR4, hashes[1]); ! } } static void --ELM826140722-92783-0_-- From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 21:12:29 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E7E616A519; Thu, 30 Nov 2006 21:12:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id F38D543F54; Thu, 30 Nov 2006 21:05:53 +0000 (GMT) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 5D5651CF5F; Thu, 30 Nov 2006 22:05:24 +0100 (CET) Date: Thu, 30 Nov 2006 22:05:24 +0100 From: Ed Schouten To: Bill Paul Message-ID: <20061130210524.GY16100@hoeg.nl> References: <20061129232331.8E55016A415@hub.freebsd.org> <20061130184721.F14E716A407@hub.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1rohIOZGhsaeEmnk" Content-Disposition: inline In-Reply-To: <20061130184721.F14E716A407@hub.freebsd.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: pyunyh@gmail.com, stable@freebsd.org, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 30 Nov 2006 21:12:29 -0000 --1rohIOZGhsaeEmnk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bill Paul wrote: > > It's more likely a problem with the multicast filter programming. > > IPv6 is all about the multicasting (neighbord discovery depends on it > > to work correctly). I can't explain why it's not working though. > > I've tested the sample 8168B/8111B cards that RealTek sent me, and I > > didn't have any multicast problems with them. > >=20 > > -Bill >=20 > I guess I wasn't diligent enough in my testing. Upon closer inspection > of the documentation, it appears RealTek abitrarily decided to > reverse the order of the multicast hash registers in the PCIe parts: > you have to write the hash table out in reverse order. >=20 > I have no idea why they did this. In any case, I'm attaching a patch > which should fix the problem. It does. Thanks a lot. I still have some other minor issues with my network interface by the way: - Switching from and to promiscuous mode takes 7 seconds. All packets are dropped in the mean time. - Fetching 100 Mbit through FTP uses a lot of interrupts (almost thousands). Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --1rohIOZGhsaeEmnk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFb0eU52SDGA2eCwURAoM1AJ9eIZ4NlxCeH7oNZRm/GVaQ8/yjxgCfRfZM vDVH65NDFked2+aaheiVKbU= =A6fs -----END PGP SIGNATURE----- --1rohIOZGhsaeEmnk-- From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 21:21:46 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D8A8F16A4D8 for ; Thu, 30 Nov 2006 21:21:46 +0000 (UTC) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange22.EDU.epsb.ca (exchange22.epsb.ca [198.161.119.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67A9F44018 for ; Thu, 30 Nov 2006 21:16:27 +0000 (GMT) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange21.EDU.epsb.ca ([10.0.5.118]) by Exchange22.EDU.epsb.ca with Microsoft SMTPSVC(6.0.3790.1830); Thu, 30 Nov 2006 14:16:33 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Thu, 30 Nov 2006 14:16:33 -0700 Message-ID: <04C71268DFDAA8499EC1A248A44B6A2B0855B202@Exchange21.EDU.epsb.ca> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: What does the net.inet.ip.fastforwarding sysctl do? Thread-Index: AccUxM+XHCeHh9VZQeGOQFZLm/6aRg== From: "Kirk Davis" To: X-OriginalArrivalTime: 30 Nov 2006 21:16:33.0283 (UTC) FILETIME=[CF9F7D30:01C714C4] Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: What does the net.inet.ip.fastforwarding sysctl do? 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, 30 Nov 2006 21:21:46 -0000 Hi, I have am setting up a router that needs to handle a lot of traffic. I am using a Dell 2950 that I have added Intel Gig cards into (em). This server will be running quagga (for BGP) and also use a couple of IPFW FWD rules to forward packets to another host. In order to get the forwarding speed I need I have turned on the sysctl variable net.inet.ip.fastforwarding=3D1 What is the ramifications of this? Will it still work with routing software like quagga or allow IPFW to still forward packets? ---- Kirk From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 21:29:16 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7969016A50B for ; Thu, 30 Nov 2006 21:29:16 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAC7443E50 for ; Thu, 30 Nov 2006 21:25:16 +0000 (GMT) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id B235163AA; Fri, 1 Dec 2006 00:25:15 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 8FE506379; Fri, 1 Dec 2006 00:25:15 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id kAULPHwt029423; Fri, 1 Dec 2006 00:25:17 +0300 (MSK) (envelope-from ru) Date: Fri, 1 Dec 2006 00:25:17 +0300 From: Ruslan Ermilov To: Kirk Davis Message-ID: <20061130212517.GA29385@rambler-co.ru> References: <04C71268DFDAA8499EC1A248A44B6A2B0855B202@Exchange21.EDU.epsb.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/04w6evG8XlLl3ft" Content-Disposition: inline In-Reply-To: <04C71268DFDAA8499EC1A248A44B6A2B0855B202@Exchange21.EDU.epsb.ca> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-net@freebsd.org Subject: Re: What does the net.inet.ip.fastforwarding sysctl do? 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, 30 Nov 2006 21:29:16 -0000 --/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 30, 2006 at 02:16:33PM -0700, Kirk Davis wrote: > Hi, > I have am setting up a router that needs to handle a lot of > traffic. I am using a Dell 2950 that I have added Intel Gig cards into > (em). This server will be running quagga (for BGP) and also use a > couple of IPFW FWD rules to forward packets to another host. >=20 > In order to get the forwarding speed I need I have turned on the > sysctl variable net.inet.ip.fastforwarding=3D1 What is the > ramifications of this? Will it still work with routing software like > quagga or allow IPFW to still forward packets? >=20 RTFM: man 4 inet Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --/04w6evG8XlLl3ft Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFb0w9qRfpzJluFF4RAvleAJ9tT8mhv5CsOhNDjR79ubaBPhKeIgCgjAFh Zafkeh/9s1dYGSOI6tTSdRI= =zcO1 -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft-- From owner-freebsd-net@FreeBSD.ORG Thu Nov 30 21:31:31 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D91B16A407; Thu, 30 Nov 2006 21:31:31 +0000 (UTC) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange22.EDU.epsb.ca (exchange22.epsb.ca [198.161.119.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9DAC243CA5; Thu, 30 Nov 2006 21:29:28 +0000 (GMT) (envelope-from Kirk.Davis@epsb.ca) Received: from Exchange21.EDU.epsb.ca ([10.0.5.118]) by Exchange22.EDU.epsb.ca with Microsoft SMTPSVC(6.0.3790.1830); Thu, 30 Nov 2006 14:29:37 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Date: Thu, 30 Nov 2006 14:29:37 -0700 Message-ID: <04C71268DFDAA8499EC1A248A44B6A2B0855B20A@Exchange21.EDU.epsb.ca> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: What does the net.inet.ip.fastforwarding sysctl do? Thread-Index: AccUxgwOba4HQVtHSHSdZntdcHkfAAAAFgfw From: "Kirk Davis" To: "Ruslan Ermilov" X-OriginalArrivalTime: 30 Nov 2006 21:29:37.0867 (UTC) FILETIME=[A34581B0:01C714C6] Cc: freebsd-net@freebsd.org Subject: RE: What does the net.inet.ip.fastforwarding sysctl do? 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, 30 Nov 2006 21:31:31 -0000 > From: Ruslan Ermilov [mailto:ru@freebsd.org]=20 >=20 > On Thu, Nov 30, 2006 at 02:16:33PM -0700, Kirk Davis wrote: > > Hi, > > I have am setting up a router that needs to handle a lot of > > traffic. I am using a Dell 2950 that I have added Intel=20 > Gig cards into > > (em). This server will be running quagga (for BGP) and also use a > > couple of IPFW FWD rules to forward packets to another host. > >=20 > > In order to get the forwarding speed I need I have turned on the > > sysctl variable net.inet.ip.fastforwarding=3D1 What is the > > ramifications of this? Will it still work with routing=20 > software like > > quagga or allow IPFW to still forward packets? > >=20 > RTFM: man 4 inet Ahhh. OK Thanks. I did look for a man page but didn't take a look at the one for inet. A good explanation. Thanks, Kirk From owner-freebsd-net@FreeBSD.ORG Fri Dec 1 00:16:57 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 618) id 9F44E16A407; Fri, 1 Dec 2006 00:16:57 +0000 (UTC) In-Reply-To: <20061130210524.GY16100@hoeg.nl> from Ed Schouten at "Nov 30, 2006 10:05:24 pm" To: ed@fxq.nl (Ed Schouten) Date: Fri, 1 Dec 2006 00:16:57 +0000 (GMT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20061201001657.9F44E16A407@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Cc: pyunyh@gmail.com, stable@freebsd.org, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 01 Dec 2006 00:16:57 -0000 > * Bill Paul wrote: > > > It's more likely a problem with the multicast filter programming. > > > IPv6 is all about the multicasting (neighbord discovery depends on it > > > to work correctly). I can't explain why it's not working though. > > > I've tested the sample 8168B/8111B cards that RealTek sent me, and I > > > didn't have any multicast problems with them. > > > > > > -Bill > > > > I guess I wasn't diligent enough in my testing. Upon closer inspection > > of the documentation, it appears RealTek abitrarily decided to > > reverse the order of the multicast hash registers in the PCIe parts: > > you have to write the hash table out in reverse order. > > > > I have no idea why they did this. In any case, I'm attaching a patch > > which should fix the problem. > > It does. Thanks a lot. I still have some other minor issues with my > network interface by the way: > > - Switching from and to promiscuous mode takes 7 seconds. All packets > are dropped in the mean time. The SIOCSIFFLAGS handler in re_ioctl() currently just takes a shortcut of calling re_init(). While this does eventually end up changing the RX filter settings accordingly, it takes a while because re_init() also shuts down and re-initializes the whole chip (including resetting the link). This is relatively easy to fix though. The IFF_PROMISC flag can be singled out and handled separately. (A few other drivers already do this.) > - Fetching 100 Mbit through FTP uses a lot of interrupts (almost > thousands). Assuming that "almost thousands" means "less than 1000," that's actually pretty good. Assuming full size (1500 byte) frames, it takes about 8100 frames/second to fill a 100Mbps pipe. Each time a frame arrives, you get an RX completion interrupt. You'll also get a TX completion interrupt when TCP ACKs the incoming data. A hastily contrived test using ttcp between my SunBlade and dual PIII FreeBSD 6.1 workstation here in my office using ttcp shows that my fxp interface is generating anywhere from 7800 to 8180 interrupts per second (according to "systat -vmstat 1"), which seems to agree with my math. As soon as the re_intr() routine is invoked by an interrupt, it'll mask interrupts and schedule RX and TX handling to be done in a taskqueue. The taskqueue will keep draining interrupt events until no more are pending, and only then will it unmask interrupts again. This cuts down on interrupt overhead somewhat, which is always a good thing. (Interrupt moderation can help too, but the RealTek chip doesn't support it.) So consider yourself lucky: there are CPU-starved children in africa who'd be overjoyed to only have to handle hundreds of interrupts per second. -Bill From owner-freebsd-net@FreeBSD.ORG Fri Dec 1 16:11:32 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A1AE16A492; Fri, 1 Dec 2006 16:11:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F2F943C9D; Fri, 1 Dec 2006 16:11:17 +0000 (GMT) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 15CF81CFFF; Fri, 1 Dec 2006 17:11:31 +0100 (CET) Date: Fri, 1 Dec 2006 17:11:31 +0100 From: Ed Schouten To: Bill Paul Message-ID: <20061201161131.GD16100@hoeg.nl> References: <20061130210524.GY16100@hoeg.nl> <20061201001657.9F44E16A407@hub.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jdAw5H+0hw/nhz1g" Content-Disposition: inline In-Reply-To: <20061201001657.9F44E16A407@hub.freebsd.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: pyunyh@gmail.com, stable@freebsd.org, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 01 Dec 2006 16:11:32 -0000 --jdAw5H+0hw/nhz1g Content-Type: multipart/mixed; boundary="6CNdTR4UDBbLlHcf" Content-Disposition: inline --6CNdTR4UDBbLlHcf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Bill, * Bill Paul wrote: > > - Switching from and to promiscuous mode takes 7 seconds. All packets > > are dropped in the mean time. >=20 > The SIOCSIFFLAGS handler in re_ioctl() currently just takes a shortcut > of calling re_init(). While this does eventually end up changing the RX > filter settings accordingly, it takes a while because re_init() also shuts > down and re-initializes the whole chip (including resetting the link). >=20 > This is relatively easy to fix though. The IFF_PROMISC flag can be > singled out and handled separately. (A few other drivers already do this.) I wrote a small patch that moves all rxcfg code in re_init_locked() to a separate function. This way, we can just call that function instead of re_init_locked when reaching SIOCSIFFLAGS. I tested it by reverting your patch and ping6'ing the box. When I run tcpdump, the box doesn't freeze and enters promiscuous mode (suddenly the ping6 starts to work then). What do you think about this patch? Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --6CNdTR4UDBbLlHcf Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_re.c.patch" Content-Transfer-Encoding: quoted-printable --- sys/dev/re/if_re.c Fri Dec 1 17:01:48 2006 +++ sys/dev/re/if_re.c Fri Dec 1 17:02:35 2006 @@ -249,6 +249,7 @@ static int re_ioctl (struct ifnet *, u_long, caddr_t); static void re_init (void *); static void re_init_locked (struct rl_softc *); +static void re_init_rxcfg (struct rl_softc *); static void re_stop (struct rl_softc *); static void re_watchdog (struct ifnet *); static int re_suspend (device_t); @@ -2254,7 +2255,6 @@ { struct ifnet *ifp =3D sc->rl_ifp; struct mii_data *mii; - u_int32_t rxcfg =3D 0; union { uint32_t align_dummy; u_char eaddr[ETHER_ADDR_LEN]; @@ -2316,31 +2316,8 @@ } else CSR_WRITE_4(sc, RL_TXCFG, RL_TXCFG_CONFIG); CSR_WRITE_4(sc, RL_RXCFG, RL_RXCFG_CONFIG); - - /* Set the individual bit to receive frames for this host only. */ - rxcfg =3D CSR_READ_4(sc, RL_RXCFG); - rxcfg |=3D RL_RXCFG_RX_INDIV; - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) - rxcfg |=3D RL_RXCFG_RX_ALLPHYS; - else - rxcfg &=3D ~RL_RXCFG_RX_ALLPHYS; - CSR_WRITE_4(sc, RL_RXCFG, rxcfg); - - /* - * Set capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) - rxcfg |=3D RL_RXCFG_RX_BROAD; - else - rxcfg &=3D ~RL_RXCFG_RX_BROAD; - CSR_WRITE_4(sc, RL_RXCFG, rxcfg); - - /* - * Program the multicast filter, if necessary. - */ - re_setmulti(sc); +=09 + re_init_rxcfg(sc); =20 #ifdef DEVICE_POLLING /* @@ -2422,6 +2399,39 @@ callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } =20 +static void +re_init_rxcfg(sc) + struct rl_softc *sc; +{ + u_int32_t rxcfg; + struct ifnet *ifp =3D sc->rl_ifp; + + /* Set the individual bit to receive frames for this host only. */ + rxcfg =3D CSR_READ_4(sc, RL_RXCFG); + rxcfg |=3D RL_RXCFG_RX_INDIV; + + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & IFF_PROMISC) + rxcfg |=3D RL_RXCFG_RX_ALLPHYS; + else + rxcfg &=3D ~RL_RXCFG_RX_ALLPHYS; + CSR_WRITE_4(sc, RL_RXCFG, rxcfg); + + /* + * Set capture broadcast bit to capture broadcast frames. + */ + if (ifp->if_flags & IFF_BROADCAST) + rxcfg |=3D RL_RXCFG_RX_BROAD; + else + rxcfg &=3D ~RL_RXCFG_RX_BROAD; + CSR_WRITE_4(sc, RL_RXCFG, rxcfg); + + /* + * Program the multicast filter, if necessary. + */ + re_setmulti(sc); +} + /* * Set media options. */ @@ -2484,7 +2494,7 @@ case SIOCSIFFLAGS: RL_LOCK(sc); if (ifp->if_flags & IFF_UP) - re_init_locked(sc); + re_init_rxcfg(sc); else if (ifp->if_drv_flags & IFF_DRV_RUNNING) re_stop(sc); RL_UNLOCK(sc); --6CNdTR4UDBbLlHcf-- --jdAw5H+0hw/nhz1g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFcFQz52SDGA2eCwURAshKAJ9fgUQflsE0m86l1EJXNEO3xc9jSQCdEtEe U5vc1Uzuf/7E+8f8Dsp8eVE= =yi93 -----END PGP SIGNATURE----- --jdAw5H+0hw/nhz1g-- From owner-freebsd-net@FreeBSD.ORG Fri Dec 1 16:52:31 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: by hub.freebsd.org (Postfix, from userid 618) id 4089216A416; Fri, 1 Dec 2006 16:52:31 +0000 (UTC) In-Reply-To: <20061201161131.GD16100@hoeg.nl> from Ed Schouten at "Dec 1, 2006 05:11:31 pm" To: ed@fxq.nl (Ed Schouten) Date: Fri, 1 Dec 2006 16:52:31 +0000 (GMT) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20061201165231.4089216A416@hub.freebsd.org> From: wpaul@FreeBSD.ORG (Bill Paul) Cc: pyunyh@gmail.com, stable@freebsd.org, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 01 Dec 2006 16:52:31 -0000 > Hello Bill, > > * Bill Paul wrote: > > > - Switching from and to promiscuous mode takes 7 seconds. All packets > > > are dropped in the mean time. > > > > The SIOCSIFFLAGS handler in re_ioctl() currently just takes a shortcut > > of calling re_init(). While this does eventually end up changing the RX > > filter settings accordingly, it takes a while because re_init() also shuts > > down and re-initializes the whole chip (including resetting the link). > > > > This is relatively easy to fix though. The IFF_PROMISC flag can be > > singled out and handled separately. (A few other drivers already do this.) > > I wrote a small patch that moves all rxcfg code in re_init_locked() to a > separate function. This way, we can just call that function instead of > re_init_locked when reaching SIOCSIFFLAGS. I tested it by reverting your > patch and ping6'ing the box. When I run tcpdump, the box doesn't freeze > and enters promiscuous mode (suddenly the ping6 starts to work then). > > What do you think about this patch? I'm a little concerned about the fact that now SIOCSIFFLAGS can never cause re_init_locked() to be called. There are some cases where it does need to be called (like when the IFF_UP flag is first set to turn the interface on). I usually do it like in the vge(4) driver: if it's just the IFF_PROMISC bit that's being toggled, then I only toggle the promisc mode bit in the RX config register. -Bill From owner-freebsd-net@FreeBSD.ORG Sat Dec 2 02:11:37 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1863916A47B for ; Sat, 2 Dec 2006 02:11:37 +0000 (UTC) (envelope-from pirzyk@freebsd.org) Received: from zoot.intenex.net (zoot.intenex.net [216.93.182.12]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CF5E43CA5 for ; Sat, 2 Dec 2006 02:11:14 +0000 (GMT) (envelope-from pirzyk@freebsd.org) Received: from [192.168.1.5] (node-2-25.flex.volo.net [64.198.215.25]) (authenticated bits=0) by zoot.intenex.net (8.12.11.20060308/8.12.11) with ESMTP id kB22BN7p029207 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Fri, 1 Dec 2006 20:11:25 -0600 Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: <827DB520-91DD-46E3-8CE7-1F9CCAF7756F@freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed To: freebsd-net@freebsd.org From: Jim Pirzyk Date: Fri, 1 Dec 2006 20:11:18 -0600 X-Pgp-Agent: GPGMail 1.1.2 (Tiger) X-Mailer: Apple Mail (2.752.2) X-Intenex-MailScanner-Information: Please contact Intenex support for more information X-Intenex-MailScanner: Found to be clean X-MailScanner-From: pirzyk@freebsd.org Subject: Gigabit Ethernet NIC with Jumbo Frame Support 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, 02 Dec 2006 02:11:37 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I am looking for a recommendation for a card purchase of a Gigabit Ethernet NIC that supports jumbo frames. Looking at the kernel, the following drivers support jumbo frames; bce, bge, em, ixgb, lge, nge, sk stge, and vge. What is perceived as the most stable, best performing card and driver for FreeBSD RELENG_6 line? I have multi TBs to back up from a SAN (via 2Gb Qlogic FC card) to a TSM Server. We currently have the Broadcom BCM5750, but that chipset does not support Jumbo Frames. The card itself needs to be PCI- Express. TIA - - Jim Pirzyk - --- @(#) $Id: dot.signature,v 1.14 2004/02/03 02:46:26 pirzyk Exp $ __o pirzyk@uiuc.edu --------------------------- jim@pirzyk.org _'\<,_ Systems Management Group, CITES (*)/ (*) University of Illinois at Urbana-Champaign -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) iD8DBQFFcODG2EYx0U4j2soRArlmAJ93oeZCeUE89Ix3ch++Hj6fCLcISgCcCA+L lEkqyJgfFw0OOXoSs7Vk/j0= =svpu -----END PGP SIGNATURE----- From owner-freebsd-net@FreeBSD.ORG Sat Dec 2 08:59:27 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BEF6216A412 for ; Sat, 2 Dec 2006 08:59:27 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) Received: from mta-1.ms.rz.rwth-aachen.de (mta-1.ms.rz.RWTH-Aachen.DE [134.130.7.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8A70F43CA6 for ; Sat, 2 Dec 2006 08:59:07 +0000 (GMT) (envelope-from chris@hitnet.RWTH-Aachen.DE) Received: from circe ([134.130.3.36]) by mta-1.ms.rz.RWTH-Aachen.de (Sun Java System Messaging Server 6.2-7.05 (built Sep 5 2006)) with ESMTP id <0J9N00JIL2B14F70@mta-1.ms.rz.RWTH-Aachen.de> for freebsd-net@freebsd.org; Sat, 02 Dec 2006 09:59:25 +0100 (CET) Received: from talos.rz.RWTH-Aachen.DE ([134.130.3.22]) by circe (MailMonitor for SMTP v1.2.2 ) ; Sat, 02 Dec 2006 09:59:24 +0100 (MET) Received: from bigboss.hitnet.rwth-aachen.de (bigspace.hitnet.RWTH-Aachen.DE [137.226.181.2]) by smarthost.rwth-aachen.de (8.13.8/8.13.1/1) with ESMTP id kB28xOwn003921; Sat, 02 Dec 2006 09:59:24 +0100 Received: from haakonia.hitnet.rwth-aachen.de ([137.226.181.92]) by bigboss.hitnet.rwth-aachen.de with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1GqQiS-0007Gq-2u; Sat, 02 Dec 2006 09:59:24 +0100 Received: by haakonia.hitnet.rwth-aachen.de (Postfix, from userid 1001) id 748113F41E; Sat, 02 Dec 2006 09:59:23 +0100 (CET) Date: Sat, 02 Dec 2006 09:59:23 +0100 From: Christian Brueffer In-reply-to: <04C71268DFDAA8499EC1A248A44B6A2B0855B143@Exchange21.EDU.epsb.ca> To: Kirk Davis Message-id: <20061202085923.GA1960@haakonia.hitnet.RWTH-Aachen.DE> MIME-version: 1.0 Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM" Content-disposition: inline X-Operating-System: FreeBSD 6.2-PRERELEASE X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D References: <04C71268DFDAA8499EC1A248A44B6A2B0855B143@Exchange21.EDU.epsb.ca> User-Agent: Mutt/1.5.11 Cc: freebsd-net@freebsd.org Subject: Re: Broadcom (bce) support and POLLING 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, 02 Dec 2006 08:59:27 -0000 --yrj/dFKFPuw6o+aM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 30, 2006 at 08:42:02AM -0700, Kirk Davis wrote: > Hi, > We have just upgraded to a Dell 2950 for our main BGP router. > With the constant rise in traffic through the box, I have started to > notice some dropped packets so I figured I would take a look at putting > the interfaces into polling more to squeeze a little more packets > through them. >=20 > I have added the DEVICE_POLLING and HZ=3D1000 to the kernel. I > turned on polling for the bce interfaces and they pass traffic at low > volumes (like ping tests). If I put my fluke traffic generators on > either side of the box and try to ramp it up to even 100Mb (they are Gig > links) then the interfaces will stop responding. Turning off polling > will get them to respond again. >=20 > I know that the bce support in still quite new. Has anyone else > testing with polling and the bce interfaces? Is there any more > information that I can get for the developers to help track this down. > The system is not in production right now so I can use it for testing. >=20 That's my fault. When David's driver was added, I saw the polling compile time option was supported and concluded that polling works with this driver (David told me it wasn't tested afterwards). I'll remove the bce entry from polling(4) and the polling entry from bce(4) for now. - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --yrj/dFKFPuw6o+aM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFcUBrbHYXjKDtmC0RArXzAKDig1ZYkr5Z8mympGkeu9aXUVN3UgCePJH3 4lAcRNokJLXcxBk7xlN9rTg= =qkYV -----END PGP SIGNATURE----- --yrj/dFKFPuw6o+aM-- From owner-freebsd-net@FreeBSD.ORG Sat Dec 2 09:41:53 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F03316A415; Sat, 2 Dec 2006 09:41:53 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (palm.hoeg.nl [83.98.131.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CF5E43CA7; Sat, 2 Dec 2006 09:41:32 +0000 (GMT) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 6954B1D00B; Sat, 2 Dec 2006 10:41:50 +0100 (CET) Date: Sat, 2 Dec 2006 10:41:50 +0100 From: Ed Schouten To: Bill Paul Message-ID: <20061202094150.GE16100@hoeg.nl> References: <20061201161131.GD16100@hoeg.nl> <20061201165231.4089216A416@hub.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+sXEj1HC0AeGgRD2" Content-Disposition: inline In-Reply-To: <20061201165231.4089216A416@hub.freebsd.org> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: pyunyh@gmail.com, stable@freebsd.org, net@freebsd.org Subject: Re: re(4) needs promisc to work properly 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, 02 Dec 2006 09:41:53 -0000 --+sXEj1HC0AeGgRD2 Content-Type: multipart/mixed; boundary="t1V/6vyDgJ44qiBN" Content-Disposition: inline --t1V/6vyDgJ44qiBN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Bill, * Bill Paul wrote: > I'm a little concerned about the fact that now SIOCSIFFLAGS can never > cause re_init_locked() to be called. There are some cases where it > does need to be called (like when the IFF_UP flag is first set to > turn the interface on). >=20 > I usually do it like in the vge(4) driver: if it's just the IFF_PROMISC > bit that's being toggled, then I only toggle the promisc mode bit in > the RX config register. To avoid code duplication and to speed up IFF_BROADCAST as well, I decided to keep the re_init_rxcfg() function. I took a look at vge(4) and xl(4) and added `re_if_flags` to the softc to backup the original ifp->if_flags. Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --t1V/6vyDgJ44qiBN Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="if_re.c.diff" Content-Transfer-Encoding: quoted-printable --- sys/dev/re/if_re.c Sat Dec 2 00:05:44 2006 +++ sys/dev/re/if_re.c Sat Dec 2 00:15:56 2006 @@ -249,6 +249,7 @@ static int re_ioctl (struct ifnet *, u_long, caddr_t); static void re_init (void *); static void re_init_locked (struct rl_softc *); +static void re_init_rxcfg (struct rl_softc *); static void re_stop (struct rl_softc *); static void re_watchdog (struct ifnet *); static int re_suspend (device_t); @@ -2254,7 +2255,6 @@ { struct ifnet *ifp =3D sc->rl_ifp; struct mii_data *mii; - u_int32_t rxcfg =3D 0; union { uint32_t align_dummy; u_char eaddr[ETHER_ADDR_LEN]; @@ -2316,31 +2316,8 @@ } else CSR_WRITE_4(sc, RL_TXCFG, RL_TXCFG_CONFIG); CSR_WRITE_4(sc, RL_RXCFG, RL_RXCFG_CONFIG); - - /* Set the individual bit to receive frames for this host only. */ - rxcfg =3D CSR_READ_4(sc, RL_RXCFG); - rxcfg |=3D RL_RXCFG_RX_INDIV; - - /* If we want promiscuous mode, set the allframes bit. */ - if (ifp->if_flags & IFF_PROMISC) - rxcfg |=3D RL_RXCFG_RX_ALLPHYS; - else - rxcfg &=3D ~RL_RXCFG_RX_ALLPHYS; - CSR_WRITE_4(sc, RL_RXCFG, rxcfg); - - /* - * Set capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) - rxcfg |=3D RL_RXCFG_RX_BROAD; - else - rxcfg &=3D ~RL_RXCFG_RX_BROAD; - CSR_WRITE_4(sc, RL_RXCFG, rxcfg); - - /* - * Program the multicast filter, if necessary. - */ - re_setmulti(sc); +=09 + re_init_rxcfg(sc); =20 #ifdef DEVICE_POLLING /* @@ -2422,6 +2399,39 @@ callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } =20 +static void +re_init_rxcfg(sc) + struct rl_softc *sc; +{ + u_int32_t rxcfg; + struct ifnet *ifp =3D sc->rl_ifp; + + /* Set the individual bit to receive frames for this host only. */ + rxcfg =3D CSR_READ_4(sc, RL_RXCFG); + rxcfg |=3D RL_RXCFG_RX_INDIV; + + /* If we want promiscuous mode, set the allframes bit. */ + if (ifp->if_flags & IFF_PROMISC) + rxcfg |=3D RL_RXCFG_RX_ALLPHYS; + else + rxcfg &=3D ~RL_RXCFG_RX_ALLPHYS; + CSR_WRITE_4(sc, RL_RXCFG, rxcfg); + + /* + * Set capture broadcast bit to capture broadcast frames. + */ + if (ifp->if_flags & IFF_BROADCAST) + rxcfg |=3D RL_RXCFG_RX_BROAD; + else + rxcfg &=3D ~RL_RXCFG_RX_BROAD; + CSR_WRITE_4(sc, RL_RXCFG, rxcfg); + + /* + * Program the multicast filter, if necessary. + */ + re_setmulti(sc); +} + /* * Set media options. */ @@ -2483,10 +2493,16 @@ break; case SIOCSIFFLAGS: RL_LOCK(sc); - if (ifp->if_flags & IFF_UP) - re_init_locked(sc); - else if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_flags & IFF_UP) { + if ((ifp->if_flags ^ sc->rl_if_flags) & + (IFF_PROMISC | IFF_BROADCAST)) + re_init_rxcfg(sc); + else + re_init_locked(sc); + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING) { re_stop(sc); + } + sc->rl_if_flags =3D ifp->if_flags; RL_UNLOCK(sc); break; case SIOCADDMULTI: --- sys/pci/if_rlreg.h Sat Dec 2 00:07:27 2006 +++ sys/pci/if_rlreg.h Sat Dec 2 00:18:53 2006 @@ -737,6 +737,7 @@ struct mtx rl_intlock; int rl_txstart; int rl_link; + int rl_if_flags; }; =20 #define RL_LOCK(_sc) mtx_lock(&(_sc)->rl_mtx) --t1V/6vyDgJ44qiBN-- --+sXEj1HC0AeGgRD2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFcUpe52SDGA2eCwURAs+PAJ95X+L3/oyBpa/n5p7lzIRSKRkIeQCdF5ZF dYySYWoSmLiN404oONxwOfw= =itll -----END PGP SIGNATURE----- --+sXEj1HC0AeGgRD2-- From owner-freebsd-net@FreeBSD.ORG Sat Dec 2 09:46:20 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6AFDC16A412 for ; Sat, 2 Dec 2006 09:46:20 +0000 (UTC) (envelope-from antinvidia@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2629143CBB for ; Sat, 2 Dec 2006 09:45:58 +0000 (GMT) (envelope-from antinvidia@gmail.com) Received: by nf-out-0910.google.com with SMTP id x37so3594062nfc for ; Sat, 02 Dec 2006 01:46:17 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=iyl0FRkJrfH1C7SNegrY+QR+T9J7KWN/9l7d3t/bYzueOY6a2TR/GlO1JI46hmzPniJg53I8aiZCGYbf5Z/63teyVNONKTd123ZcH31BpmBjEO/fYhc6Y6hkhIt7cV/wHjwWo43MVNhRBHKUhy5c9g2HTQfCl+/W20DvrmYP7Fc= Received: by 10.78.50.5 with SMTP id x5mr5686940hux.1165052777046; Sat, 02 Dec 2006 01:46:17 -0800 (PST) Received: by 10.78.167.2 with HTTP; Sat, 2 Dec 2006 01:46:16 -0800 (PST) Message-ID: Date: Sat, 2 Dec 2006 09:46:16 +0000 From: MQ To: "Vladimir Terziev" In-Reply-To: <20061129182534.5300947f.vlady@gbservices.biz> MIME-Version: 1.0 References: <20061128204732.3e8790fd.vlady@gbservices.biz> <200611290709.34059.josh@tcbug.org> <20061129182534.5300947f.vlady@gbservices.biz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Josh Paetzel , freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: FreeBSD-6.1/amd64 bge(4) driver performance problems X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 09:46:20 -0000 2006/11/29, Vladimir Terziev : > > > The cable and the switch port, both were one and the same in the > test with Broadcom NIC and in the test with D-Link NIC. So, the reason is > not in them for sure. > > I didn't mention in my initial e-mail, that since the swtich is > 100Mbps, the Broadcom NIC was forced to work on 100mbit, full-duplex. For > some reason, when using autodect, the Broadcom NIC negotiates 100mbit, > half-duplex. > > Vladimir > > On Wed, 29 Nov 2006 07:09:33 -0600 > Josh Paetzel wrote: > > > On Tuesday 28 November 2006 12:47, Vladimir Terziev wrote: > > > Hi, > > > > > > i have a machine with Pentium 4-D processor utilizing > > > FreeBSD-6.1-RELEASE-p10/amd64. > > > > > > The machine is running SMP kernel. > > > > > > The machine has 2 on-board Broadcom BCM5721 NICs, which are > > > handeled by the bge(4) driver and 4 D-Link DL10050 NICs, which are > > > handeled by the ste(4) driver. Machine is targeted for a > > > gateway/firewall and will handle a big amount of network traffic. > > > > > > It seems the bge(4) driver has severe performance problems (may be > > > especially in my configuration). I tried test scp(1) to a remote > > > machine, using one of the BCM5721 NICs. The average speed which has > > > been reached was 200kBps. > > > > > > Just for comparison, when i tryed the same test scp(1), to the > > > same remote machine, but using one of the D-Link DL10050 NICs, the > > > average speed which has been reached was 10MBps. > > > > > > Could someone point me to a good performance tuning document for > > > bge(4) handeled NICs, under SMP kernel or at all? > > > > > > Thanks in advance! > > > > > > Vladimir > > > > So you have 2 gig-E and 4 100tx interfaces on the same PCI bus? If so > > you're going to run into bus saturation long before you're able to > > max out the throughput on the NICs. > > > > Which isn't to say that 200 kBps isn't a problem, but perhaps you are > > dealing with a bad cable or switchport. > > > > -- > > Thanks, > > > > Josh Paetzel > _______________________________________________ > 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" > Yes, maybe the current bge(4) has some problems with the media type. When connecting a 5780 to another 5701, it completely refused to work. But when I use the 5701 to work with Intel 82547, it works great. From owner-freebsd-net@FreeBSD.ORG Sat Dec 2 15:59:13 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C029816A403; Sat, 2 Dec 2006 15:59:13 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.FreeBSD.org (Postfix) with ESMTP id B54D743CB6; Sat, 2 Dec 2006 15:58:49 +0000 (GMT) (envelope-from lists@jnielsen.net) Received: from insp.local (jn@c-68-59-28-54.hsd1.sc.comcast.net [68.59.28.54]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id kB2Fx92R024715; Sat, 2 Dec 2006 07:59:10 -0800 (PST) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-net@freebsd.org Date: Sat, 2 Dec 2006 10:59:04 -0500 User-Agent: KMail/1.9.4 References: <827DB520-91DD-46E3-8CE7-1F9CCAF7756F@freebsd.org> In-Reply-To: <827DB520-91DD-46E3-8CE7-1F9CCAF7756F@freebsd.org> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200612021059.05567.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Jim Pirzyk Subject: Re: Gigabit Ethernet NIC with Jumbo Frame Support 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, 02 Dec 2006 15:59:13 -0000 On Friday 01 December 2006 21:11, Jim Pirzyk wrote: > I am looking for a recommendation for a card purchase of a Gigabit > Ethernet NIC that supports jumbo frames. Looking at the kernel, > the following drivers support jumbo frames; bce, bge, em, ixgb, > lge, nge, sk stge, and vge. What is perceived as the most stable, > best performing card and driver for FreeBSD RELENG_6 line? I have > multi TBs to back up from a SAN (via 2Gb Qlogic FC card) to a TSM > Server. We currently have the Broadcom BCM5750, but that chipset > does not support Jumbo Frames. The card itself needs to be PCI- > Express. At home I use an SMC card and an onboard Marvell chip on either end of a gig link with jumbo frames (mtu 9000) enabled. I've been quite happy with it; for random I/O intensive tasks I can't tell a difference between using an NFS mount and local storage. Both use the sk(4) driver. Watch out for newer Marvell chipsets that require the non-finished msk(4) driver. At work I use an em(4) Intel card, but don't have jumbo frames enabled. It performs well even so. Only some of the chipsets supported by the driver support jumbo frames. See the manpage for details. Unfortunately I'm not sure what's available as a PCI-e card. I expect you'll get additional responses, though. HTH, JN From owner-freebsd-net@FreeBSD.ORG Sat Dec 2 21:45:36 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 24ADB16A40F; Sat, 2 Dec 2006 21:45:36 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost2.sentex.ca (smarthost2.sentex.ca [205.211.164.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3141343CAE; Sat, 2 Dec 2006 21:45:13 +0000 (GMT) (envelope-from mike@sentex.net) Received: from BLUELAPIS.sentex.ca (cage.simianscience.com [64.7.134.1]) by smarthost2.sentex.ca (8.13.8/8.13.8) with SMTP id kB2LjYMA039658; Sat, 2 Dec 2006 16:45:35 -0500 (EST) (envelope-from mike@sentex.net) From: Mike Tancsa To: Jim Pirzyk Date: Sat, 02 Dec 2006 16:46:09 -0500 Message-ID: References: <827DB520-91DD-46E3-8CE7-1F9CCAF7756F@freebsd.org> In-Reply-To: <827DB520-91DD-46E3-8CE7-1F9CCAF7756F@freebsd.org> X-Mailer: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org Subject: Re: Gigabit Ethernet NIC with Jumbo Frame Support 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, 02 Dec 2006 21:45:36 -0000 On Fri, 1 Dec 2006 20:11:18 -0600, in sentex.lists.freebsd.net you wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >I am looking for a recommendation for a card purchase of a Gigabit >Ethernet NIC that supports jumbo frames. Looking at the kernel, >the following drivers support jumbo frames; bce, bge, em, ixgb, >lge, nge, sk stge, and vge. What is perceived as the most stable, The Intel 1000PT PCIe cards work well under FreeBSD. I have been stressing this card and it does well in RELENG_6 ---Mike -------------------------------------------------------- Mike Tancsa, Sentex communications http://www.sentex.net Providing Internet Access since 1994 mike@sentex.net, (http://www.tancsa.com)