From owner-freebsd-net@FreeBSD.ORG Sun Jun 19 09:44:07 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C20831065670; Sun, 19 Jun 2011 09:44:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 099628FC18; Sun, 19 Jun 2011 09:44:06 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p5J9i4lT073658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 19 Jun 2011 12:44:04 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p5J9i3NN095236; Sun, 19 Jun 2011 12:44:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p5J9i3HJ095235; Sun, 19 Jun 2011 12:44:03 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 19 Jun 2011 12:44:03 +0300 From: Kostik Belousov To: Mikolaj Golub Message-ID: <20110619094403.GD48734@deviant.kiev.zoral.com.ua> References: <86pqmhn1pf.fsf@kopusha.home.net> <20110614092303.GG48734@deviant.kiev.zoral.com.ua> <86k4cntwz2.fsf@in138.ua3> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FM5zcXyvfv2Qtj+b" Content-Disposition: inline In-Reply-To: <86k4cntwz2.fsf@in138.ua3> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-net@freebsd.org, Pawel Jakub Dawidek Subject: Re: Scenario to make recv(MSG_WAITALL) stuck 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, 19 Jun 2011 09:44:07 -0000 --FM5zcXyvfv2Qtj+b Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 15, 2011 at 09:44:33AM +0300, Mikolaj Golub wrote: >=20 > On Tue, 14 Jun 2011 12:23:03 +0300 Kostik Belousov wrote: >=20 > KB> I do not understand what then happens for the recvfrom(2) call ? > KB> Would it get some error, or 0 as return and no data, or something el= se ? >=20 > It will wait for data below in another loop ("Now continue to read any da= ta > mbufs off of the head..."). >=20 > Elaborating, I would split soreceive_generic on three logical parts. >=20 > In the first (restart) part we block until some data are received and also > (without the patch) in the case of MSG_WAITALL if the buffer is big enoug= h we > block until all MSG_WAITALL request is received (actually it will spin in > "goto restart" loop until some condition becomes invalid). >=20 > The second part is some processing of received data and the third part is= a > "while" loop where data is copied to userspace and in the case of MSG_WAI= TALL > request if not all data is received to satisfy the request it also waits = for > this data. >=20 > My patch removes the condition in the first part in the case of MSG_WAITA= LL to > wait for all data if buffer is big enough. We always will wait for the re= st of > data in the third part. It might be not so effective, and this is my first > concern about the patch (although not big :-). Now I think that this part of the patch is right. The loop in the soreceive_generic() would behave as I would expect it for MSG_WAITALL. It copyout the received data to userspace by received chunks. I do not understand your note about effectiveness there. >=20 > KB> Also, what is the MT_CONTROL chunk about ? >=20 > When I removed the condition to skip blocking in the first part I started= to > observe panic on KASSERT(m->m_type =3D=3D MT_DATA) for the following scen= ario > (produced by HAST): >=20 > sender: >=20 > send(4 bytes); /* send protocol name */ > sendmsg(); /* send descriptor (normal data is empty, descriptor in co= ntrol data) */ >=20 > receiver: >=20 > recv(127 bytes, MSG_WAITALL); /* recive protocol name */ > recvmsg(); /* recive descriptor */ >=20 > Although the recv() has MSG_WAITALL, it exits after receiving 4 bytes bec= ause > the next received data is of different (MT_CONTROL) type. An it panicked = when > got control data. >=20 > It is unclear for me why it is not expected to have MT_CONTROL data in th= at > part. We do have processing of MT_CONTROL above (in the second part) in t= he > code but I still a have feeling that it is possible to create some scenar= io to > break this assert without my patch too, but I have failed so far. And thi= s is > my second concern about my patch, big enough, because for now I am not su= re > that this is correct. Although I have not observed issues with it so far.= .. I have no idea about this part. >=20 > Also, I am not sure if there is sense to bother with soreceive_generic() = at > all. May be it is more perspective to spend time on "maturing" > soreceive_stream(). As I see it is going to be a replacement for > soreceive_generic() for stream sockets. >=20 > --=20 > Mikolaj Golub --FM5zcXyvfv2Qtj+b Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk39xOMACgkQC3+MBN1Mb4iVbQCg5gbVdCW/Z4WjHOJbSbX+f0so OiIAnRszcR5KuqTtAUilOouMCCtSTsd/ =y8y3 -----END PGP SIGNATURE----- --FM5zcXyvfv2Qtj+b-- From owner-freebsd-net@FreeBSD.ORG Sun Jun 19 21:26:46 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40F49106566C; Sun, 19 Jun 2011 21:26:46 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9452D8FC15; Sun, 19 Jun 2011 21:26:45 +0000 (UTC) Received: by fxm11 with SMTP id 11so1649846fxm.13 for ; Sun, 19 Jun 2011 14:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:x-comment-to :sender:date:in-reply-to:message-id:user-agent:mime-version :content-type; bh=Cg3KOH3QRUT9rvk4RgWBoCYpxkDW/83BU42cU6Ix6EA=; b=J6DtL2TMaKGR3jNUSfwi7AU5ETORLAPlPq2dO3QNu7bxx9tntl9s5gehUEB/IoVwBP aQJe5YU0yQXWSa8r+A3zChsz6v46xHqh/tNYbHk4TrUaXkXn060hGHxh5hDKbqVfypiA wwK7zshWBJYY+Ao5BM3KOCNODx4zG++Lb4rzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:x-comment-to:sender:date:in-reply-to :message-id:user-agent:mime-version:content-type; b=WiCX/g8VwqNbBe+fRSSuf9m3P79N0S39iOhDQntXnI97+XHS2kcX5GbyYRKWDWAMWC wmdxVh9ngODB2D6TsBPim45DAuPJSEZmrdcTpkepFCsWgkWcOqYGwiD1Fp5a0Ymp4jxl t4o+phIT7mk+3+0LBGUSMh+PdCvlhLAw9eKTE= Received: by 10.223.64.66 with SMTP id d2mr3869365fai.116.1308518804346; Sun, 19 Jun 2011 14:26:44 -0700 (PDT) Received: from localhost ([95.69.173.122]) by mx.google.com with ESMTPS id h1sm2448148fag.11.2011.06.19.14.26.41 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 19 Jun 2011 14:26:42 -0700 (PDT) From: Mikolaj Golub To: Kostik Belousov References: <86pqmhn1pf.fsf@kopusha.home.net> <20110614092303.GG48734@deviant.kiev.zoral.com.ua> <86k4cntwz2.fsf@in138.ua3> <20110619094403.GD48734@deviant.kiev.zoral.com.ua> X-Comment-To: Kostik Belousov Sender: Mikolaj Golub Date: Mon, 20 Jun 2011 00:26:39 +0300 In-Reply-To: <20110619094403.GD48734@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Sun, 19 Jun 2011 12:44:03 +0300") Message-ID: <86r56p7bsg.fsf@kopusha.home.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-net@freebsd.org, Pawel Jakub Dawidek Subject: Re: Scenario to make recv(MSG_WAITALL) stuck 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, 19 Jun 2011 21:26:46 -0000 On Sun, 19 Jun 2011 12:44:03 +0300 Kostik Belousov wrote: KB> On Wed, Jun 15, 2011 at 09:44:33AM +0300, Mikolaj Golub wrote: >> >> On Tue, 14 Jun 2011 12:23:03 +0300 Kostik Belousov wrote: >> >> KB> I do not understand what then happens for the recvfrom(2) call ? >> KB> Would it get some error, or 0 as return and no data, or something else ? >> >> It will wait for data below in another loop ("Now continue to read any data >> mbufs off of the head..."). >> >> Elaborating, I would split soreceive_generic on three logical parts. >> >> In the first (restart) part we block until some data are received and also >> (without the patch) in the case of MSG_WAITALL if the buffer is big enough we >> block until all MSG_WAITALL request is received (actually it will spin in >> "goto restart" loop until some condition becomes invalid). >> >> The second part is some processing of received data and the third part is a >> "while" loop where data is copied to userspace and in the case of MSG_WAITALL >> request if not all data is received to satisfy the request it also waits for >> this data. >> >> My patch removes the condition in the first part in the case of MSG_WAITALL to >> wait for all data if buffer is big enough. We always will wait for the rest of >> data in the third part. It might be not so effective, and this is my first >> concern about the patch (although not big :-). KB> Now I think that this part of the patch is right. KB> The loop in the soreceive_generic() would behave as I would expect KB> it for MSG_WAITALL. It copyout the received data to userspace by KB> received chunks. KB> I do not understand your note about effectiveness there. The old behaviour: if only a part of the request is recived and the buffer is large enough, wait for the rest and then go to processing. The new behaviour: if a part of data is recived, (unconditionally) process it and wait for the rest (and process). The first one looks a little more efficient (but has the issue for edge case with nearly full buffer). -- Mikolaj Golub From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 01:27:51 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44D3D106564A for ; Mon, 20 Jun 2011 01:27:51 +0000 (UTC) (envelope-from grarpamp@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6948FC12 for ; Mon, 20 Jun 2011 01:27:50 +0000 (UTC) Received: by pvg11 with SMTP id 11so1413859pvg.13 for ; Sun, 19 Jun 2011 18:27:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=sRpzzLpRDprzYg81Qic1neq8ytFJGSD8lOIn6sEKOIU=; b=F1Q2bSj5/O8F8cgdiyZP2aGYrkHSBI9dbOdOdWkRt2FYrxOqk5mcNfQ7ztYw8nYEjG n9Up+E8eqb+EcEp9MwWCaayqTE7uddYfqaCPChqe2LK9BSlqGF8fZCoKvBnIac1OTCL5 vH/CjETMYbwQDY4TME7e7NlUTiTVO9QzPxkM0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=DxMXTudIyEzWJOaqFZjPBpAVd+1Pxy3olju4oGc1qwSLechZh8JdCyNu9Ez9D9qDNk EZv8Z33Fovh10PBHiIwVeAnOJ+d22Iu8hEv3NX+fHc6A/fbx/UDqVeHMp9CxHvo7+68A 6pXPyLRzDcTba8c0OIfRqx9ue/w3Ylfinq54k= MIME-Version: 1.0 Received: by 10.142.230.9 with SMTP id c9mr839666wfh.342.1308533270500; Sun, 19 Jun 2011 18:27:50 -0700 (PDT) Received: by 10.142.232.12 with HTTP; Sun, 19 Jun 2011 18:27:50 -0700 (PDT) Date: Sun, 19 Jun 2011 21:27:50 -0400 Message-ID: From: grarpamp To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8 Subject: Re: FreeBSD I/OAT (QuickData now?) driver [10gb pfring silicom] 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, 20 Jun 2011 01:27:51 -0000 Perhaps some similar work here. And maybe a card vendor with docs and an affinity to open source. Just news, that's all. http://www.ntop.org/blog/pf_ring/introducing-the-10-gbit-pf_ring-dna-driver/ bcc: hackers, isp. reply to net. From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 03:42:22 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E98106566C for ; Mon, 20 Jun 2011 03:42:21 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9E5D58FC08 for ; Mon, 20 Jun 2011 03:42:21 +0000 (UTC) Received: by vws18 with SMTP id 18so693636vws.13 for ; Sun, 19 Jun 2011 20:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=lYIsw6rv3k74SCSBQN544kgXLbn/y4PUbpaB8yRJgAU=; b=gkgraocjGg6/TgQaj6HGzQeViEqc8tD2T6Cvu6p/K+7RG1crPkD4c9KcVbIAO2InA4 JlViT0HL+7UOmHd3+PoOe6GCUTSPy71N32lv/7ru+iXJZX+ixu9rCs0cNi+rCOHCwPTp n1MuLuBsF7BnvFt6OPP4wF1XveQLlM8tfIAPw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=H3Be5bIwrqLFKcI+bd5L1b3CdJAkWfELb3mMywgRqiX03wXosUrWkXAsAt8+ZiP0Ms EiHG7q3cmbc0GXkWZJKFcMp1dycJuqRcnBVhgksUFnF7ds1As5Jf2mf+Lfg6qBwDtYYg DmUvnumgCRRXkvHmKTvm27veWIIMdT6Coti8o= MIME-Version: 1.0 Received: by 10.52.32.35 with SMTP id f3mr4723409vdi.267.1308541340510; Sun, 19 Jun 2011 20:42:20 -0700 (PDT) Received: by 10.52.115.138 with HTTP; Sun, 19 Jun 2011 20:42:20 -0700 (PDT) In-Reply-To: References: Date: Sun, 19 Jun 2011 20:42:20 -0700 Message-ID: From: Jack Vogel To: grarpamp Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD I/OAT (QuickData now?) driver [10gb pfring silicom] 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, 20 Jun 2011 03:42:22 -0000 Affinity to open source eh, you mean they repackage Intel hardware and then just use MY drivers, they've been doing it for 1G, and now they're gonna extend their "affinity" to 10G it seems, impressive :) Jack On Sun, Jun 19, 2011 at 6:27 PM, grarpamp wrote: > Perhaps some similar work here. And maybe a card vendor > with docs and an affinity to open source. Just news, that's all. > > > http://www.ntop.org/blog/pf_ring/introducing-the-10-gbit-pf_ring-dna-driver/ > > bcc: hackers, isp. reply to net. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 11:07:07 2011 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39AD3106566B for ; Mon, 20 Jun 2011 11:07:07 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 281618FC1D for ; Mon, 20 Jun 2011 11:07:07 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5KB77KQ098185 for ; Mon, 20 Jun 2011 11:07:07 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5KB76lj098183 for freebsd-net@FreeBSD.org; Mon, 20 Jun 2011 11:07:06 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 20 Jun 2011 11:07:06 GMT Message-Id: <201106201107.p5KB76lj098183@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-net@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-net@FreeBSD.org 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, 20 Jun 2011 11:07:07 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- f kern/157802 net [dummynet] [panic] kernel panic in dummynet o kern/157429 net [re] Realtek RTL8169 doesn't work with re(4) o kern/157418 net [em] em driver lockup during boot on Supermicro X9SCM- o kern/157410 net [ip6] IPv6 Router Advertisements Cause Excessive CPU U o kern/157287 net [re] [panic] INVARIANTS panic (Memory modified after f o kern/157209 net [ip6] [patch] locking error in rip6_input() (sys/netin o kern/157200 net [network.subr] [patch] stf(4) can not communicate betw o kern/157182 net [lagg] lagg interface not working together with epair o kern/156978 net [lagg][patch] Take lagg rlock before checking flags o kern/156877 net [dummynet] [panic] dummynet move_pkt() null ptr derefe o kern/156667 net [em] em0 fails to init on CURRENT after March 17 o kern/156408 net [vlan] Routing failure when using VLANs vs. Physical e o kern/156328 net [icmp]: host can ping other subnet but no have IP from o kern/156317 net [ip6] Wrong order of IPv6 NS DAD/MLD Report o kern/156283 net [ip6] [patch] nd6_ns_input - rtalloc_mpath does not re o kern/156279 net [if_bridge][divert][ipfw] unable to correctly re-injec o kern/156226 net [lagg]: failover does not announce the failover to swi o kern/156030 net [ip6] [panic] Crash in nd6_dad_start() due to null ptr o kern/155772 net ifconfig(8): ioctl (SIOCAIFADDR): File exists on direc o kern/155680 net [multicast] problems with multicast s kern/155642 net [request] Add driver for Realtek RTL8191SE/RTL8192SE W o kern/155604 net [flowtable] Flowtable excessively caches dest MAC addr o kern/155597 net [panic] Kernel panics with "sbdrop" message o kern/155585 net [tcp] [panic] tcp_output tcp_mtudisc loop until kernel o kern/155498 net [ral] ral(4) needs to be resynced with OpenBSD's to ga o kern/155420 net [vlan] adding vlan break existent vlan o bin/155365 net [patch] routed(8): if.c in routed fails to compile if o kern/155177 net [route] [panic] Panic when inject routes in kernel o kern/155030 net [igb] igb(4) DEVICE_POLLING does not work with carp(4) o kern/155010 net [msk] ntfs-3g via iscsi using msk driver cause kernel o kern/155004 net [bce] [panic] kernel panic in bce0 driver o kern/154943 net [gif] ifconfig gifX create on existing gifX clears IP s kern/154851 net [request]: Port brcm80211 driver from Linux to FreeBSD o kern/154850 net [netgraph] [patch] ng_ether fails to name nodes when t o kern/154831 net [arp] [patch] arp sysctl setting log_arp_permanent_mod o kern/154679 net [em] Fatal trap 12: "em1 taskq" only at startup (8.1-R o kern/154600 net [tcp] [panic] Random kernel panics on tcp_output o kern/154557 net [tcp] Freeze tcp-session of the clients, if in the gat o kern/154443 net [if_bridge] Kernel module bridgestp.ko missing after u o kern/154286 net [netgraph] [panic] 8.2-PRERELEASE panic in netgraph o kern/154255 net [nfs] NFS not responding o kern/154214 net [stf] [panic] Panic when creating stf interface o kern/154185 net race condition in mb_dupcl o kern/154169 net [multicast] [ip6] Node Information Query multicast add o kern/154134 net [ip6] stuck kernel state in LISTEN on ipv6 daemon whic o kern/154091 net [netgraph] [panic] netgraph, unaligned mbuf? o conf/154062 net [vlan] [patch] change to way of auto-generatation of v o kern/153937 net [ral] ralink panics the system (amd64 freeBSDD 8.X) wh o kern/153936 net [ixgbe] [patch] MPRC workaround incorrectly applied to o kern/153816 net [ixgbe] ixgbe doesn't work properly with the Intel 10g o kern/153772 net [ixgbe] [patch] sysctls reference wrong XON/XOFF varia o kern/153497 net [netgraph] netgraph panic due to race conditions o kern/153454 net [patch] [wlan] [urtw] Support ad-hoc and hostap modes o kern/153308 net [em] em interface use 100% cpu o kern/153244 net [em] em(4) fails to send UDP to port 0xffff o kern/152893 net [netgraph] [panic] 8.2-PRERELEASE panic in netgraph o kern/152853 net [em] tftpd (and likely other udp traffic) fails over e o kern/152828 net [em] poor performance on 8.1, 8.2-PRE o kern/152569 net [net]: Multiple ppp connections and routing table prob o kern/152235 net [arp] Permanent local ARP entries are not properly upd o kern/152141 net [vlan] [patch] encapsulate vlan in ng_ether before out o kern/151690 net [ep] network connectivity won't work until dhclient is o kern/151681 net [nfs] NFS mount via IPv6 leads to hang on client with o kern/151593 net [igb] [panic] Kernel panic when bringing up igb networ o kern/150920 net [ixgbe][igb] Panic when packets are dropped with heade o bin/150642 net netstat(1) doesn't print anything for SCTP sockets o kern/150557 net [igb] igb0: Watchdog timeout -- resetting o kern/150251 net [patch] [ixgbe] Late cable insertion broken o kern/150249 net [ixgbe] Media type detection broken o bin/150224 net ppp(8) does not reassign static IP after kill -KILL co f kern/149969 net [wlan] [ral] ralink rt2661 fails to maintain connectio o kern/149937 net [ipfilter] [patch] kernel panic in ipfilter IP fragmen o kern/149643 net [rum] device not sending proper beacon frames in ap mo o kern/149609 net [panic] reboot after adding second default route o kern/149117 net [inet] [patch] in_pcbbind: redundant test o kern/149086 net [multicast] Generic multicast join failure in 8.1 o kern/148018 net [flowtable] flowtable crashes on ia64 o kern/147912 net [boot] FreeBSD 8 Beta won't boot on Thinkpad i1300 11 o kern/147894 net [ipsec] IPv6-in-IPv4 does not work inside an ESP-only o kern/147155 net [ip6] setfb not work with ipv6 o kern/146845 net [libc] close(2) returns error 54 (connection reset by f kern/146792 net [flowtable] flowcleaner 100% cpu's core load o kern/146719 net [pf] [panic] PF or dumynet kernel panic o kern/146534 net [icmp6] wrong source address in echo reply o kern/146427 net [mwl] Additional virtual access points don't work on m o kern/146426 net [mwl] 802.11n rates not possible on mwl o kern/146425 net [mwl] mwl dropping all packets during and after high u f kern/146394 net [vlan] IP source address for outgoing connections o bin/146377 net [ppp] [tun] Interface doesn't clear addresses when PPP o kern/146358 net [vlan] wrong destination MAC address o kern/146165 net [wlan] [panic] Setting bssid in adhoc mode causes pani o kern/146082 net [ng_l2tp] a false invaliant check was performed in ng_ o kern/146037 net [panic] mpd + CoA = kernel panic o bin/145934 net [patch] add count option to netstat(1) o kern/145825 net [panic] panic: soabort: so_count o kern/145728 net [lagg] Stops working lagg between two servers. f kern/144917 net [flowtable] [panic] flowtable crashes system [regressi o kern/144882 net MacBookPro =>4.1 does not connect to BSD in hostap wit o kern/144874 net [if_bridge] [patch] if_bridge frees mbuf after pfil ho o conf/144700 net [rc.d] async dhclient breaks stuff for too many people o kern/144616 net [nat] [panic] ip_nat panic FreeBSD 7.2 o kern/144572 net [carp] CARP preemption mode traffic partially goes to f kern/144315 net [ipfw] [panic] freebsd 8-stable reboot after add ipfw o kern/144231 net bind/connect/sendto too strict about sockaddr length o kern/143939 net [ipfw] [em] ipfw nat and em interface rxcsum problem o kern/143846 net [gif] bringing gif3 tunnel down causes gif0 tunnel to s kern/143673 net [stf] [request] there should be a way to support multi s kern/143666 net [ip6] [request] PMTU black hole detection not implemen o kern/143622 net [pfil] [patch] unlock pfil lock while calling firewall o kern/143593 net [ipsec] When using IPSec, tcpdump doesn't show outgoin o kern/143591 net [ral] RT2561C-based DLink card (DWL-510) fails to work o kern/143208 net [ipsec] [gif] IPSec over gif interface not working o kern/143034 net [panic] system reboots itself in tcp code [regression] o kern/142877 net [hang] network-related repeatable 8.0-STABLE hard hang o kern/142774 net Problem with outgoing connections on interface with mu o kern/142772 net [libc] lla_lookup: new lle malloc failed o kern/142018 net [iwi] [patch] Possibly wrong interpretation of beacon- o kern/141861 net [wi] data garbled with WEP and wi(4) with Prism 2.5 f kern/141741 net Etherlink III NIC won't work after upgrade to FBSD 8, o kern/141023 net [carp] CARP arp replays with wrong src mac o kern/140742 net rum(4) Two asus-WL167G adapters cannot talk to each ot o kern/140682 net [netgraph] [panic] random panic in netgraph o kern/140634 net [vlan] destroying if_lagg interface with if_vlan membe o kern/140619 net [ifnet] [patch] refine obsolete if_var.h comments desc o kern/140346 net [wlan] High bandwidth use causes loss of wlan connecti o kern/140142 net [ip6] [panic] FreeBSD 7.2-amd64 panic w/IPv6 o kern/140066 net [bwi] install report for 8.0 RC 2 (multiple problems) o kern/139565 net [ipfilter] ipfilter ioctl SIOCDELST broken o kern/139387 net [ipsec] Wrong lenth of PF_KEY messages in promiscuous o bin/139346 net [patch] arp(8) add option to remove static entries lis o kern/139268 net [if_bridge] [patch] allow if_bridge to forward just VL p kern/139204 net [arp] DHCP server replies rejected, ARP entry lost bef o kern/139117 net [lagg] + wlan boot timing (EBUSY) o kern/139058 net [ipfilter] mbuf cluster leak on FreeBSD 7.2 o kern/138850 net [dummynet] dummynet doesn't work correctly on a bridge o kern/138782 net [panic] sbflush_internal: cc 0 || mb 0xffffff004127b00 o kern/138688 net [rum] possibly broken on 8 Beta 4 amd64: able to wpa a o kern/138678 net [lo] FreeBSD does not assign linklocal address to loop o kern/138620 net [lagg] [patch] lagg port bpf-writes blocked o kern/138407 net [gre] gre(4) interface does not come up after reboot o kern/138332 net [tun] [lor] ifconfig tun0 destroy causes LOR if_adata/ o kern/138266 net [panic] kernel panic when udp benchmark test used as r o kern/138177 net [ipfilter] FreeBSD crashing repeatedly in ip_nat.c:257 o kern/137881 net [netgraph] [panic] ng_pppoe fatal trap 12 o bin/137841 net [patch] wpa_supplicant(8) cannot verify SHA256 signed p kern/137776 net [rum] panic in rum(4) driver on 8.0-BETA2 o bin/137641 net ifconfig(8): various problems with "vlan_device.vlan_i o kern/137392 net [ip] [panic] crash in ip_nat.c line 2577 o kern/137372 net [ral] FreeBSD doesn't support wireless interface from o kern/137089 net [lagg] lagg falsely triggers IPv6 duplicate address de o bin/136994 net [patch] ifconfig(8) print carp mac address o kern/136911 net [netgraph] [panic] system panic on kldload ng_bpf.ko t o bin/136661 net [patch] ndp(8) ignores -f option o kern/136618 net [pf][stf] panic on cloning interface without unit numb o kern/136426 net [panic] spawning several dhclients in parallel panics o kern/135502 net [periodic] Warning message raised by rtfree function i o kern/134931 net [route] Route messages sent to all socket listeners re o kern/134583 net [hang] Machine with jail freezes after random amount o o kern/134531 net [route] [panic] kernel crash related to routes/zebra o kern/134157 net [dummynet] dummynet loads cpu for 100% and make a syst o kern/133969 net [dummynet] [panic] Fatal trap 12: page fault while in o kern/133968 net [dummynet] [panic] dummynet kernel panic o kern/133736 net [udp] ip_id not protected ... o kern/133595 net [panic] Kernel Panic at pcpu.h:195 o kern/133572 net [ppp] [hang] incoming PPTP connection hangs the system o kern/133490 net [bpf] [panic] 'kmem_map too small' panic on Dell r900 o kern/133235 net [netinet] [patch] Process SIOCDLIFADDR command incorre o kern/133218 net [carp] [hang] use of carp(4) causes system to freeze f kern/133213 net arp and sshd errors on 7.1-PRERELEASE o kern/133060 net [ipsec] [pfsync] [panic] Kernel panic with ipsec + pfs o kern/132889 net [ndis] [panic] NDIS kernel crash on load BCM4321 AGN d o conf/132851 net [patch] rc.conf(5): allow to setfib(1) for service run o kern/132734 net [ifmib] [panic] panic in net/if_mib.c o kern/132705 net [libwrap] [patch] libwrap - infinite loop if hosts.all o kern/132672 net [ndis] [panic] ndis with rt2860.sys causes kernel pani o kern/132554 net [ipl] There is no ippool start script/ipfilter magic t o kern/132354 net [nat] Getting some packages to ipnat(8) causes crash o kern/132285 net [carp] alias gives incorrect hash in dmesg o kern/132277 net [crypto] [ipsec] poor performance using cryptodevice f o kern/132107 net [carp] carp(4) advskew setting ignored when carp IP us o kern/131781 net [ndis] ndis keeps dropping the link o kern/131776 net [wi] driver fails to init o kern/131753 net [altq] [panic] kernel panic in hfsc_dequeue o kern/131601 net [ipfilter] [panic] 7-STABLE panic in nat_finalise (tcp o bin/131567 net [socket] [patch] Update for regression/sockets/unix_cm o bin/131365 net route(8): route add changes interpretation of network f kern/130820 net [ndis] wpa_supplicant(8) returns 'no space on device' o kern/130628 net [nfs] NFS / rpc.lockd deadlock on 7.1-R o conf/130555 net [rc.d] [patch] No good way to set ipfilter variables a o kern/130525 net [ndis] [panic] 64 bit ar5008 ndisgen-erated driver cau o kern/130311 net [wlan_xauth] [panic] hostapd restart causing kernel pa o kern/130109 net [ipfw] Can not set fib for packets originated from loc f kern/130059 net [panic] Leaking 50k mbufs/hour f kern/129719 net [nfs] [panic] Panic during shutdown, tcp_ctloutput: in o kern/129517 net [ipsec] [panic] double fault / stack overflow o kern/129508 net [carp] [panic] Kernel panic with EtherIP (may be relat o kern/129219 net [ppp] Kernel panic when using kernel mode ppp o kern/129197 net [panic] 7.0 IP stack related panic o bin/128954 net ifconfig(8) deletes valid routes o bin/128602 net [an] wpa_supplicant(8) crashes with an(4) o kern/128448 net [nfs] 6.4-RC1 Boot Fails if NFS Hostname cannot be res o conf/128334 net [request] use wpa_cli in the "WPA DHCP" situation o bin/128295 net [patch] ifconfig(8) does not print TOE4 or TOE6 capabi o bin/128001 net wpa_supplicant(8), wlan(4), and wi(4) issues o kern/127826 net [iwi] iwi0 driver has reduced performance and connecti o kern/127815 net [gif] [patch] if_gif does not set vlan attributes from o kern/127724 net [rtalloc] rtfree: 0xc5a8f870 has 1 refs f bin/127719 net [arp] arp: Segmentation fault (core dumped) f kern/127528 net [icmp]: icmp socket receives icmp replies not owned by p kern/127360 net [socket] TOE socket options missing from sosetopt() o bin/127192 net routed(8) removes the secondary alias IP of interface f kern/127145 net [wi]: prism (wi) driver crash at bigger traffic o kern/127057 net [udp] Unable to send UDP packet via IPv6 socket to IPv o kern/127050 net [carp] ipv6 does not work on carp interfaces [regressi o kern/126945 net [carp] CARP interface destruction with ifconfig destro o kern/126895 net [patch] [ral] Add antenna selection (marked as TBD) o kern/126874 net [vlan]: Zebra problem if ifconfig vlanX destroy o kern/126714 net [carp] CARP interface renaming makes system no longer o kern/126695 net rtfree messages and network disruption upon use of if_ o kern/126339 net [ipw] ipw driver drops the connection o kern/126075 net [inet] [patch] internet control accesses beyond end of o bin/125922 net [patch] Deadlock in arp(8) o kern/125920 net [arp] Kernel Routing Table loses Ethernet Link status o kern/125845 net [netinet] [patch] tcp_lro_rx() should make use of hard o kern/125816 net [carp] [if_bridge] carp stuck in init when using bridg f kern/125442 net [carp] [lagg] CARP combined with LAGG causes system pa o kern/125258 net [socket] socket's SO_REUSEADDR option does not work o kern/125239 net [gre] kernel crash when using gre o kern/124341 net [ral] promiscuous mode for wireless device ral0 looses o kern/124225 net [ndis] [patch] ndis network driver sometimes loses net o kern/124160 net [libc] connect(2) function loops indefinitely o kern/124021 net [ip6] [panic] page fault in nd6_output() o kern/123968 net [rum] [panic] rum driver causes kernel panic with WPA. o kern/123892 net [tap] [patch] No buffer space available o kern/123890 net [ppp] [panic] crash & reboot on work with PPP low-spee o kern/123858 net [stf] [patch] stf not usable behind a NAT o kern/123796 net [ipf] FreeBSD 6.1+VPN+ipnat+ipf: port mapping does not o kern/123758 net [panic] panic while restarting net/freenet6 o bin/123633 net ifconfig(8) doesn't set inet and ether address in one o kern/123559 net [iwi] iwi periodically disassociates/associates [regre o bin/123465 net [ip6] route(8): route add -inet6 -interfac o kern/123463 net [ipsec] [panic] repeatable crash related to ipsec-tool o conf/123330 net [nsswitch.conf] Enabling samba wins in nsswitch.conf c o kern/123160 net [ip] Panic and reboot at sysctl kern.polling.enable=0 f kern/123045 net [ng_mppc] ng_mppc_decompress - disabling node o kern/122989 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/122954 net [lagg] IPv6 EUI64 incorrectly chosen for lagg devices f kern/122780 net [lagg] tcpdump on lagg interface during high pps wedge o kern/122685 net It is not visible passing packets in tcpdump(1) o kern/122319 net [wi] imposible to enable ad-hoc demo mode with Orinoco o kern/122290 net [netgraph] [panic] Netgraph related "kmem_map too smal o kern/122033 net [ral] [lor] Lock order reversal in ral0 at bootup ieee o bin/121895 net [patch] rtsol(8)/rtsold(8) doesn't handle managed netw s kern/121774 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/121555 net [panic] Fatal trap 12: current process = 12 (swi1: net o kern/121443 net [gif] [lor] icmp6_input/nd6_lookup o kern/121437 net [vlan] Routing to layer-2 address does not work on VLA o bin/121359 net [patch] [security] ppp(8): fix local stack overflow in o kern/121257 net [tcp] TSO + natd -> slow outgoing tcp traffic o kern/121181 net [panic] Fatal trap 3: breakpoint instruction fault whi o kern/120966 net [rum] kernel panic with if_rum and WPA encryption o kern/120566 net [request]: ifconfig(8) make order of arguments more fr o kern/120304 net [netgraph] [patch] netgraph source assumes 32-bit time o kern/120266 net [udp] [panic] gnugk causes kernel panic when closing U o kern/120130 net [carp] [panic] carp causes kernel panics in any conste o bin/120060 net routed(8) deletes link-level routes in the presence of o kern/119945 net [rum] [panic] rum device in hostap mode, cause kernel o kern/119791 net [nfs] UDP NFS mount of aliased IP addresses from a Sol o kern/119617 net [nfs] nfs error on wpa network when reseting/shutdown f kern/119516 net [ip6] [panic] _mtx_lock_sleep: recursed on non-recursi o kern/119432 net [arp] route add -host -iface causes arp e o kern/119225 net [wi] 7.0-RC1 no carrier with Prism 2.5 wifi card [regr o kern/118727 net [netgraph] [patch] [request] add new ng_pf module o kern/117448 net [carp] 6.2 kernel crash [regression] o kern/117423 net [vlan] Duplicate IP on different interfaces o bin/117339 net [patch] route(8): loading routing management commands o kern/117271 net [tap] OpenVPN TAP uses 99% CPU on releng_6 when if_tap o bin/116643 net [patch] [request] fstat(1): add INET/INET6 socket deta o kern/116185 net [iwi] if_iwi driver leads system to reboot o kern/115239 net [ipnat] panic with 'kmem_map too small' using ipnat o kern/115019 net [netgraph] ng_ether upper hook packet flow stops on ad o kern/115002 net [wi] if_wi timeout. failed allocation (busy bit). ifco o kern/114915 net [patch] [pcn] pcn (sys/pci/if_pcn.c) ethernet driver f o kern/113432 net [ucom] WARNING: attempt to net_add_domain(netgraph) af o kern/112722 net [ipsec] [udp] IP v4 udp fragmented packet reject o kern/112686 net [patm] patm driver freezes System (FreeBSD 6.2-p4) i38 o bin/112557 net [patch] ppp(8) lock file should not use symlink name o kern/112528 net [nfs] NFS over TCP under load hangs with "impossible p o kern/111537 net [inet6] [patch] ip6_input() treats mbuf cluster wrong o kern/111457 net [ral] ral(4) freeze o kern/110284 net [if_ethersubr] Invalid Assumption in SIOCSIFADDR in et o kern/110249 net [kernel] [regression] [patch] setsockopt() error regre o kern/109470 net [wi] Orinoco Classic Gold PC Card Can't Channel Hop o kern/109308 net [pppd] [panic] Multiple panics kernel ppp suspected [r o bin/108895 net pppd(8): PPPoE dead connections on 6.2 [regression] o kern/107944 net [wi] [patch] Forget to unlock mutex-locks o conf/107035 net [patch] bridge(8): bridge interface given in rc.conf n o kern/106444 net [netgraph] [panic] Kernel Panic on Binding to an ip to o kern/106438 net [ipf] ipfilter: keep state does not seem to allow repl o kern/106316 net [dummynet] dummynet with multipass ipfw drops packets o kern/105945 net Address can disappear from network interface s kern/105943 net Network stack may modify read-only mbuf chain copies o bin/105925 net problems with ifconfig(8) and vlan(4) [regression] o kern/104851 net [inet6] [patch] On link routes not configured when usi o kern/104751 net [netgraph] kernel panic, when getting info about my tr o kern/103191 net Unpredictable reboot o kern/103135 net [ipsec] ipsec with ipfw divert (not NAT) encodes a pac o kern/102540 net [netgraph] [patch] supporting vlan(4) by ng_fec(4) o conf/102502 net [netgraph] [patch] ifconfig name does't rename netgrap o kern/102035 net [plip] plip networking disables parallel port printing o kern/101948 net [ipf] [panic] Kernel Panic Trap No 12 Page Fault - cau o kern/100709 net [libc] getaddrinfo(3) should return TTL info o kern/100519 net [netisr] suggestion to fix suboptimal network polling o kern/98978 net [ipf] [patch] ipfilter drops OOW packets under 6.1-Rel o kern/98597 net [inet6] Bug in FreeBSD 6.1 IPv6 link-local DAD procedu o bin/98218 net wpa_supplicant(8) blacklist not working o kern/97306 net [netgraph] NG_L2TP locks after connection with failed o conf/97014 net [gif] gifconfig_gif? in rc.conf does not recognize IPv f kern/96268 net [socket] TCP socket performance drops by 3000% if pack o kern/95519 net [ral] ral0 could not map mbuf o kern/95288 net [pppd] [tty] [panic] if_ppp panic in sys/kern/tty_subr o kern/95277 net [netinet] [patch] IP Encapsulation mask_match() return o kern/95267 net packet drops periodically appear f kern/93378 net [tcp] Slow data transfer in Postfix and Cyrus IMAP (wo o kern/93019 net [ppp] ppp and tunX problems: no traffic after restarti o kern/92880 net [libc] [patch] almost rewritten inet_network(3) functi s kern/92279 net [dc] Core faults everytime I reboot, possible NIC issu o kern/91859 net [ndis] if_ndis does not work with Asus WL-138 s kern/91777 net [ipf] [patch] wrong behaviour with skip rule inside an o kern/91364 net [ral] [wep] WF-511 RT2500 Card PCI and WEP o kern/91311 net [aue] aue interface hanging s kern/90086 net [hang] 5.4p8 on supermicro P8SCT hangs during boot if o kern/87521 net [ipf] [panic] using ipfilter "auth" keyword leads to k o kern/87421 net [netgraph] [panic]: ng_ether + ng_eiface + if_bridge s kern/86920 net [ndis] ifconfig: SIOCS80211: Invalid argument [regress o kern/86871 net [tcp] [patch] allocation logic for PCBs in TIME_WAIT s o kern/86427 net [lor] Deadlock with FASTIPSEC and nat o kern/86103 net [ipf] Illegal NAT Traversal in IPFilter o kern/85780 net 'panic: bogus refcnt 0' in routing/ipv6 o bin/85445 net ifconfig(8): deprecated keyword to ifconfig inoperativ p kern/85320 net [gre] [patch] possible depletion of kernel stack in ip o bin/82975 net route change does not parse classfull network as given o kern/82881 net [netgraph] [panic] ng_fec(4) causes kernel panic after o kern/82468 net Using 64MB tcp send/recv buffers, trafficflow stops, i o bin/82185 net [patch] ndp(8) can delete the incorrect entry o kern/81095 net IPsec connection stops working if associated network i o kern/79895 net [ipf] 5.4-RC2 breaks ipfilter NAT when using netgraph o kern/78968 net FreeBSD freezes on mbufs exhaustion (network interface o kern/78090 net [ipf] ipf filtering on bridged packets doesn't work if o kern/77341 net [ip6] problems with IPV6 implementation o kern/77273 net [ipf] ipfilter breaks ipv6 statefull filtering on 5.3 s kern/77195 net [ipf] [patch] ipfilter ioctl SIOCGNATL does not match o kern/75873 net Usability problem with non-RFC-compliant IP spoof prot s kern/75407 net [an] an(4): no carrier after short time a kern/71474 net [route] route lookup does not skip interfaces marked d o kern/71469 net default route to internet magically disappears with mu o kern/70904 net [ipf] ipfilter ipnat problem with h323 proxy support o kern/68889 net [panic] m_copym, length > size of mbuf chain o kern/66225 net [netgraph] [patch] extend ng_eiface(4) control message o kern/65616 net IPSEC can't detunnel GRE packets after real ESP encryp s kern/60293 net [patch] FreeBSD arp poison patch a kern/56233 net IPsec tunnel (ESP) over IPv6: MTU computation is wrong o kern/54383 net [nfs] [patch] NFS root configurations without dynamic s bin/41647 net ifconfig(8) doesn't accept lladdr along with inet addr s kern/39937 net ipstealth issue a kern/38554 net [patch] changing interface ipaddress doesn't seem to w o kern/34665 net [ipf] [hang] ipfilter rcmd proxy "hangs". o kern/31940 net ip queue length too short for >500kpps o kern/31647 net [libc] socket calls can return undocumented EINVAL o kern/30186 net [libc] getaddrinfo(3) does not handle incorrect servna o kern/27474 net [ipf] [ppp] Interactive use of user PPP and ipfilter c f kern/24959 net [patch] proper TCP_NOPUSH/TCP_CORK compatibility o conf/23063 net [arp] [patch] for static ARP tables in rc.network o kern/21998 net [socket] [patch] ident only for outgoing connections o kern/5877 net [socket] sb_cc counts control data as well as data dat 375 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 18:27:33 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0CA21065678 for ; Mon, 20 Jun 2011 18:27:33 +0000 (UTC) (envelope-from rganascim@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4FAD58FC0C for ; Mon, 20 Jun 2011 18:27:32 +0000 (UTC) Received: by bwz12 with SMTP id 12so2677878bwz.13 for ; Mon, 20 Jun 2011 11:27:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=GJBbDGnWToK0ikp6gYdjQ1FG/bwW4Hg6S3TORMki7t0=; b=HvCH1Z2yUA8485Lg87N35dwYMNS3SZI+KePgInGBEG7iVBF6asnOvakU8/EPbsIUFt 5HIPuDHkGTicvFNtzwk6RPot1vlGLifDLavxD4OujI3+bqla93Ogu5ocQijGAFo4fSCK Cy7Cdv0Z84zd3OPd83eEeY2c9cv4DM7Qpce60= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TgL/SY+0dXPoeA7b98CQdYe0GicXJTPymF+r9UZeraMtXzw/z5UX+j8yS2NClwuQoN HjoV66RfapdCXESeH2Q026y7ny/xgLWBX7nKuN3EmkqOy9guh58FJYqWwIi0+rsI8wIz cjsENhB3TVVhEWZAki+vZonpoRhZJ3MOdZGO4= MIME-Version: 1.0 Received: by 10.204.10.75 with SMTP id o11mr2771440bko.124.1308593007930; Mon, 20 Jun 2011 11:03:27 -0700 (PDT) Received: by 10.205.64.196 with HTTP; Mon, 20 Jun 2011 11:03:27 -0700 (PDT) Date: Mon, 20 Jun 2011 15:03:27 -0300 Message-ID: From: Rafael Ganascim To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Carp vhid with vlan id's alignment 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, 20 Jun 2011 18:27:33 -0000 Hi list, I'm planning and testing a new FreeBSD router, with vlans and carp interfaces. There are a lot of vlans, with high vlan IDs. We have, for example: dot1q vlan id: 1530 Iface igb0 vlan1530 carp1530 vhid 10 What do you think in change the carp code to support vhid above 255 (just to align with vlanid, carp vlan name)? I think that it can ease the troubleshooting, standardization and documentation (in this scenario). It's the last piece of the complete 'id' alignment. But I don't know the impact of this change in the source codes (and related, like the ifconfig). What do you think? Regards, Rafael From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 20:14:36 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8097106564A for ; Mon, 20 Jun 2011 20:14:36 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from no.spam.no.ddos.ru (no.spam.no.ddos.ru [IPv6:2a02:978:2:1000::3]) by mx1.freebsd.org (Postfix) with ESMTP id 7671B8FC14 for ; Mon, 20 Jun 2011 20:14:36 +0000 (UTC) Received: from ws.su29.net (v6.mpls.in [IPv6:2a02:978:2::5]) by no.spam.no.ddos.ru (Postfix) with ESMTPA id 7666D38387B; Tue, 21 Jun 2011 00:12:47 +0400 (MSD) Message-ID: <4DFFA9C1.1060702@ipfw.ru> Date: Tue, 21 Jun 2011 00:12:49 +0400 From: "Alexander V. Chernikov" User-Agent: Thunderbird 2.0.0.24 (X11/20100515) MIME-Version: 1.0 To: Rafael Ganascim References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Carp vhid with vlan id's alignment 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, 20 Jun 2011 20:14:37 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rafael Ganascim wrote: > Hi list, > > I'm planning and testing a new FreeBSD router, with vlans and carp > interfaces. There are a lot of vlans, with high vlan IDs. We have, for > example: > > dot1q vlan id: 1530 > > Iface igb0 > vlan1530 > carp1530 > vhid 10 > > What do you think in change the carp code to support vhid above 255 (just to > align with vlanid, carp vlan name)? I think that it can ease the > troubleshooting, standardization and documentation (in this scenario). It's > the last piece of the complete 'id' alignment. 1) CARP packet format uses 8bit for VHID (see sys/netinet/ip_carp.h for packet format) 2) Making carp instance for every vlan is (generally) wrong design. Making single carp instance for group of interfaces (and creating/deleting vlans depending carp instance state) is more preferable in most cases. You can get state change events for carp(4) interfaces via devd(8). Moreover, every carp instance sends multicast packets every 1 second + several milliseconds in default scenario. This means a lot of multicast traffic in case of many instances which can confuse other devices (or another carp implementations like ucarp). > > But I don't know the impact of this change in the source codes (and related, > like the ifconfig). > > What do you think? > > > Regards, > > Rafael > _______________________________________________ > 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" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3/qcEACgkQwcJ4iSZ1q2mtcACeNpQ41hiwDNz8BYfSoMTFvWX6 9dIAn12p6WHaPZ2UdWJz6r5YUEvbLygF =Qdjl -----END PGP SIGNATURE----- From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 20:35:25 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E62A106564A for ; Mon, 20 Jun 2011 20:35:25 +0000 (UTC) (envelope-from rganascim@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C205E8FC17 for ; Mon, 20 Jun 2011 20:35:24 +0000 (UTC) Received: by bwz12 with SMTP id 12so2802838bwz.13 for ; Mon, 20 Jun 2011 13:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=u5QiXgkNbA7gkvLwaN5nmE+Ajoq3tWkUGdxdItrv+sg=; b=FxZyqJTfRrgWSS/LhVvCWLzQFKKbc2gMJ4WGaRGIILVniX0sIFw1VHhY76xnuRxg5C t02OAFJUlijNCBBuJGknyq6fSrL6DlAp3fWW2UmMtQR8Ut5M8Ka9TbpNLJ/eiU/J6Zmo Dw1NClQxts+59EzriFYbviPW0JQpmqGRhGnek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=ETGByzJ/RAoid18erXvD6h4Bz82s1ismmbFlvmccv85AUfL3Qxo1/SrA6cog5U1plr m5OnWENwqtQx8a6ry+529sCAU3lduHoAWO8EymZeUTZHIj86CXNYka21J4Mfb1NSRHRc 2vNry7+7VGxVv+JAUrDtwZEEDuXDt0jcGFt+s= MIME-Version: 1.0 Received: by 10.204.36.129 with SMTP id t1mr4386584bkd.97.1308602122374; Mon, 20 Jun 2011 13:35:22 -0700 (PDT) Received: by 10.205.64.196 with HTTP; Mon, 20 Jun 2011 13:35:22 -0700 (PDT) In-Reply-To: <4DFFA9C1.1060702@ipfw.ru> References: <4DFFA9C1.1060702@ipfw.ru> Date: Mon, 20 Jun 2011 17:35:22 -0300 Message-ID: From: Rafael Ganascim To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Carp vhid with vlan id's alignment 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, 20 Jun 2011 20:35:25 -0000 1) I had seen the source code, and the doubt was about modifying it to support 4096 vlans (12 bits) 2) I don't understand this type of implementation. May you explain? How obtain the fault-tolerance and HA with this? Or load balancing? Thanks! 2011/6/20 Alexander V. Chernikov > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Rafael Ganascim wrote: > > Hi list, > > > > I'm planning and testing a new FreeBSD router, with vlans and carp > > interfaces. There are a lot of vlans, with high vlan IDs. We have, for > > example: > > > > dot1q vlan id: 1530 > > > > Iface igb0 > > vlan1530 > > carp1530 > > vhid 10 > > > > What do you think in change the carp code to support vhid above 255 (just > to > > align with vlanid, carp vlan name)? I think that it can ease the > > troubleshooting, standardization and documentation (in this scenario). > It's > > the last piece of the complete 'id' alignment. > 1) CARP packet format uses 8bit for VHID (see sys/netinet/ip_carp.h for > packet format) > > 2) Making carp instance for every vlan is (generally) wrong design. > Making single carp instance for group of interfaces (and > creating/deleting vlans depending carp instance state) is more > preferable in most cases. You can get state change events for carp(4) > interfaces via devd(8). > > Moreover, every carp instance sends multicast packets every 1 second + > several milliseconds in default scenario. This means a lot of multicast > traffic in case of many instances which can confuse other devices (or > another carp implementations like ucarp). > > > > > But I don't know the impact of this change in the source codes (and > related, > > like the ifconfig). > > > > What do you think? > > > > > > Regards, > > > > Rafael > > _______________________________________________ > > 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" > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.14 (FreeBSD) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAk3/qcEACgkQwcJ4iSZ1q2mtcACeNpQ41hiwDNz8BYfSoMTFvWX6 > 9dIAn12p6WHaPZ2UdWJz6r5YUEvbLygF > =Qdjl > -----END PGP SIGNATURE----- > From owner-freebsd-net@FreeBSD.ORG Mon Jun 20 22:18:36 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015C4106566B for ; Mon, 20 Jun 2011 22:18:36 +0000 (UTC) (envelope-from melifaro@ipfw.ru) Received: from no.spam.no.ddos.ru (no.spam.no.ddos.ru [IPv6:2a02:978:2:1000::3]) by mx1.freebsd.org (Postfix) with ESMTP id 82AD78FC0C for ; Mon, 20 Jun 2011 22:18:35 +0000 (UTC) Received: from ws.su29.net (v6.mpls.in [IPv6:2a02:978:2::5]) by no.spam.no.ddos.ru (Postfix) with ESMTPA id 545B7383D67; Tue, 21 Jun 2011 02:16:48 +0400 (MSD) Message-ID: <4DFFC6D2.6070001@ipfw.ru> Date: Tue, 21 Jun 2011 02:16:50 +0400 From: "Alexander V. Chernikov" User-Agent: Thunderbird 2.0.0.24 (X11/20100515) MIME-Version: 1.0 To: Rafael Ganascim References: <4DFFA9C1.1060702@ipfw.ru> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Carp vhid with vlan id's alignment 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, 20 Jun 2011 22:18:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Rafael Ganascim wrote: > 1) I had seen the source code, and the doubt was about modifying it to > support 4096 vlans (12 bits) > > 2) I don't understand this type of implementation. May you explain? How > obtain the fault-tolerance and HA with this? Or load balancing? Carp interface is used mostly as detection mechanism. When master failure is detected, script is called via devd. I'm using the following solution: small script based on rc.network stuff parses rc.conf style vlans.conf file, generating cloned_interfaces and static_routes string and then running typical procedures for vlan creation/address assignment. After that, arp-sk runs on every interface announcing new MAC address. All related configuration files are synced via VCS on every node. This scheme runs on production routers with several hundred interfaces without any major issues. However, there are some things that should be avoided (like some devd /etc/pccard-ether hook). Switching time seems to be 3 seconds (carp) + 2-3 seconds for vlans startup and mac address change I'm not sure if you really need LB on > 255 links, maybe this can be done some other way? > > Thanks! > > 2011/6/20 Alexander V. Chernikov > > Rafael Ganascim wrote: >>>> Hi list, >>>> >>>> I'm planning and testing a new FreeBSD router, with vlans and carp >>>> interfaces. There are a lot of vlans, with high vlan IDs. We have, for >>>> example: >>>> >>>> dot1q vlan id: 1530 >>>> >>>> Iface igb0 >>>> vlan1530 >>>> carp1530 >>>> vhid 10 >>>> >>>> What do you think in change the carp code to support vhid above 255 (just > to >>>> align with vlanid, carp vlan name)? I think that it can ease the >>>> troubleshooting, standardization and documentation (in this scenario). > It's >>>> the last piece of the complete 'id' alignment. > 1) CARP packet format uses 8bit for VHID (see sys/netinet/ip_carp.h for > packet format) > > 2) Making carp instance for every vlan is (generally) wrong design. > Making single carp instance for group of interfaces (and > creating/deleting vlans depending carp instance state) is more > preferable in most cases. You can get state change events for carp(4) > interfaces via devd(8). > > Moreover, every carp instance sends multicast packets every 1 second + > several milliseconds in default scenario. This means a lot of multicast > traffic in case of many instances which can confuse other devices (or > another carp implementations like ucarp). > >>>> But I don't know the impact of this change in the source codes (and > related, >>>> like the ifconfig). >>>> >>>> What do you think? >>>> >>>> >>>> Regards, >>>> >>>> Rafael >>>> _______________________________________________ >>>> freebsd-net@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-net >>>> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3/xtIACgkQwcJ4iSZ1q2ksDACgh+5Hke+CpjcoDJ5LSkQ9MxGJ PUoAnj25XTIw04UWq66orp3OYeS89RFC =PSub -----END PGP SIGNATURE----- From owner-freebsd-net@FreeBSD.ORG Tue Jun 21 00:22:27 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32156106566C for ; Tue, 21 Jun 2011 00:22:27 +0000 (UTC) (envelope-from ddesimone@verio.net) Received: from relay2-bcrtfl2.verio.net (relay2-bcrtfl2.verio.net [131.103.218.177]) by mx1.freebsd.org (Postfix) with ESMTP id 00DA58FC08 for ; Tue, 21 Jun 2011 00:22:26 +0000 (UTC) Received: from iad-wprd-xchw01.corp.verio.net (iad-wprd-xchw01.corp.verio.net [198.87.7.164]) by relay2-bcrtfl2.verio.net (Postfix) with ESMTP id 140A71FF015C for ; Mon, 20 Jun 2011 20:22:26 -0400 (EDT) Thread-Index: AcwvqUv+XnHoHFi8Q+aDsu5o0RVgIQ== Received: from dllstx1-8sst9f1.corp.verio.net ([10.144.2.53]) by iad-wprd-xchw01.corp.verio.net over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 20 Jun 2011 20:22:24 -0400 Received: by dllstx1-8sst9f1.corp.verio.net (sSMTP sendmail emulation); Mon, 20 Jun 2011 19:22:23 -0500 Date: Mon, 20 Jun 2011 19:22:23 -0500 From: "David DeSimone" To: Content-Transfer-Encoding: 7bit Message-ID: <20110621002222.GK972@verio.net> Mail-Followup-To: freebsd-net@freebsd.org References: MIME-Version: 1.0 Content-class: urn:content-classes:message Importance: normal Priority: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4862 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: Precedence: bulk User-Agent: Mutt/1.5.20 (2009-12-10) X-OriginalArrivalTime: 21 Jun 2011 00:22:24.0736 (UTC) FILETIME=[4B5E6E00:01CC2FA9] Subject: Re: Carp vhid with vlan id's alignment X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jun 2011 00:22:27 -0000 Rafael Ganascim wrote: > > I'm planning and testing a new FreeBSD router, with vlans and carp > interfaces. There are a lot of vlans, with high vlan IDs. We have, for > example: > > dot1q vlan id: 1530 > > Iface igb0 > vlan1530 > carp1530 > vhid 10 The VHID is there to help differentiate multiple CARP implementations on the same broadcast domain. If you are only going to have one CARP instance on each vlan, they can all use the same VHID in every vlan, without conflicting. -- David DeSimone == Network Admin == fox@verio.net "I don't like spinach, and I'm glad I don't, because if I liked it I'd eat it, and I just hate it." -- Clarence Darrow This email message is intended for the use of the person to whom it has been sent, and may contain information that is confidential or legally protected. If you are not the intended recipient or have received this message in error, you are not authorized to copy, distribute, or otherwise use this message or its attachments. Please notify the sender immediately by return e-mail and permanently delete this message and any attachments. Verio, Inc. makes no warranty that this email is error or virus free. Thank you. From owner-freebsd-net@FreeBSD.ORG Tue Jun 21 18:22:18 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED7B106568F for ; Tue, 21 Jun 2011 18:22:18 +0000 (UTC) (envelope-from mahan@mahan.org) Received: from ns.mahan.org (ns.mahan.org [67.116.10.138]) by mx1.freebsd.org (Postfix) with ESMTP id 2848E8FC0A for ; Tue, 21 Jun 2011 18:22:17 +0000 (UTC) Received: from gypsy.mahan.org (localhost [127.0.0.1]) by ns.mahan.org (8.13.6/8.13.6) with ESMTP id p5LHsts7034189 for ; Tue, 21 Jun 2011 10:54:55 -0700 (PDT) (envelope-from mahan@mahan.org) Message-ID: <4E00D848.7060104@mahan.org> Date: Tue, 21 Jun 2011 10:43:36 -0700 From: Patrick Mahan User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: freebsd-net@freebsd.org X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Intel Pro/1000 PT Quad Port Bypass Server Adapter 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, 21 Jun 2011 18:22:18 -0000 All, We have a requirement for fail-to-wire that we are meeting by using these types of bypass NIC's. We have some from Silicom where they provided us a modified em(4) driver, but now we have a few NICs coming that are straight from Intel. However the website doesn't list the correct driver(s) for this card. Will the current (or even the HEAD) em(4) driver work for this type of NIC? I don't see anything in the sysctl for enabling/disabling the bypass mode. Thanks for any help, Patrick From owner-freebsd-net@FreeBSD.ORG Wed Jun 22 01:59:27 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A92E10657B5; Wed, 22 Jun 2011 01:59:27 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3CA6F8FC0C; Wed, 22 Jun 2011 01:59:26 +0000 (UTC) Received: by pvg11 with SMTP id 11so301287pvg.13 for ; Tue, 21 Jun 2011 18:59:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:date:to:cc:subject:message-id:reply-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=/3GRopniLkXYbhzpGRvHGalnnbJKpsDmlDFjOUbzcNE=; b=qdeghlEVfmpVA+O1V8rn2Xkz24eGmjOz27TxmzI95j3/vaZa8oYmg4g2SnPaQh/ayu RG68Ct0A+G7JM29xbNNkeo3XREInyjpIBxXNopAfuxfI72eJchbTf8GZqk0d/zvD7sJe Y26aYWAk/Cs9OOYOGTngkYugKQ88KAyFLaBkM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=JojCyLg4WkF3v87v0e7FG1RFK6M3IfCL4GCutDU5+IwkDLzkXh42I9NU6Yd3jjmgG5 MaGMGLrH7oLv6csARc2BqXTQRrzYXM/wGHL5tYvRKkH5HTIlzN05Ldb7j3DlZsNsVEbe dCMYWYco9qMQ3R+WMOjpGYIVXteJXZG5CrkLg= Received: by 10.142.218.11 with SMTP id q11mr15416wfg.235.1308707966551; Tue, 21 Jun 2011 18:59:26 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id n8sm66906pbh.73.2011.06.21.18.59.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 21 Jun 2011 18:59:24 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 21 Jun 2011 18:59:34 -0700 From: YongHyeon PYUN Date: Tue, 21 Jun 2011 18:59:33 -0700 To: Robert Millan Message-ID: <20110622015933.GA9503@michelle.cdnetworks.com> References: <201106021642.p52Gg36i028702@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org, bug-followup@freebsd.org, yongari@freebsd.org Subject: Re: kern/154591: [msk] [panic] if_msk driver causes kernel panic (fatal trap while in kernel mode) 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, 22 Jun 2011 01:59:27 -0000 On Sun, Jun 12, 2011 at 02:15:30PM +0200, Robert Millan wrote: > Btw will this be MFC'ed? > MFC to both stable/8 and stable/7 done. > 2011/6/2 : > > Synopsis: [msk] [panic] if_msk driver causes kernel panic (fatal trap while in kernel mode) > > > > State-Changed-From-To: feedback->patched > > State-Changed-By: yongari > > State-Changed-When: Thu Jun 2 16:41:41 UTC 2011 > > State-Changed-Why: > > Fixed in HEAD. > > Thanks for testing! > > > > http://www.freebsd.org/cgi/query-pr.cgi?pr=154591 > > > > > > -- > Robert Millan From owner-freebsd-net@FreeBSD.ORG Wed Jun 22 09:20:17 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E82E106571F for ; Wed, 22 Jun 2011 09:20:17 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 84ADE8FC0C for ; Wed, 22 Jun 2011 09:20:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5M9KFJB049066 for ; Wed, 22 Jun 2011 09:20:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5M9KFnq049065; Wed, 22 Jun 2011 09:20:15 GMT (envelope-from gnats) Date: Wed, 22 Jun 2011 09:20:15 GMT Message-Id: <201106220920.p5M9KFnq049065@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/144642: commit references a PR X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jun 2011 09:20:17 -0000 The following reply was made to PR kern/144642; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/144642: commit references a PR Date: Wed, 22 Jun 2011 09:16:42 +0000 (UTC) Author: kevlo Date: Wed Jun 22 09:16:32 2011 New Revision: 223420 URL: http://svn.freebsd.org/changeset/base/223420 Log: MFC r221199: Guard against default ni_chan PR: kern/144642 Submitted by: Arthur Hartwig Modified: stable/8/sys/dev/usb/wlan/if_rum.c Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Wed Jun 22 08:55:00 2011 (r223419) +++ stable/8/sys/dev/usb/wlan/if_rum.c Wed Jun 22 09:16:32 2011 (r223420) @@ -207,7 +207,7 @@ static void rum_init(void *); static void rum_stop(struct rum_softc *); static void rum_load_microcode(struct rum_softc *, const uint8_t *, size_t); -static int rum_prepare_beacon(struct rum_softc *, +static void rum_prepare_beacon(struct rum_softc *, struct ieee80211vap *); static int rum_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); @@ -2118,7 +2118,7 @@ rum_load_microcode(struct rum_softc *sc, rum_pause(sc, hz / 8); } -static int +static void rum_prepare_beacon(struct rum_softc *sc, struct ieee80211vap *vap) { struct ieee80211com *ic = vap->iv_ic; @@ -2126,9 +2126,12 @@ rum_prepare_beacon(struct rum_softc *sc, struct rum_tx_desc desc; struct mbuf *m0; + if (vap->iv_bss->ni_chan == IEEE80211_CHAN_ANYC) + return; + m0 = ieee80211_beacon_alloc(vap->iv_bss, &RUM_VAP(vap)->bo); if (m0 == NULL) { - return ENOBUFS; + return; } tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_bsschan)]; @@ -2143,8 +2146,6 @@ rum_prepare_beacon(struct rum_softc *sc, m0->m_pkthdr.len); m_freem(m0); - - return 0; } static int _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 13:11:47 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8B921065738 for ; Thu, 23 Jun 2011 13:11:47 +0000 (UTC) (envelope-from gygy@stsnet.ro) Received: from mail.stsnet.ro (mail.stsnet.ro [193.151.31.253]) by mx1.freebsd.org (Postfix) with ESMTP id 824B98FC19 for ; Thu, 23 Jun 2011 13:11:47 +0000 (UTC) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) by mail.stsnet.ro (Postfix) with ESMTP id 2B35C16DDA7 for ; Thu, 23 Jun 2011 15:55:02 +0300 (EEST) Received: from localhost.localdomain [127.0.0.1] by BitDefender SMTP Proxy on localhost.localdomain [127.0.0.1] for localhost.localdomain [127.0.0.1]; Thu, 23 Jun 2011 15:55:02 +0300 (EEST) Received: from [192.168.100.46] (PC46.ciurel100.stsnet.ro [192.168.100.46]) (Authenticated sender: gygy) by mail.stsnet.ro (Postfix) with ESMTPSA id 127F016DDA5 for ; Thu, 23 Jun 2011 15:55:02 +0300 (EEST) Message-ID: <4E0337A6.4020101@stsnet.ro> Date: Thu, 23 Jun 2011 15:55:02 +0300 From: Adrian Minta User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110522 Icedove/3.1.10 MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.164387, SQMD Hits: none, bayes score: 500(0), pbayes score: 241(0), neunet score: 0(0), SQMD: 413c1605eff4f1eeaeb142a4ba71fb16.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-CF-Stamp: none X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 3.1.0 on mail.stsnet.ro, sigver: 7.38016 Subject: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 13:11:47 -0000 Hello, I am testing a RAS solution and I experience some crashes when the L2TP tunnels grow above 3500. The IPv6 is disabled on the box. With IPv6 enabled the limit is around 1700 (half). Does anyone has a sugesstion what I should try next ? total traffic: ~ 100mbps load averages: ~1.8 Kernel: FreeBSD 8.2-RELEASE MPD5: mpd-5.5 /boot/loader.conf net.graph.maxdata=65536 net.graph.maxalloc=65536 kern.ipc.maxpipekva=320000000 /etc/sysctl.conf net.inet.ip.forwarding=1 kern.maxfiles=65535 net.inet.icmp.icmplim=0 net.inet.ip.fastforwarding=1 kern.ipc.nmbclusters=1280000 kern.ipc.maxsockbuf=128000000 net.graph.maxdgram=10240000 net.graph.recvspace=10240000 -- Best regards, Adrian Minta MA3173-RIPE tel. +4.0212.022.660 +4.0726.110.369 From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 13:46:01 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AE09106566B for ; Thu, 23 Jun 2011 13:46:01 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id D98858FC19 for ; Thu, 23 Jun 2011 13:46:00 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p5NDPlPK025042; Thu, 23 Jun 2011 09:25:47 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4E033EDE.1030108@sentex.net> Date: Thu, 23 Jun 2011 09:25:50 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adrian Minta References: <4E0337A6.4020101@stsnet.ro> In-Reply-To: <4E0337A6.4020101@stsnet.ro> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 13:46:01 -0000 On 6/23/2011 8:55 AM, Adrian Minta wrote: > Hello, > I am testing a RAS solution and I experience some crashes when the L2TP > tunnels grow above 3500. The IPv6 is disabled on the box. With IPv6 > enabled the limit is around 1700 (half). Does anyone has a sugesstion > what I should try next ? There are many bug fixes to netgraph in RELENG_8. cvsup to stable as a start. How much RAM do you have ? i386 or AMD64 ? ---Mike > > total traffic: ~ 100mbps > load averages: ~1.8 > > > Kernel: FreeBSD 8.2-RELEASE > MPD5: mpd-5.5 > > /boot/loader.conf > net.graph.maxdata=65536 > net.graph.maxalloc=65536 > kern.ipc.maxpipekva=320000000 > > /etc/sysctl.conf > net.inet.ip.forwarding=1 > kern.maxfiles=65535 > net.inet.icmp.icmplim=0 > net.inet.ip.fastforwarding=1 > kern.ipc.nmbclusters=1280000 > kern.ipc.maxsockbuf=128000000 > net.graph.maxdgram=10240000 > net.graph.recvspace=10240000 > -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 15:56:22 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66B70106566B for ; Thu, 23 Jun 2011 15:56:22 +0000 (UTC) (envelope-from gygy@stsnet.ro) Received: from mail.stsnet.ro (mail.stsnet.ro [193.151.31.253]) by mx1.freebsd.org (Postfix) with ESMTP id 1DE1A8FC0A for ; Thu, 23 Jun 2011 15:56:22 +0000 (UTC) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) by mail.stsnet.ro (Postfix) with ESMTP id CF4C016DDA7 for ; Thu, 23 Jun 2011 18:56:17 +0300 (EEST) Received: from localhost.localdomain [127.0.0.1] by BitDefender SMTP Proxy on localhost.localdomain [127.0.0.1] for localhost.localdomain [127.0.0.1]; Thu, 23 Jun 2011 18:56:17 +0300 (EEST) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) (Authenticated sender: gygy) by mail.stsnet.ro (Postfix) with ESMTPA id A88F016DDA5 for ; Thu, 23 Jun 2011 18:56:17 +0300 (EEST) Received: from 188.26.159.151 (SquirrelMail authenticated user gygy) by mail.stsnet.ro with HTTP; Thu, 23 Jun 2011 18:56:17 +0300 Message-ID: In-Reply-To: <4E033EDE.1030108@sentex.net> References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> Date: Thu, 23 Jun 2011 18:56:17 +0300 From: "Adrian Minta" To: freebsd-net@freebsd.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.164448, SQMD Hits: none, bayes score: 500(0), pbayes score: 241(0), neunet score: 0(0), SQMD: bc533fc50e5422d84aaa0eb152444e32.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-CF-Stamp: none X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 3.1.0 on mail.stsnet.ro, sigver: 7.38016 Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 15:56:22 -0000 > On 6/23/2011 8:55 AM, Adrian Minta wrote: >> Hello, >> I am testing a RAS solution and I experience some crashes when the L2TP >> tunnels grow above 3500. The IPv6 is disabled on the box. With IPv6 >> enabled the limit is around 1700 (half). Does anyone has a sugesstion >> what I should try next ? > > There are many bug fixes to netgraph in RELENG_8. cvsup to stable as a > start. How much RAM do you have ? i386 or AMD64 ? > > ---Mike >> >> total traffic: ~ 100mbps >> load averages: ~1.8 >> >> >> Kernel: FreeBSD 8.2-RELEASE >> MPD5: mpd-5.5 >> >> /boot/loader.conf >> net.graph.maxdata=65536 >> net.graph.maxalloc=65536 >> kern.ipc.maxpipekva=320000000 >> >> /etc/sysctl.conf >> net.inet.ip.forwarding=1 >> kern.maxfiles=65535 >> net.inet.icmp.icmplim=0 >> net.inet.ip.fastforwarding=1 >> kern.ipc.nmbclusters=1280000 >> kern.ipc.maxsockbuf=128000000 >> net.graph.maxdgram=10240000 >> net.graph.recvspace=10240000 >> > Sorry if I miss something, but just started using freebsd, I use mostly linux. The server use AMD64 flavor and have 4G of RAM. RELENG_8 is not the prerelease for 8.0 ? I have 8.2-RELEASE isn't it newer ? From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 15:58:17 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D0B1065670 for ; Thu, 23 Jun 2011 15:58:17 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) by mx1.freebsd.org (Postfix) with ESMTP id 8A9B18FC0A for ; Thu, 23 Jun 2011 15:58:17 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 00C0625D3810; Thu, 23 Jun 2011 15:39:40 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 08E9515A24A8; Thu, 23 Jun 2011 15:39:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id uW8VqCMjbcj0; Thu, 23 Jun 2011 15:39:39 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1936A15A2472; Thu, 23 Jun 2011 15:39:38 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <4E0337A6.4020101@stsnet.ro> Date: Thu, 23 Jun 2011 15:39:37 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4E0337A6.4020101@stsnet.ro> To: Adrian Minta X-Mailer: Apple Mail (2.1084) Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 15:58:17 -0000 On Jun 23, 2011, at 12:55 PM, Adrian Minta wrote: > Hello, > I am testing a RAS solution and I experience some crashes when the = L2TP tunnels grow above 3500. I guess you mean sessions, not tunnels. > The IPv6 is disabled on the box. With IPv6 enabled the limit is around = 1700 (half). Does anyone has a sugesstion what I should try next ? backtraces would be a good start if things persist after what Mike has = suggested (updating to stable/8). /bz --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 16:10:33 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D9D4106564A for ; Thu, 23 Jun 2011 16:10:33 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 2670D8FC18 for ; Thu, 23 Jun 2011 16:10:32 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p5NGATPD056047; Thu, 23 Jun 2011 12:10:29 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4E036578.5030307@sentex.net> Date: Thu, 23 Jun 2011 12:10:32 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adrian Minta References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 16:10:33 -0000 On 6/23/2011 11:56 AM, Adrian Minta wrote: > > Sorry if I miss something, but just started using freebsd, I use mostly > linux. > The server use AMD64 flavor and have 4G of RAM. > RELENG_8 is not the prerelease for 8.0 ? I have 8.2-RELEASE isn't it newer ? > Hi, RELENG_8 is the present state of what is in the tree and will eventually make 8.3-RELEASE. Its called STABLE, but that means no ABI changes to the branch. But you can generally think of it being "stable" as well in that the goal is to have less bugs then previous versions. Have a read through http://www.freebsd.org/doc/handbook/updating-upgrading.html Then the broad steps to upgrade your source, cp /usr/share/examples/cvsup/stable-supfile /tmp edit the file in tmp and make sure the line reads as follows for the release *default release=cvs tag=RELENG_8 csup -g -L2 -h cvsup10.freebsd.org /tmp/stable-supfile This will pull down all the source for the RELENG_8, the most uptodate source tree and put it in /usr/src from the cvsup mirror cvsup10.freebsd.org. Where you see references to cvsup (the client app) use instead csup which will do everything you need. then cd /usr/src;make -j2 buildworld > b.out;make -j2 buildkernel > b.out.k If all goes well, you will see in b.out at the end -------------------------------------------------------------- >>> World build completed on Wed Jun 22 07:10:37 EDT 2011 -------------------------------------------------------------- and -------------------------------------------------------------- >>> Kernel build for GENERIC completed on Wed Jun 22 07:18:49 EDT 2011 -------------------------------------------------------------- Then follow the steps to install the kernel and world http://www.freebsd.org/doc/handbook/makeworld.html ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 16:40:14 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA64C106566B for ; Thu, 23 Jun 2011 16:40:14 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 696118FC14 for ; Thu, 23 Jun 2011 16:40:14 +0000 (UTC) Received: by bwz12 with SMTP id 12so2478444bwz.13 for ; Thu, 23 Jun 2011 09:40:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:reply-to:from:to:references:in-reply-to:subject :date:message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:content-language; bh=iY3OYdb99CjBhtg3eYycu74LEeP1MhAP585PNZomCeM=; b=PfgWfI+DrcQJ3oCm/2ZpS+wNw37I6aZRcVJ7L+DxI2adjClnt6qRBsYtIuD6dRpJlA oLnu1Wiw+FWIj1pEN6IyZ8DYyrfMNlj+66KpKBnaZzd4leejeOBTfbyzQwqRhWdv2Q7A rgfAFSf+CgDDxpQUJup2P82K4jCUnQ6yvBoF0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; b=hLBdPqGbY/Ilk1p1ui/cwW2ui5OhbhBHWJt62136ZmgfU8Xum2Oili9pcv0tR1cAFY Rv4ddvfsAxgbqgw2/z1F2yzj45U43OjPuh9v7MqgazyG1ATqshqz+yerwui45uiUA3FH 4iWJmgaCFV+9L5dfmW0QZL6azy3b5iSDpaJAw= Received: by 10.204.40.80 with SMTP id j16mr1072099bke.107.1308845361229; Thu, 23 Jun 2011 09:09:21 -0700 (PDT) Received: from rimwks1x64 ([92.124.5.157]) by mx.google.com with ESMTPS id g13sm866711bkd.22.2011.06.23.09.09.19 (version=SSLv3 cipher=OTHER); Thu, 23 Jun 2011 09:09:20 -0700 (PDT) From: rozhuk.im@gmail.com To: "'Aleksandr Rybalko'" , References: <20110613175825.181e6803.ray@freebsd.org> In-Reply-To: <20110613175825.181e6803.ray@freebsd.org> Date: Fri, 24 Jun 2011 01:09:16 +0900 Message-ID: <4e036530.4d21cc0a.4599.24f0@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acwp4DQTIc4UXkgGQwOEeJcVrUhm0AH29p+g Content-Language: ru Cc: Subject: RE: H/W offload VLAN/PPPoE/NAT X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2011 16:40:15 -0000 Hi! Another way for vlans is: "ng_ether + ng_vlan + ng_iface". See in sources: VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM I don=92t see any profits with hardware PPPoE, mpd5 is fast. For hardware NAT you can try make "closed" netgraph based interface. Node like "ng_ether + ng_nat" =3D ng_hwnat, compatible with ng_nat =A0 -- Rozhuk Ivan =A0=20 > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > net@freebsd.org] On Behalf Of Aleksandr Rybalko > Sent: Monday, June 13, 2011 11:58 PM > To: freebsd-net@FreeBSD.org > Subject: H/W offload VLAN/PPPoE/NAT >=20 > Hi folks, >=20 > I work with System-on-Chip(SoC) Ralink RT3052F and I have a questions > which I think preferred to discuss here. >=20 > SoC have Ethernet MAC and Ethernet switch, they connected together > with two ports at MAC side called as GMAC1 and GMAC2. >=20 > MAC internally have so called Frame-Engine, bus that deliver packets > between GMAC1, GMAC2, CPU port, Discard port and PPE (Packet > Processing Engine) >=20 > Packet Processing Engine can insert/remove VLAN tag and PPPoE headers > and do NAT/PAT translations. >=20 > VLAN offload I will implement w/ IFCAP_VLAN_HWTAGGING and will use > EVENTHANDLER_REGISTER(vlan_[un]config, ...) to limit max vlan = subifaces > to max 16 items supported by MAC. Right? >=20 > Problem with PPPoE offload, since chip support only insert/remove = PPPoE > session header, so we need something like vlan clones, but for PPPoE. > And session setup still should be done at parent interface. Any ideas? >=20 > Another big question is a PPE, which seems just return packets to > driver after processing, so I don't have any idea how to correct > implement it. May someone help me with ideas, samples or something = else > what may help me? >=20 > I would be thankful for any ideas. >=20 > WBW > -- > Aleksandr Rybalko > -- > Aleksandr Rybalko > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 17:37:57 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67B5B106564A for ; Thu, 23 Jun 2011 17:37:57 +0000 (UTC) (envelope-from gygy@stsnet.ro) Received: from mail.stsnet.ro (mail.stsnet.ro [193.151.31.253]) by mx1.freebsd.org (Postfix) with ESMTP id 1AD2A8FC0C for ; Thu, 23 Jun 2011 17:37:57 +0000 (UTC) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) by mail.stsnet.ro (Postfix) with ESMTP id F372A16DDA7 for ; Thu, 23 Jun 2011 20:37:55 +0300 (EEST) Received: from localhost.localdomain [127.0.0.1] by BitDefender SMTP Proxy on localhost.localdomain [127.0.0.1] for localhost.localdomain [127.0.0.1]; Thu, 23 Jun 2011 20:37:55 +0300 (EEST) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) (Authenticated sender: gygy) by mail.stsnet.ro (Postfix) with ESMTPA id B15C116DDA5 for ; Thu, 23 Jun 2011 20:37:55 +0300 (EEST) Received: from 188.26.159.151 (SquirrelMail authenticated user gygy) by mail.stsnet.ro with HTTP; Thu, 23 Jun 2011 20:37:55 +0300 Message-ID: <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> In-Reply-To: <4E036578.5030307@sentex.net> References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> Date: Thu, 23 Jun 2011 20:37:55 +0300 From: "Adrian Minta" To: freebsd-net@freebsd.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.164469, SQMD Hits: none, bayes score: 500(0), pbayes score: 241(0), neunet score: 0(0), SQMD: 4e3b6b6913d0c0f65064e4ecb4284796.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-CF-Stamp: none X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 3.1.0 on mail.stsnet.ro, sigver: 7.38016 Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 17:37:57 -0000 > *default release=cvs tag=RELENG_8 > > > csup -g -L2 -h cvsup10.freebsd.org /tmp/stable-supfile > > This will pull down all the source for the RELENG_8, the most uptodate > source tree and put it in /usr/src from the cvsup mirror > cvsup10.freebsd.org. Where you see references to cvsup (the client app) > use instead csup which will do everything you need. > > then > cd /usr/src;make -j2 buildworld > b.out;make -j2 buildkernel > b.out.k > > If all goes well, you will see in b.out at the end > > -------------------------------------------------------------- >>>> World build completed on Wed Jun 22 07:10:37 EDT 2011 > -------------------------------------------------------------- > > and > > -------------------------------------------------------------- >>>> Kernel build for GENERIC completed on Wed Jun 22 07:18:49 EDT 2011 > -------------------------------------------------------------- > > Then follow the steps to install the kernel and world > > http://www.freebsd.org/doc/handbook/makeworld.html > > > ---Mike > Thank you ! My server is stable now with 3572 sessions. The issue now seems to be the rate of new connections/sec. When a new "ng" device is created some scripts are run (like /etc/pccard_ether ). The scripts drive the CPU to 100% and sometimes new connections fail to establish. I guess I have to find a bigger CPU now :) From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 18:13:21 2011 Return-Path: Delivered-To: freebsd-net@hub.freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A00AA106566B; Thu, 23 Jun 2011 18:13:21 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7428FC1E; Thu, 23 Jun 2011 18:13:21 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p5NIDLua018481; Thu, 23 Jun 2011 18:13:21 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p5NIDLa8018477; Thu, 23 Jun 2011 18:13:21 GMT (envelope-from linimon) Date: Thu, 23 Jun 2011 18:13:21 GMT Message-Id: <201106231813.p5NIDLa8018477@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-net@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/158156: [bce] bce driver shows "no carrier" on IBM blade (HS22 with BCM5709) 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, 23 Jun 2011 18:13:21 -0000 Old Synopsis: bce driver shows "no carrier" on IBM blade (HS22 with BCM5709) New Synopsis: [bce] bce driver shows "no carrier" on IBM blade (HS22 with BCM5709) Responsible-Changed-From-To: freebsd-bugs->freebsd-net Responsible-Changed-By: linimon Responsible-Changed-When: Thu Jun 23 18:13:10 UTC 2011 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=158156 From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 18:15:01 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C1FE106566C for ; Thu, 23 Jun 2011 18:15:01 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 12FA78FC08 for ; Thu, 23 Jun 2011 18:15:00 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p5NIExCY075261; Thu, 23 Jun 2011 14:14:59 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4E0382A5.1070700@sentex.net> Date: Thu, 23 Jun 2011 14:15:01 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adrian Minta References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> In-Reply-To: <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 18:15:01 -0000 On 6/23/2011 1:37 PM, Adrian Minta wrote: >> *default release=cvs tag=RELENG_8 >> Then follow the steps to install the kernel and world >> >> http://www.freebsd.org/doc/handbook/makeworld.html > > Thank you ! > My server is stable now with 3572 sessions. > The issue now seems to be the rate of new connections/sec. When a new "ng" > device is created some scripts are run (like /etc/pccard_ether ). The > scripts drive the CPU to 100% and sometimes new connections fail to > establish. > > I guess I have to find a bigger CPU now :) Thats great to hear! Is that with ivp6 enabled or disabled ? ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 18:50:37 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA577106564A for ; Thu, 23 Jun 2011 18:50:37 +0000 (UTC) (envelope-from gygy@stsnet.ro) Received: from mail.stsnet.ro (mail.stsnet.ro [193.151.31.253]) by mx1.freebsd.org (Postfix) with ESMTP id 9A8448FC22 for ; Thu, 23 Jun 2011 18:50:37 +0000 (UTC) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) by mail.stsnet.ro (Postfix) with ESMTP id 2E9EE16DDA7 for ; Thu, 23 Jun 2011 21:50:33 +0300 (EEST) Received: from localhost.localdomain [127.0.0.1] by BitDefender SMTP Proxy on localhost.localdomain [127.0.0.1] for localhost.localdomain [127.0.0.1]; Thu, 23 Jun 2011 21:50:33 +0300 (EEST) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) (Authenticated sender: gygy) by mail.stsnet.ro (Postfix) with ESMTPA id 019F416DDA5 for ; Thu, 23 Jun 2011 21:50:33 +0300 (EEST) Received: from 188.26.159.151 (SquirrelMail authenticated user gygy) by mail.stsnet.ro with HTTP; Thu, 23 Jun 2011 21:50:33 +0300 Message-ID: In-Reply-To: <4E0382A5.1070700@sentex.net> References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> Date: Thu, 23 Jun 2011 21:50:33 +0300 From: "Adrian Minta" To: freebsd-net@freebsd.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.164506, SQMD Hits: none, bayes score: 500(0), pbayes score: 241(0), neunet score: 0(0), SQMD: 86b202682f23743c1e7adca74b18f2d3.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-CF-Stamp: none X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 3.1.0 on mail.stsnet.ro, sigver: 7.38016 Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 18:50:38 -0000 > On 6/23/2011 1:37 PM, Adrian Minta wrote: >>> *default release=cvs tag=RELENG_8 >>> Then follow the steps to install the kernel and world >>> >>> http://www.freebsd.org/doc/handbook/makeworld.html >> >> Thank you ! >> My server is stable now with 3572 sessions. >> The issue now seems to be the rate of new connections/sec. When a new >> "ng" >> device is created some scripts are run (like /etc/pccard_ether ). The >> scripts drive the CPU to 100% and sometimes new connections fail to >> establish. >> >> I guess I have to find a bigger CPU now :) > > > Thats great to hear! Is that with ivp6 enabled or disabled ? > > ---Mike > I left him disabled because I don't need it anyway. From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 19:18:53 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F634106566B for ; Thu, 23 Jun 2011 19:18:53 +0000 (UTC) (envelope-from gygy@stsnet.ro) Received: from mail.stsnet.ro (mail.stsnet.ro [193.151.31.253]) by mx1.freebsd.org (Postfix) with ESMTP id 40C5C8FC14 for ; Thu, 23 Jun 2011 19:18:53 +0000 (UTC) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) by mail.stsnet.ro (Postfix) with ESMTP id A656416DDA7 for ; Thu, 23 Jun 2011 22:18:48 +0300 (EEST) Received: from localhost.localdomain [127.0.0.1] by BitDefender SMTP Proxy on localhost.localdomain [127.0.0.1] for localhost.localdomain [127.0.0.1]; Thu, 23 Jun 2011 22:18:48 +0300 (EEST) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) (Authenticated sender: gygy) by mail.stsnet.ro (Postfix) with ESMTPA id 7E87E16DDA5 for ; Thu, 23 Jun 2011 22:18:48 +0300 (EEST) Received: from 188.26.159.151 (SquirrelMail authenticated user gygy) by mail.stsnet.ro with HTTP; Thu, 23 Jun 2011 22:18:48 +0300 Message-ID: <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> In-Reply-To: <4E0382A5.1070700@sentex.net> References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> Date: Thu, 23 Jun 2011 22:18:48 +0300 From: "Adrian Minta" To: freebsd-net@freebsd.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.164506, SQMD Hits: none, bayes score: 500(0), pbayes score: 218(0), neunet score: 0(0), SQMD: 23e2bd506f54c4a3e26154b0738b7f98.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-CF-Stamp: none X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 3.1.0 on mail.stsnet.ro, sigver: 7.38016 Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 19:18:53 -0000 Oops i spoke too soon ... The system is stable without hyperthreading. With hyperthreading activated i't freezes again. From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 19:52:01 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0075106566C for ; Thu, 23 Jun 2011 19:52:01 +0000 (UTC) (envelope-from lacombar@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id A475F8FC08 for ; Thu, 23 Jun 2011 19:52:01 +0000 (UTC) Received: by pzk27 with SMTP id 27so1832260pzk.13 for ; Thu, 23 Jun 2011 12:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1eRwb2nk5oTZE4VCc2xv9vilLavpPiKXmlkqij+8Cgg=; b=LjfdgisHCktujuYdpLShI8Y8feiZ446PQtS/FE0jZGRomYr1afuoUEi1UOA1z741Dq FGawyVp5NyHEulbFWMycDvnUDpq3zp4evABb5IE3nVC1zo09xvHCOJ9xZ+1ui+fG8iU7 h6K5VLoKjoEF9ZGApRWm4vUeBncJ4VNaQAxSo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=MNfaUuNWfTbqFOzoFLaAW/Ry4SWRTHzoFlLL+Mt6biTbBVVaLy+t0b5FozQOYaBP/I qbCfN1xCO6EszXwA7wAwQHIlY9KIPzBojrMgO7UhspJCe6Z8NoCoCeN0ei5mY/iMLaq4 OdVbt5Vfe/c1/56FDvHAVtgAvofvCP3IUdwjY= MIME-Version: 1.0 Received: by 10.68.14.164 with SMTP id q4mr1396626pbc.352.1308858720892; Thu, 23 Jun 2011 12:52:00 -0700 (PDT) Received: by 10.68.56.8 with HTTP; Thu, 23 Jun 2011 12:52:00 -0700 (PDT) In-Reply-To: References: Date: Thu, 23 Jun 2011 15:52:00 -0400 Message-ID: From: Arnaud Lacombe To: Jack Vogel Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net@freebsd.org, grarpamp Subject: Re: FreeBSD I/OAT (QuickData now?) driver [10gb pfring silicom] 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, 23 Jun 2011 19:52:01 -0000 Hi, On Sun, Jun 19, 2011 at 11:42 PM, Jack Vogel wrote: > Affinity to open source eh, you mean they repackage Intel hardware and > then just use MY drivers, they've been doing it for 1G, and now they're > gonna extend their "affinity" to 10G it seems, impressive :) > AFAICS, files in `sys/dev/e1000/' and `sys/dev/ixgbe/' are copyrighted by Intel Corporation, not "Jack Vogel " :-) Moreover, the SVN seem to use the Linux driver, not the BSD one, which in any case seem to share the same core, beside a different license. But still, I'd admit that "affinity to open source" definitively sounds merely be "GPL compliance". A. > Jack > > > On Sun, Jun 19, 2011 at 6:27 PM, grarpamp wrote: > >> Perhaps some similar work here. And maybe a card vendor >> with docs and an affinity to open source. Just news, that's all. >> >> >> http://www.ntop.org/blog/pf_ring/introducing-the-10-gbit-pf_ring-dna-driver/ >> >> bcc: hackers, isp. reply to net. >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 19:56:24 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16D07106564A for ; Thu, 23 Jun 2011 19:56:24 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id C62C48FC0A for ; Thu, 23 Jun 2011 19:56:23 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p5NJuJUC099103; Thu, 23 Jun 2011 15:56:20 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4E039A66.7050609@sentex.net> Date: Thu, 23 Jun 2011 15:56:22 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Adrian Minta References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> In-Reply-To: <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 19:56:24 -0000 On 6/23/2011 3:18 PM, Adrian Minta wrote: > Oops i spoke too soon ... > The system is stable without hyperthreading. With hyperthreading activated > i't freezes again. > I also run with devd_enable="NO" in /etc/rc.conf and in /etc/syctl.conf kern.random.sys.harvest.ethernet=0 Does it actually freeze or panic and crash ? ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 20:17:19 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62E98106568B for ; Thu, 23 Jun 2011 20:17:19 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D07508FC1E for ; Thu, 23 Jun 2011 20:17:18 +0000 (UTC) Received: by bwz12 with SMTP id 12so2666100bwz.13 for ; Thu, 23 Jun 2011 13:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:reply-to:from:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language; bh=wyElKDPTjpX3tsuhz33YyMARVl8fIc7yto6Z5EzefKM=; b=gu1ZxDi3n0QeEaEmFdEVjKaACdST7K7YkVO1pwMdAvW9iu9N73s3ozNpPZqyHcAuaH nsr65Lj+ArVEAIPpMU9Z3p6Wdi+zJNaPaknaaRGXSuReMu6C59aAZGlirYmrXvLNrJxH BC3X0dBz7rru7DYsrLx9Ne/sAgQT6BFhSmCkQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; b=OJxUjJ5lX/mYZguNO52IVGPXTkhPAybR5eGmBn0ScuHg0AKysId3JVMuQ6ZMPJ2XDf UQZczxigqWAA5eGb7xqLF3WtusYmbgrehlCD0sDGBOqVn0i42JoTUrQPP3rIsBdEakmB xJdGdCt45gbiNwUS1M072ZEXvL14P9Z7dSCVA= Received: by 10.204.10.75 with SMTP id o11mr1273793bko.124.1308860237509; Thu, 23 Jun 2011 13:17:17 -0700 (PDT) Received: from rimwks1x64 ([92.124.31.124]) by mx.google.com with ESMTPS id w1sm1039146bkt.0.2011.06.23.13.17.14 (version=SSLv3 cipher=OTHER); Thu, 23 Jun 2011 13:17:16 -0700 (PDT) From: rozhuk.im@gmail.com To: "'Mike Tancsa'" , "'Adrian Minta'" References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> <4E039A66.7050609@sentex.net> In-Reply-To: <4E039A66.7050609@sentex.net> Date: Fri, 24 Jun 2011 05:17:12 +0900 Message-ID: <4e039f4c.8189cc0a.0b68.2dd6@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acwx3755NVGyjSMTTC6c1QMGAW5m8wAAsifQ Content-Language: ru Cc: freebsd-net@freebsd.org Subject: RE: FreeBSD 8.2 and MPD5 stability issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2011 20:17:19 -0000 Try: net.inet.ip.fastforwarding = 0 net.isr.bindthreads = 1 net.isr.direct = 0 net.isr.direct_force = 0 -- Rozhuk Ivan > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > net@freebsd.org] On Behalf Of Mike Tancsa > Sent: Friday, June 24, 2011 4:56 AM > To: Adrian Minta > Cc: freebsd-net@freebsd.org > Subject: Re: FreeBSD 8.2 and MPD5 stability issues > > On 6/23/2011 3:18 PM, Adrian Minta wrote: > > Oops i spoke too soon ... > > The system is stable without hyperthreading. With hyperthreading > activated > > i't freezes again. > > > > I also run with > > devd_enable="NO" > > in /etc/rc.conf > and > in /etc/syctl.conf > kern.random.sys.harvest.ethernet=0 > > Does it actually freeze or panic and crash ? > > > ---Mike > > > > > -- > ------------------- > Mike Tancsa, tel +1 519 651 3400 > Sentex Communications, mike@sentex.net > Providing Internet services since 1994 www.sentex.net > Cambridge, Ontario Canada http://www.tancsa.com/ > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 20:40:16 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DB26106566C for ; Thu, 23 Jun 2011 20:40:16 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id 38FB28FC0A for ; Thu, 23 Jun 2011 20:40:15 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p5NKeCvE010254; Thu, 23 Jun 2011 16:40:12 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4E03A4AE.3000405@sentex.net> Date: Thu, 23 Jun 2011 16:40:14 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Rozhuk.IM@gmail.com References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> <4E039A66.7050609@sentex.net> <4e039f4c.8189cc0a.0b68.2dd6@mx.google.com> In-Reply-To: <4e039f4c.8189cc0a.0b68.2dd6@mx.google.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org, 'Adrian Minta' Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 23 Jun 2011 20:40:16 -0000 On 6/23/2011 4:17 PM, rozhuk.im@gmail.com wrote: > > Try: > net.inet.ip.fastforwarding = 0 > net.isr.bindthreads = 1 > net.isr.direct = 0 > net.isr.direct_force = 0 If net.isr.direct is disabled, does setting net.isr.bindthreads do anything ? Also, why disable the fastforwarding ? ---Mike -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 21:47:09 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B777F1065670 for ; Thu, 23 Jun 2011 21:47:09 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 36DFF8FC0A for ; Thu, 23 Jun 2011 21:47:08 +0000 (UTC) Received: by bwz12 with SMTP id 12so2733937bwz.13 for ; Thu, 23 Jun 2011 14:47:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:reply-to:from:to:cc:references:in-reply-to :subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language; bh=UcaeVdK3L4jZBl2uftgPAK6jIRJ21GdR+cTgM7SbHrs=; b=b/bd18OPpavvMa0KoHiGmrr//mIc56h2v6ODBs548SDi7nkMsqS+aGktgfZq0TYbx6 1cFQviLI2DeIZ4IKVV+1oPzF2ZWowfnVzRtCYpwhy+B6FxWGVgkvZZS9b/JHKvjKHAdI yUdJ4mSPDXuplqoTC0iIsZBRxeKmX3h+GRfmg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; b=RXIVDa8R9cV4fbBurls1o6KjIfh73bdvCvUcUUY2T2JFFWVbgi7bDVBkJDX2Dposa8 ObuIGwU2Q9zeVIliLmCX7YWQwbqRYC29JN7ZoMCzt4+dJv3f/oxpBgK7RN1Q3rfHCDEH pK5ZZpYgzf9jylqIUzDqEVloy94087vECfKf4= Received: by 10.204.41.74 with SMTP id n10mr1307832bke.186.1308865627957; Thu, 23 Jun 2011 14:47:07 -0700 (PDT) Received: from rimwks1x64 ([92.124.31.124]) by mx.google.com with ESMTPS id j7sm1081026bka.20.2011.06.23.14.47.05 (version=SSLv3 cipher=OTHER); Thu, 23 Jun 2011 14:47:07 -0700 (PDT) From: rozhuk.im@gmail.com To: "'Mike Tancsa'" References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> <4E039A66.7050609@sentex.net> <4e039f4c.8189cc0a.0b68.2dd6@mx.google.com> <4E03A4AE.3000405@sentex.net> In-Reply-To: <4E03A4AE.3000405@sentex.net> Date: Fri, 24 Jun 2011 06:47:03 +0900 Message-ID: <4e03b45b.470fcc0a.27b0.2e95@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acwx5cNB3OPUuexdStSQNiVCdgU7pQACFm2w Content-Language: ru Cc: freebsd-net@freebsd.org, 'Adrian Minta' Subject: RE: FreeBSD 8.2 and MPD5 stability issues X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2011 21:47:09 -0000 net.inet.ip.fastforwarding - double check incoming packet, if: dst =3D this host / multicast / = contain options - all packets processing by one cpu core This option is good for one cpu core routers. =20 -- Rozhuk Ivan =20 > -----Original Message----- > From: Mike Tancsa [mailto:mike@sentex.net] > Sent: Friday, June 24, 2011 5:40 AM > To: Rozhuk.IM@gmail.com > Cc: 'Adrian Minta'; freebsd-net@freebsd.org > Subject: Re: FreeBSD 8.2 and MPD5 stability issues >=20 > On 6/23/2011 4:17 PM, rozhuk.im@gmail.com wrote: > > > > Try: > > net.inet.ip.fastforwarding =3D 0 > > net.isr.bindthreads =3D 1 > > net.isr.direct =3D 0 > > net.isr.direct_force =3D 0 >=20 > If net.isr.direct is disabled, does setting net.isr.bindthreads do > anything ? Also, why disable the fastforwarding ? >=20 > ---Mike >=20 >=20 >=20 > -- > ------------------- > Mike Tancsa, tel +1 519 651 3400 > Sentex Communications, mike@sentex.net > Providing Internet services since 1994 www.sentex.net > Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Thu Jun 23 22:03:47 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BFF4106566B for ; Thu, 23 Jun 2011 22:03:47 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id D36288FC18 for ; Thu, 23 Jun 2011 22:03:46 +0000 (UTC) Received: by bwz12 with SMTP id 12so2746522bwz.13 for ; Thu, 23 Jun 2011 15:03:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:reply-to:from:to:subject:date:message-id :mime-version:content-type:x-mailer:thread-index:content-language; bh=i988GTkJT6WpNb4xb6M3gEHdyO968nE6zXqdPyGWGM0=; b=jTGukmv3sOJY9qXI0XHD4Pxrlfh4ZEzA/qPbmXFCAjWSKsyik3c3nsbAAI7Lbjxdta P+G4icLtX9ka7aYMaJWhdToP7JY9S/XzPuwnDurXdo0OXekWyYLV0nlEplK1nA9NumTm UPJreDLh3f15K3xQnIMNZGOoqc8TJS6kKWKnQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:subject:date:message-id:mime-version:content-type :x-mailer:thread-index:content-language; b=wvJ5KxloCw2B/SVGLTQdCX+D6hKXeUjVo1bTQNfAl45jf11wDhLpPq+KCg6d3fsFa5 1d+ruFgJc9PIgWjZd2cpkHkHNce/rZhRGTahe1t30TL6v5zThKnuvFafEClPcVYxNtiD fG8MhVqq7rEiNyqqVASjccUozE+lmgwhvMMhs= Received: by 10.205.37.194 with SMTP id tf2mr1312476bkb.181.1308866625552; Thu, 23 Jun 2011 15:03:45 -0700 (PDT) Received: from rimwks1x64 ([92.124.31.124]) by mx.google.com with ESMTPS id l24sm1099577bkw.3.2011.06.23.15.03.42 (version=SSLv3 cipher=OTHER); Thu, 23 Jun 2011 15:03:44 -0700 (PDT) From: rozhuk.im@gmail.com To: Date: Fri, 24 Jun 2011 07:03:40 +0900 Message-ID: <4e03b840.d899cc0a.2527.3041@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00C0_01CC323C.DAE3A3C0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acwx8Wk0oEXCapl4S8Ci1UxqwNpWOA== Content-Language: ru Cc: Subject: ng_vlan improvements X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jun 2011 22:03:47 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_00C0_01CC323C.DAE3A3C0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Hi! Changes: 1. list + hash was replaced by array of hooks: its simple and faster 2. added encap setting. "getencap" and "setencap" messages for control it: Default =3D 1 (do the VLAN encapsulation) 0: no encapsulation, just: m->m_flags |=3D M_VLANTAG; m->m_pkthdr.ether_vtag =3D (vlan & EVL_VLID_MASK); Who can test? =A0 -- Rozhuk Ivan =A0=20 ------=_NextPart_000_00C0_01CC323C.DAE3A3C0 Content-Type: text/plain; name="ng_vlan.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ng_vlan.c" /*-=0A= * Copyright (c) 2003 IPNET Internet Communication Company=0A= * All rights reserved.=0A= *=0A= * Redistribution and use in source and binary forms, with or without=0A= * modification, are permitted provided that the following conditions=0A= * are met:=0A= * 1. Redistributions of source code must retain the above copyright=0A= * notice, this list of conditions and the following disclaimer.=0A= * 2. Redistributions in binary form must reproduce the above copyright=0A= * notice, this list of conditions and the following disclaimer in the=0A= * documentation and/or other materials provided with the = distribution.=0A= *=0A= * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND=0A= * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE=0A= * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE=0A= * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE=0A= * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL=0A= * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS=0A= * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A= * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, = STRICT=0A= * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY = WAY=0A= * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF=0A= * SUCH DAMAGE.=0A= *=0A= * Author: Ruslan Ermilov =0A= *=0A= * $FreeBSD: src/sys/netgraph/ng_vlan.c,v 1.6.2.1 2009/08/03 08:13:06 = kensmith Exp $=0A= */=0A= =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= #include =0A= #include =0A= #include =0A= =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= static ng_constructor_t ng_vlan_constructor;=0A= static ng_rcvmsg_t ng_vlan_rcvmsg;=0A= static ng_shutdown_t ng_vlan_shutdown;=0A= static ng_newhook_t ng_vlan_newhook;=0A= static ng_rcvdata_t ng_vlan_rcvdata;=0A= static ng_disconnect_t ng_vlan_disconnect;=0A= =0A= /* Parse type for struct ng_vlan_filter. */=0A= static const struct ng_parse_struct_field ng_vlan_filter_fields[] =3D=0A= NG_VLAN_FILTER_FIELDS;=0A= static const struct ng_parse_type ng_vlan_filter_type =3D {=0A= &ng_parse_struct_type,=0A= &ng_vlan_filter_fields=0A= };=0A= =0A= static int=0A= ng_vlan_getTableLength(const struct ng_parse_type *type,=0A= const u_char *start, const u_char *buf)=0A= {=0A= const struct ng_vlan_table *const table =3D=0A= (const struct ng_vlan_table *)(buf - sizeof(u_int32_t));=0A= =0A= return table->n;=0A= }=0A= =0A= /* Parse type for struct ng_vlan_table. */=0A= static const struct ng_parse_array_info ng_vlan_table_array_info =3D {=0A= &ng_vlan_filter_type,=0A= ng_vlan_getTableLength=0A= };=0A= static const struct ng_parse_type ng_vlan_table_array_type =3D {=0A= &ng_parse_array_type,=0A= &ng_vlan_table_array_info=0A= };=0A= static const struct ng_parse_struct_field ng_vlan_table_fields[] =3D=0A= NG_VLAN_TABLE_FIELDS;=0A= static const struct ng_parse_type ng_vlan_table_type =3D {=0A= &ng_parse_struct_type,=0A= &ng_vlan_table_fields=0A= };=0A= =0A= /* List of commands and how to convert arguments to/from ASCII. */=0A= static const struct ng_cmdlist ng_vlan_cmdlist[] =3D {=0A= {=0A= NGM_VLAN_COOKIE,=0A= NGM_VLAN_ADD_FILTER,=0A= "addfilter",=0A= &ng_vlan_filter_type,=0A= NULL=0A= },=0A= {=0A= NGM_VLAN_COOKIE,=0A= NGM_VLAN_DEL_FILTER,=0A= "delfilter",=0A= &ng_parse_hookbuf_type,=0A= NULL=0A= },=0A= {=0A= NGM_VLAN_COOKIE,=0A= NGM_VLAN_GET_TABLE,=0A= "gettable",=0A= NULL,=0A= &ng_vlan_table_type=0A= },=0A= {=0A= NGM_VLAN_COOKIE,=0A= NGM_VLAN_GET_ENCAP,=0A= "getencap",=0A= NULL,=0A= &ng_parse_int32_type=0A= },=0A= {=0A= NGM_VLAN_COOKIE,=0A= NGM_VLAN_SET_ENCAP,=0A= "setencap",=0A= &ng_parse_int32_type,=0A= NULL=0A= },=0A= { 0 }=0A= };=0A= =0A= static struct ng_type ng_vlan_typestruct =3D {=0A= .version =3D NG_ABI_VERSION,=0A= .name =3D NG_VLAN_NODE_TYPE,=0A= .constructor =3D ng_vlan_constructor,=0A= .rcvmsg =3D ng_vlan_rcvmsg,=0A= .shutdown =3D ng_vlan_shutdown,=0A= .newhook =3D ng_vlan_newhook,=0A= .rcvdata =3D ng_vlan_rcvdata,=0A= .disconnect =3D ng_vlan_disconnect,=0A= .cmdlist =3D ng_vlan_cmdlist,=0A= };=0A= NETGRAPH_INIT(vlan, &ng_vlan_typestruct);=0A= =0A= =0A= =0A= typedef struct {=0A= hook_p downstream_hook;=0A= hook_p nomatch_hook;=0A= hook_p vlan_hook[(EVL_VLID_MASK + 1)];=0A= int vlan_encap;=0A= } *priv_p;=0A= #define HOOK_VLAN_SET_MASK ((uintptr_t)((~0) & ~(EVL_VLID_MASK)))=0A= =0A= =0A= static int=0A= ng_vlan_constructor(node_p node)=0A= {=0A= priv_p priv;=0A= =0A= priv =3D malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO);=0A= if (priv =3D=3D NULL)=0A= return (ENOMEM);=0A= priv->vlan_encap =3D 1;=0A= =0A= return (0);=0A= }=0A= =0A= static int=0A= ng_vlan_newhook(node_p node, hook_p hook, const char *name)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(node);=0A= =0A= if (strcmp(name, NG_VLAN_HOOK_DOWNSTREAM) =3D=3D 0)=0A= priv->downstream_hook =3D hook;=0A= else if (strcmp(name, NG_VLAN_HOOK_NOMATCH) =3D=3D 0)=0A= priv->nomatch_hook =3D hook;=0A= else {=0A= /*=0A= * Any other hook name is valid and can=0A= * later be associated with a filter rule.=0A= */=0A= }=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= return (0);=0A= }=0A= =0A= static int=0A= ng_vlan_rcvmsg(node_p node, item_p item, hook_p lasthook)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(node);=0A= struct ng_mesg *msg, *resp =3D NULL;=0A= struct ng_vlan_filter *vf;=0A= hook_p hook;=0A= struct ng_vlan_table *t;=0A= uintptr_t vlan, vlan_count;=0A= int error =3D 0;=0A= =0A= NGI_GET_MSG(item, msg);=0A= /* Deal with message according to cookie and command. */=0A= switch (msg->header.typecookie) {=0A= case NGM_VLAN_COOKIE:=0A= switch (msg->header.cmd) {=0A= case NGM_VLAN_ADD_FILTER:=0A= /* Check that message is long enough. */=0A= if (msg->header.arglen !=3D sizeof(*vf)) {=0A= error =3D EINVAL;=0A= break;=0A= }=0A= vf =3D (struct ng_vlan_filter *)msg->data;=0A= /* Sanity check the VLAN ID value. */=0A= if (vf->vlan & ~EVL_VLID_MASK) {=0A= error =3D EINVAL;=0A= break;=0A= }=0A= /* Check that a referenced hook exists. */=0A= hook =3D ng_findhook(node, vf->hook);=0A= if (hook =3D=3D NULL) {=0A= error =3D ENOENT;=0A= break;=0A= }=0A= /* And is not one of the special hooks. */=0A= if (hook =3D=3D priv->downstream_hook ||=0A= hook =3D=3D priv->nomatch_hook) {=0A= error =3D EINVAL;=0A= break;=0A= }=0A= /* And is not already in service. */=0A= if (((uintptr_t)NG_HOOK_PRIVATE(hook) & HOOK_VLAN_SET_MASK) =3D=3D = HOOK_VLAN_SET_MASK) {=0A= error =3D EEXIST;=0A= break;=0A= }=0A= /* Check we don't already trap this VLAN. */=0A= if (priv->vlan_hook[vf->vlan] !=3D NULL) {=0A= error =3D EEXIST;=0A= break;=0A= }=0A= /* Link vlan and hook together. */=0A= priv->vlan_hook[vf->vlan] =3D hook;=0A= NG_HOOK_SET_PRIVATE(hook, (void *)(HOOK_VLAN_SET_MASK | vf->vlan));=0A= break;=0A= case NGM_VLAN_DEL_FILTER:=0A= /* Check that message is long enough. */=0A= if (msg->header.arglen !=3D NG_HOOKSIZ) {=0A= error =3D EINVAL;=0A= break;=0A= }=0A= /* Check that hook exists and is active. */=0A= hook =3D ng_findhook(node, (char *)msg->data);=0A= if (hook =3D=3D NULL)=0A= error =3D ENOENT;=0A= break;=0A= vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= if ((vlan & HOOK_VLAN_SET_MASK) !=3D HOOK_VLAN_SET_MASK) {=0A= error =3D ENOENT;=0A= break;=0A= }=0A= /* Purge a rule that refers to this hook. */=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= priv->vlan_hook[(vlan & EVL_VLID_MASK)] =3D NULL;=0A= break;=0A= case NGM_VLAN_GET_TABLE:=0A= /* calculate vlans */=0A= vlan_count =3D 0;=0A= for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= if (priv->vlan_hook[vlan] !=3D NULL)=0A= vlan_count ++;=0A= }=0A= =0A= /* allocate memory for responce */=0A= NG_MKRESPONSE(resp, msg, sizeof(*t) +=0A= vlan_count * sizeof(*t->filter), M_NOWAIT);=0A= if (resp =3D=3D NULL) {=0A= error =3D ENOMEM;=0A= break;=0A= }=0A= =0A= /* pack data to responce */=0A= t =3D (struct ng_vlan_table *)resp->data;=0A= t->n =3D vlan_count;=0A= vf =3D &t->filter[0];=0A= for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= if (priv->vlan_hook[vlan] =3D=3D NULL)=0A= continue;=0A= =0A= vf->vlan =3D vlan;=0A= strncpy(vf->hook, NG_HOOK_NAME(priv->vlan_hook[vlan]),=0A= NG_HOOKSIZ);=0A= vf ++;=0A= }=0A= break;=0A= case NGM_VLAN_GET_ENCAP:=0A= NG_MKRESPONSE(resp, msg, sizeof(u_int32_t), M_NOWAIT);=0A= if (resp =3D=3D NULL) {=0A= error =3D ENOMEM;=0A= break;=0A= }=0A= (*((u_int32_t *)resp->data)) =3D priv->vlan_encap;=0A= break;=0A= case NGM_VLAN_SET_ENCAP:=0A= if (msg->header.arglen !=3D sizeof(u_int32_t)) {=0A= error =3D EINVAL;=0A= break;=0A= }=0A= priv->vlan_encap =3D ((*((u_int32_t *)msg->data)) !=3D 0);=0A= break;=0A= default: /* Unknown command. */=0A= error =3D EINVAL;=0A= break;=0A= }=0A= break;=0A= case NGM_FLOW_COOKIE:=0A= {=0A= struct ng_mesg *copy;=0A= =0A= /*=0A= * Flow control messages should come only=0A= * from downstream.=0A= */=0A= =0A= if (lasthook =3D=3D NULL)=0A= break;=0A= if (lasthook !=3D priv->downstream_hook)=0A= break;=0A= =0A= /* Broadcast the event to all uplinks. */=0A= for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= if (priv->vlan_hook[vlan] =3D=3D NULL)=0A= continue;=0A= =0A= NG_COPYMESSAGE(copy, msg, M_NOWAIT);=0A= if (copy =3D=3D NULL)=0A= continue;=0A= NG_SEND_MSG_HOOK(error, node, copy, priv->vlan_hook[vlan], 0);=0A= }=0A= break;=0A= }=0A= default: /* Unknown type cookie. */=0A= error =3D EINVAL;=0A= break;=0A= }=0A= NG_RESPOND_MSG(error, node, item, resp);=0A= NG_FREE_MSG(msg);=0A= return (error);=0A= }=0A= =0A= static int=0A= ng_vlan_rcvdata(hook_p hook, item_p item)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(NG_HOOK_NODE(hook));=0A= struct ether_header *eh;=0A= struct ether_vlan_header *evl =3D NULL;=0A= int error;=0A= uintptr_t vlan;=0A= struct mbuf *m;=0A= hook_p vlan_hook;=0A= =0A= /* Make sure we have an entire header. */=0A= NGI_GET_M(item, m);=0A= if (m->m_len < sizeof(*eh) &&=0A= (m =3D m_pullup(m, sizeof(*eh))) =3D=3D NULL) {=0A= NG_FREE_ITEM(item);=0A= return (EINVAL);=0A= }=0A= eh =3D mtod(m, struct ether_header *);=0A= if (hook =3D=3D priv->downstream_hook) {=0A= /*=0A= * If from downstream, select between a match hook=0A= * or the nomatch hook.=0A= */=0A= vlan_hook =3D priv->nomatch_hook;=0A= if (m->m_flags & M_VLANTAG ||=0A= eh->ether_type =3D=3D htons(ETHERTYPE_VLAN)) {=0A= if (m->m_flags & M_VLANTAG) {=0A= /*=0A= * Packet is tagged, m contains a normal=0A= * Ethernet frame; tag is stored out-of-band.=0A= */=0A= vlan =3D EVL_VLANOFTAG(m->m_pkthdr.ether_vtag);=0A= } else {=0A= if (m->m_len < sizeof(*evl) &&=0A= (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL) {=0A= NG_FREE_ITEM(item);=0A= return (EINVAL);=0A= }=0A= evl =3D mtod(m, struct ether_vlan_header *);=0A= vlan =3D EVL_VLANOFTAG(ntohs(evl->evl_tag));=0A= }=0A= =0A= if (priv->vlan_hook[vlan] !=3D NULL) {=0A= vlan_hook =3D priv->vlan_hook[vlan];=0A= if (m->m_flags & M_VLANTAG) {=0A= m->m_pkthdr.ether_vtag =3D 0;=0A= m->m_flags &=3D ~M_VLANTAG;=0A= } else {=0A= evl->evl_encap_proto =3D evl->evl_proto;=0A= bcopy(mtod(m, caddr_t),=0A= mtod(m, caddr_t) +=0A= ETHER_VLAN_ENCAP_LEN,=0A= ETHER_HDR_LEN);=0A= m_adj(m, ETHER_VLAN_ENCAP_LEN);=0A= }=0A= }=0A= }=0A= NG_FWD_NEW_DATA(error, item, vlan_hook, m);=0A= } else {=0A= /*=0A= * It is heading towards the downstream.=0A= * If from nomatch, pass it unmodified.=0A= * Otherwise, do the VLAN encapsulation.=0A= */=0A= if (hook !=3D priv->nomatch_hook) {=0A= vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= if ((vlan & HOOK_VLAN_SET_MASK) !=3D HOOK_VLAN_SET_MASK) {=0A= NG_FREE_ITEM(item);=0A= NG_FREE_M(m);=0A= return (EOPNOTSUPP);=0A= }=0A= =0A= if (priv->vlan_encap =3D=3D 0) {=0A= m->m_flags |=3D M_VLANTAG;=0A= m->m_pkthdr.ether_vtag =3D (vlan & EVL_VLID_MASK);=0A= } else {=0A= M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);=0A= /* M_PREPEND takes care of m_len and m_pkthdr.len. */=0A= if (m =3D=3D NULL || (m->m_len < sizeof(*evl) &&=0A= (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL)) {=0A= NG_FREE_ITEM(item);=0A= return (ENOMEM);=0A= }=0A= /*=0A= * Transform the Ethernet header into an Ethernet header=0A= * with 802.1Q encapsulation.=0A= */=0A= evl =3D mtod(m, struct ether_vlan_header *);=0A= bcopy((char *)evl + ETHER_VLAN_ENCAP_LEN,=0A= (char *)evl, (ETHER_HDR_LEN - ETHER_TYPE_LEN));=0A= evl->evl_encap_proto =3D htons(ETHERTYPE_VLAN);=0A= evl->evl_tag =3D htons((vlan & EVL_VLID_MASK));=0A= }=0A= }=0A= NG_FWD_NEW_DATA(error, item, priv->downstream_hook, m);=0A= }=0A= return (error);=0A= }=0A= =0A= static int=0A= ng_vlan_shutdown(node_p node)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(node);=0A= =0A= NG_NODE_SET_PRIVATE(node, NULL);=0A= NG_NODE_UNREF(node);=0A= free(priv, M_NETGRAPH);=0A= return (0);=0A= }=0A= =0A= static int=0A= ng_vlan_disconnect(hook_p hook)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(NG_HOOK_NODE(hook));=0A= uintptr_t vlan;=0A= =0A= if (hook =3D=3D priv->downstream_hook)=0A= priv->downstream_hook =3D NULL;=0A= else if (hook =3D=3D priv->nomatch_hook)=0A= priv->nomatch_hook =3D NULL;=0A= else {=0A= /* Purge a rule that refers to this hook. */=0A= vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= if ((vlan & HOOK_VLAN_SET_MASK) =3D=3D HOOK_VLAN_SET_MASK)=0A= priv->vlan_hook[(vlan & EVL_VLID_MASK)] =3D NULL;=0A= }=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) =3D=3D 0) &&=0A= (NG_NODE_IS_VALID(NG_HOOK_NODE(hook))))=0A= ng_rmnode_self(NG_HOOK_NODE(hook));=0A= return (0);=0A= }=0A= ------=_NextPart_000_00C0_01CC323C.DAE3A3C0 Content-Type: text/plain; name="ng_vlan.h" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ng_vlan.h" /*-=0A= * Copyright (c) 2003 IPNET Internet Communication Company=0A= * All rights reserved.=0A= *=0A= * Redistribution and use in source and binary forms, with or without=0A= * modification, are permitted provided that the following conditions=0A= * are met:=0A= * 1. Redistributions of source code must retain the above copyright=0A= * notice, this list of conditions and the following disclaimer.=0A= * 2. Redistributions in binary form must reproduce the above copyright=0A= * notice, this list of conditions and the following disclaimer in the=0A= * documentation and/or other materials provided with the = distribution.=0A= *=0A= * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND=0A= * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE=0A= * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR = PURPOSE=0A= * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE = LIABLE=0A= * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR = CONSEQUENTIAL=0A= * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE = GOODS=0A= * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)=0A= * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, = STRICT=0A= * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY = WAY=0A= * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF=0A= * SUCH DAMAGE.=0A= *=0A= * Author: Ruslan Ermilov =0A= *=0A= * $FreeBSD: src/sys/netgraph/ng_vlan.h,v 1.2.10.1 2009/08/03 08:13:06 = kensmith Exp $=0A= */=0A= =0A= #ifndef _NETGRAPH_NG_VLAN_H_=0A= #define _NETGRAPH_NG_VLAN_H_=0A= =0A= /* Node type name and magic cookie. */=0A= #define NG_VLAN_NODE_TYPE "vlan"=0A= #define NGM_VLAN_COOKIE 1068486472=0A= =0A= /* Hook names. */=0A= #define NG_VLAN_HOOK_DOWNSTREAM "downstream"=0A= #define NG_VLAN_HOOK_NOMATCH "nomatch"=0A= =0A= /* Netgraph commands. */=0A= enum {=0A= NGM_VLAN_ADD_FILTER =3D 1,=0A= NGM_VLAN_DEL_FILTER,=0A= NGM_VLAN_GET_TABLE,=0A= NGM_VLAN_GET_ENCAP,=0A= NGM_VLAN_SET_ENCAP=0A= };=0A= =0A= /* For NGM_VLAN_ADD_FILTER control message. */=0A= struct ng_vlan_filter {=0A= char hook[NG_HOOKSIZ];=0A= u_int16_t vlan;=0A= }; =0A= =0A= /* Keep this in sync with the above structure definition. */=0A= #define NG_VLAN_FILTER_FIELDS { \=0A= { "hook", &ng_parse_hookbuf_type }, \=0A= { "vlan", &ng_parse_uint16_type }, \=0A= { NULL } \=0A= }=0A= =0A= /* Structure returned by NGM_VLAN_GET_TABLE. */=0A= struct ng_vlan_table {=0A= u_int32_t n;=0A= struct ng_vlan_filter filter[];=0A= };=0A= =0A= /* Keep this in sync with the above structure definition. */=0A= #define NG_VLAN_TABLE_FIELDS { \=0A= { "n", &ng_parse_uint32_type }, \=0A= { "filter", &ng_vlan_table_array_type }, \=0A= { NULL } \=0A= }=0A= =0A= #endif /* _NETGRAPH_NG_VLAN_H_ */=0A= ------=_NextPart_000_00C0_01CC323C.DAE3A3C0-- From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 03:02:02 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB48E1065674 for ; Fri, 24 Jun 2011 03:02:02 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id A2E378FC08 for ; Fri, 24 Jun 2011 03:02:02 +0000 (UTC) Received: from [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a] (saphire3.sentex.ca [IPv6:2607:f3e0:0:4:f025:8813:7603:7e4a]) by smarthost1.sentex.ca (8.14.4/8.14.4) with ESMTP id p5O31xfX039217; Thu, 23 Jun 2011 23:01:59 -0400 (EDT) (envelope-from mike@sentex.net) Message-ID: <4E03FE29.4090100@sentex.net> Date: Thu, 23 Jun 2011 23:02:01 -0400 From: Mike Tancsa Organization: Sentex Communications User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Rozhuk.IM@gmail.com References: <4E0337A6.4020101@stsnet.ro> <4E033EDE.1030108@sentex.net> <4E036578.5030307@sentex.net> <06a38a6cef174a9a6e8084f519195caf.squirrel@mail.stsnet.ro> <4E0382A5.1070700@sentex.net> <495c6a2305f4f4946af9a90d77a107cf.squirrel@mail.stsnet.ro> <4E039A66.7050609@sentex.net> <4e039f4c.8189cc0a.0b68.2dd6@mx.google.com> <4E03A4AE.3000405@sentex.net> <4e03b45b.470fcc0a.27b0.2e95@mx.google.com> In-Reply-To: <4e03b45b.470fcc0a.27b0.2e95@mx.google.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on IPv6:2607:f3e0:0:1::12 Cc: freebsd-net@freebsd.org, 'Adrian Minta' Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 24 Jun 2011 03:02:03 -0000 On 6/23/2011 5:47 PM, rozhuk.im@gmail.com wrote: > > net.inet.ip.fastforwarding > - double check incoming packet, if: dst = this host / multicast / contain options > - all packets processing by one cpu core > > This option is good for one cpu core routers. Thanks, I didnt know that. And the netisr option ? Have you found that to be buggy ? ---Mike > > > -- > Rozhuk Ivan > > > >> -----Original Message----- >> From: Mike Tancsa [mailto:mike@sentex.net] >> Sent: Friday, June 24, 2011 5:40 AM >> To: Rozhuk.IM@gmail.com >> Cc: 'Adrian Minta'; freebsd-net@freebsd.org >> Subject: Re: FreeBSD 8.2 and MPD5 stability issues >> >> On 6/23/2011 4:17 PM, rozhuk.im@gmail.com wrote: >>> >>> Try: >>> net.inet.ip.fastforwarding = 0 >>> net.isr.bindthreads = 1 >>> net.isr.direct = 0 >>> net.isr.direct_force = 0 >> >> If net.isr.direct is disabled, does setting net.isr.bindthreads do >> anything ? Also, why disable the fastforwarding ? >> >> ---Mike >> >> >> >> -- >> ------------------- >> Mike Tancsa, tel +1 519 651 3400 >> Sentex Communications, mike@sentex.net >> Providing Internet services since 1994 www.sentex.net >> Cambridge, Ontario Canada http://www.tancsa.com/ > > > -- ------------------- Mike Tancsa, tel +1 519 651 3400 Sentex Communications, mike@sentex.net Providing Internet services since 1994 www.sentex.net Cambridge, Ontario Canada http://www.tancsa.com/ From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 17:08:28 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778211065670 for ; Fri, 24 Jun 2011 17:08:28 +0000 (UTC) (envelope-from rozhuk.im@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E42028FC0C for ; Fri, 24 Jun 2011 17:08:27 +0000 (UTC) Received: by bwz12 with SMTP id 12so3519515bwz.13 for ; Fri, 24 Jun 2011 10:08:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:reply-to:from:to:subject:date:message-id :mime-version:content-type:x-mailer:thread-index:content-language; bh=1UGJsNu+jalfLOjlHtmz5uuIdEgJFpZrgC5HbfG4aQo=; b=vtXuFMG8+YZX8pQJKiOhV8qS3VSEC/r6HW/umo/bsCufGkMGJ44yx68oVskp0cF3S1 Hbvdv0Y+Bomft+6aAWjPw8zumLqQNQDcDjbbd3RZ9kxjAknjHXfdoLWRbtNAfn+tOjNe tKh87pU7PuHByibdSR9Se7unFKAkrF3xz7vuc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=reply-to:from:to:subject:date:message-id:mime-version:content-type :x-mailer:thread-index:content-language; b=N4FyViYJkD/cukgMZSkAWdIvK0DwHrwodT0vkDmEKyEiThYzawhSqhsHCv94BqztzC nxjrNaiZlZJsiEbjF9+GPpof62L01nUSH3yXmMJih99Q+EVBNEpCjYvQoD1EGlnv7c/z S8I/b27QIWkljwI18WE2P0cp6cOrH6lnLOT0c= Received: by 10.204.141.146 with SMTP id m18mr2278280bku.25.1308935306825; Fri, 24 Jun 2011 10:08:26 -0700 (PDT) Received: from rimwks1x64 ([92.124.31.124]) by mx.google.com with ESMTPS id l24sm1798884bkw.15.2011.06.24.10.08.21 (version=SSLv3 cipher=OTHER); Fri, 24 Jun 2011 10:08:25 -0700 (PDT) From: rozhuk.im@gmail.com To: Date: Sat, 25 Jun 2011 02:08:17 +0900 Message-ID: <4e04c489.d899cc0a.43e4.4ad6@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0001_01CC32DC.C33B2950" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcwykTbaNiFrv8+8RWuTntPUEoR3Lg== Content-Language: ru X-Mailman-Approved-At: Fri, 24 Jun 2011 17:49:49 +0000 Subject: ng_vlan improvements X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk.IM@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2011 17:08:28 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0001_01CC32DC.C33B2950 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Diffs =A0 -- Rozhuk Ivan =A0=20 ------=_NextPart_000_0001_01CC32DC.C33B2950 Content-Type: application/octet-stream; name="ng_vlan.h.orig.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ng_vlan.h.orig.patch" --- ng_vlan.h.orig 2009-08-03 17:13:06.000000000 +0900=0A= +++ ng_vlan.h 2011-06-24 05:35:05.000000000 +0900=0A= @@ -43,7 +43,9 @@=0A= enum {=0A= NGM_VLAN_ADD_FILTER =3D 1,=0A= NGM_VLAN_DEL_FILTER,=0A= - NGM_VLAN_GET_TABLE=0A= + NGM_VLAN_GET_TABLE,=0A= + NGM_VLAN_GET_ENCAP,=0A= + NGM_VLAN_SET_ENCAP=0A= };=0A= =0A= /* For NGM_VLAN_ADD_FILTER control message. */=0A= ------=_NextPart_000_0001_01CC32DC.C33B2950 Content-Type: application/octet-stream; name="ng_vlan.c.orig.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ng_vlan.c.orig.patch" --- ng_vlan.c.orig 2009-08-03 17:13:06.000000000 +0900=0A= +++ ng_vlan.c 2011-06-24 21:00:22.000000000 +0900=0A= @@ -110,6 +110,20 @@=0A= NULL,=0A= &ng_vlan_table_type=0A= },=0A= + {=0A= + NGM_VLAN_COOKIE,=0A= + NGM_VLAN_GET_ENCAP,=0A= + "getencap",=0A= + NULL,=0A= + &ng_parse_int32_type=0A= + },=0A= + {=0A= + NGM_VLAN_COOKIE,=0A= + NGM_VLAN_SET_ENCAP,=0A= + "setencap",=0A= + &ng_parse_int32_type,=0A= + NULL=0A= + },=0A= { 0 }=0A= };=0A= =0A= @@ -126,47 +140,27 @@=0A= };=0A= NETGRAPH_INIT(vlan, &ng_vlan_typestruct);=0A= =0A= -struct filter {=0A= - LIST_ENTRY(filter) next;=0A= - u_int16_t vlan;=0A= - hook_p hook;=0A= -};=0A= =0A= -#define HASHSIZE 16=0A= -#define HASH(id) ((((id) >> 8) ^ ((id) >> 4) ^ (id)) & 0x0f)=0A= -LIST_HEAD(filterhead, filter);=0A= =0A= typedef struct {=0A= hook_p downstream_hook;=0A= hook_p nomatch_hook;=0A= - struct filterhead hashtable[HASHSIZE];=0A= - u_int32_t nent;=0A= + hook_p vlan_hook[(EVL_VLID_MASK + 1)];=0A= + int vlan_encap;=0A= } *priv_p;=0A= +#define HOOK_VLAN_SET_MASK ((uintptr_t)((~0) & ~(EVL_VLID_MASK)))=0A= =0A= -static struct filter *=0A= -ng_vlan_findentry(priv_p priv, u_int16_t vlan)=0A= -{=0A= - struct filterhead *chain =3D &priv->hashtable[HASH(vlan)];=0A= - struct filter *f;=0A= -=0A= - LIST_FOREACH(f, chain, next)=0A= - if (f->vlan =3D=3D vlan)=0A= - return (f);=0A= - return (NULL);=0A= -}=0A= =0A= static int=0A= ng_vlan_constructor(node_p node)=0A= {=0A= priv_p priv;=0A= - int i;=0A= =0A= priv =3D malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO);=0A= if (priv =3D=3D NULL)=0A= return (ENOMEM);=0A= - for (i =3D 0; i < HASHSIZE; i++)=0A= - LIST_INIT(&priv->hashtable[i]);=0A= - NG_NODE_SET_PRIVATE(node, priv);=0A= + priv->vlan_encap =3D 1;=0A= +=0A= return (0);=0A= }=0A= =0A= @@ -193,13 +187,12 @@=0A= ng_vlan_rcvmsg(node_p node, item_p item, hook_p lasthook)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(node);=0A= - int error =3D 0;=0A= struct ng_mesg *msg, *resp =3D NULL;=0A= struct ng_vlan_filter *vf;=0A= - struct filter *f;=0A= hook_p hook;=0A= struct ng_vlan_table *t;=0A= - int i;=0A= + uintptr_t vlan, vlan_count;=0A= + int error =3D 0;=0A= =0A= NGI_GET_MSG(item, msg);=0A= /* Deal with message according to cookie and command. */=0A= @@ -231,30 +224,18 @@=0A= break;=0A= }=0A= /* And is not already in service. */=0A= - if (NG_HOOK_PRIVATE(hook) !=3D NULL) {=0A= + if (((uintptr_t)NG_HOOK_PRIVATE(hook) & HOOK_VLAN_SET_MASK) =3D=3D = HOOK_VLAN_SET_MASK) {=0A= error =3D EEXIST;=0A= break;=0A= }=0A= /* Check we don't already trap this VLAN. */=0A= - if (ng_vlan_findentry(priv, vf->vlan)) {=0A= + if (priv->vlan_hook[vf->vlan] !=3D NULL) {=0A= error =3D EEXIST;=0A= break;=0A= }=0A= - /* Create filter. */=0A= - f =3D malloc(sizeof(*f),=0A= - M_NETGRAPH, M_NOWAIT | M_ZERO);=0A= - if (f =3D=3D NULL) {=0A= - error =3D ENOMEM;=0A= - break;=0A= - }=0A= - /* Link filter and hook together. */=0A= - f->hook =3D hook;=0A= - f->vlan =3D vf->vlan;=0A= - NG_HOOK_SET_PRIVATE(hook, f);=0A= - /* Register filter in a hash table. */=0A= - LIST_INSERT_HEAD(=0A= - &priv->hashtable[HASH(f->vlan)], f, next);=0A= - priv->nent++;=0A= + /* Link vlan and hook together. */=0A= + priv->vlan_hook[vf->vlan] =3D hook;=0A= + NG_HOOK_SET_PRIVATE(hook, (void *)(HOOK_VLAN_SET_MASK | vf->vlan));=0A= break;=0A= case NGM_VLAN_DEL_FILTER:=0A= /* Check that message is long enough. */=0A= @@ -264,35 +245,64 @@=0A= }=0A= /* Check that hook exists and is active. */=0A= hook =3D ng_findhook(node, (char *)msg->data);=0A= - if (hook =3D=3D NULL ||=0A= - (f =3D NG_HOOK_PRIVATE(hook)) =3D=3D NULL) {=0A= + if (hook =3D=3D NULL)=0A= + error =3D ENOENT;=0A= + break;=0A= + vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= + if ((vlan & HOOK_VLAN_SET_MASK) !=3D HOOK_VLAN_SET_MASK) {=0A= error =3D ENOENT;=0A= break;=0A= }=0A= + vlan &=3D EVL_VLID_MASK; /* remove HOOK_VLAN_SET_MASK from vlan num = */=0A= +=0A= /* Purge a rule that refers to this hook. */=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= - LIST_REMOVE(f, next);=0A= - priv->nent--;=0A= - free(f, M_NETGRAPH);=0A= + priv->vlan_hook[vlan] =3D NULL;=0A= break;=0A= case NGM_VLAN_GET_TABLE:=0A= + /* calculate vlans */=0A= + vlan_count =3D 0;=0A= + for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= + if (priv->vlan_hook[vlan] !=3D NULL)=0A= + vlan_count ++;=0A= + }=0A= +=0A= + /* allocate memory for responce */=0A= NG_MKRESPONSE(resp, msg, sizeof(*t) +=0A= - priv->nent * sizeof(*t->filter), M_NOWAIT);=0A= + vlan_count * sizeof(*t->filter), M_NOWAIT);=0A= if (resp =3D=3D NULL) {=0A= error =3D ENOMEM;=0A= break;=0A= }=0A= +=0A= + /* pack data to responce */=0A= t =3D (struct ng_vlan_table *)resp->data;=0A= - t->n =3D priv->nent;=0A= + t->n =3D vlan_count;=0A= vf =3D &t->filter[0];=0A= - for (i =3D 0; i < HASHSIZE; i++) {=0A= - LIST_FOREACH(f, &priv->hashtable[i], next) {=0A= - vf->vlan =3D f->vlan;=0A= - strncpy(vf->hook, NG_HOOK_NAME(f->hook),=0A= + for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= + if (priv->vlan_hook[vlan] =3D=3D NULL)=0A= + continue;=0A= +=0A= + vf->vlan =3D vlan;=0A= + strncpy(vf->hook, NG_HOOK_NAME(priv->vlan_hook[vlan]),=0A= NG_HOOKSIZ);=0A= - vf++;=0A= - }=0A= + vf ++;=0A= + }=0A= + break;=0A= + case NGM_VLAN_GET_ENCAP:=0A= + NG_MKRESPONSE(resp, msg, sizeof(u_int32_t), M_NOWAIT);=0A= + if (resp =3D=3D NULL) {=0A= + error =3D ENOMEM;=0A= + break;=0A= }=0A= + (*((u_int32_t *)resp->data)) =3D priv->vlan_encap;=0A= + break;=0A= + case NGM_VLAN_SET_ENCAP:=0A= + if (msg->header.arglen !=3D sizeof(u_int32_t)) {=0A= + error =3D EINVAL;=0A= + break;=0A= + }=0A= + priv->vlan_encap =3D ((*((u_int32_t *)msg->data)) !=3D 0);=0A= break;=0A= default: /* Unknown command. */=0A= error =3D EINVAL;=0A= @@ -302,8 +312,6 @@=0A= case NGM_FLOW_COOKIE:=0A= {=0A= struct ng_mesg *copy;=0A= - struct filterhead *chain;=0A= - struct filter *f;=0A= =0A= /*=0A= * Flow control messages should come only=0A= @@ -316,15 +324,15 @@=0A= break;=0A= =0A= /* Broadcast the event to all uplinks. */=0A= - for (i =3D 0, chain =3D priv->hashtable; i < HASHSIZE;=0A= - i++, chain++)=0A= - LIST_FOREACH(f, chain, next) {=0A= + for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= + if (priv->vlan_hook[vlan] =3D=3D NULL)=0A= + continue;=0A= +=0A= NG_COPYMESSAGE(copy, msg, M_NOWAIT);=0A= if (copy =3D=3D NULL)=0A= - continue;=0A= - NG_SEND_MSG_HOOK(error, node, copy, f->hook, 0);=0A= + continue;=0A= + NG_SEND_MSG_HOOK(error, node, copy, priv->vlan_hook[vlan], 0);=0A= }=0A= -=0A= break;=0A= }=0A= default: /* Unknown type cookie. */=0A= @@ -343,9 +351,9 @@=0A= struct ether_header *eh;=0A= struct ether_vlan_header *evl =3D NULL;=0A= int error;=0A= - u_int16_t vlan;=0A= + uintptr_t vlan;=0A= struct mbuf *m;=0A= - struct filter *f;=0A= + hook_p vlan_hook;=0A= =0A= /* Make sure we have an entire header. */=0A= NGI_GET_M(item, m);=0A= @@ -360,6 +368,7 @@=0A= * If from downstream, select between a match hook=0A= * or the nomatch hook.=0A= */=0A= + vlan_hook =3D priv->nomatch_hook;=0A= if (m->m_flags & M_VLANTAG ||=0A= eh->ether_type =3D=3D htons(ETHERTYPE_VLAN)) {=0A= if (m->m_flags & M_VLANTAG) {=0A= @@ -377,25 +386,20 @@=0A= evl =3D mtod(m, struct ether_vlan_header *);=0A= vlan =3D EVL_VLANOFTAG(ntohs(evl->evl_tag));=0A= }=0A= - if ((f =3D ng_vlan_findentry(priv, vlan)) !=3D NULL) {=0A= +=0A= + if (priv->vlan_hook[vlan] !=3D NULL) {=0A= + vlan_hook =3D priv->vlan_hook[vlan];=0A= if (m->m_flags & M_VLANTAG) {=0A= m->m_pkthdr.ether_vtag =3D 0;=0A= m->m_flags &=3D ~M_VLANTAG;=0A= } else {=0A= - evl->evl_encap_proto =3D evl->evl_proto;=0A= - bcopy(mtod(m, caddr_t),=0A= - mtod(m, caddr_t) +=0A= - ETHER_VLAN_ENCAP_LEN,=0A= - ETHER_HDR_LEN);=0A= + bcopy((char *)evl, (char *)evl + ETHER_VLAN_ENCAP_LEN,=0A= + (ETHER_HDR_LEN - ETHER_TYPE_LEN));=0A= m_adj(m, ETHER_VLAN_ENCAP_LEN);=0A= }=0A= }=0A= - } else=0A= - f =3D NULL;=0A= - if (f !=3D NULL)=0A= - NG_FWD_NEW_DATA(error, item, f->hook, m);=0A= - else=0A= - NG_FWD_NEW_DATA(error, item, priv->nomatch_hook, m);=0A= + }=0A= + NG_FWD_NEW_DATA(error, item, vlan_hook, m);=0A= } else {=0A= /*=0A= * It is heading towards the downstream.=0A= @@ -403,28 +407,35 @@=0A= * Otherwise, do the VLAN encapsulation.=0A= */=0A= if (hook !=3D priv->nomatch_hook) {=0A= - if ((f =3D NG_HOOK_PRIVATE(hook)) =3D=3D NULL) {=0A= + vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= + if ((vlan & HOOK_VLAN_SET_MASK) !=3D HOOK_VLAN_SET_MASK) {=0A= NG_FREE_ITEM(item);=0A= NG_FREE_M(m);=0A= return (EOPNOTSUPP);=0A= }=0A= - M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);=0A= - /* M_PREPEND takes care of m_len and m_pkthdr.len. */=0A= - if (m =3D=3D NULL || (m->m_len < sizeof(*evl) &&=0A= - (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL)) {=0A= - NG_FREE_ITEM(item);=0A= - return (ENOMEM);=0A= + vlan &=3D EVL_VLID_MASK; /* remove HOOK_VLAN_SET_MASK from vlan num = */=0A= + =0A= + if (priv->vlan_encap =3D=3D 0) {=0A= + m->m_flags |=3D M_VLANTAG;=0A= + m->m_pkthdr.ether_vtag =3D vlan;=0A= + } else {=0A= + M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);=0A= + /* M_PREPEND takes care of m_len and m_pkthdr.len. */=0A= + if (m =3D=3D NULL || (m->m_len < sizeof(*evl) &&=0A= + (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL)) {=0A= + NG_FREE_ITEM(item);=0A= + return (ENOMEM);=0A= + }=0A= + /*=0A= + * Transform the Ethernet header into an Ethernet header=0A= + * with 802.1Q encapsulation.=0A= + */=0A= + evl =3D mtod(m, struct ether_vlan_header *);=0A= + bcopy((char *)evl + ETHER_VLAN_ENCAP_LEN,=0A= + (char *)evl, (ETHER_HDR_LEN - ETHER_TYPE_LEN));=0A= + evl->evl_encap_proto =3D htons(ETHERTYPE_VLAN);=0A= + evl->evl_tag =3D htons(vlan);=0A= }=0A= - /*=0A= - * Transform the Ethernet header into an Ethernet header=0A= - * with 802.1Q encapsulation.=0A= - */=0A= - bcopy(mtod(m, char *) + ETHER_VLAN_ENCAP_LEN,=0A= - mtod(m, char *), ETHER_HDR_LEN);=0A= - evl =3D mtod(m, struct ether_vlan_header *);=0A= - evl->evl_proto =3D evl->evl_encap_proto;=0A= - evl->evl_encap_proto =3D htons(ETHERTYPE_VLAN);=0A= - evl->evl_tag =3D htons(f->vlan);=0A= }=0A= NG_FWD_NEW_DATA(error, item, priv->downstream_hook, m);=0A= }=0A= @@ -446,7 +457,7 @@=0A= ng_vlan_disconnect(hook_p hook)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(NG_HOOK_NODE(hook));=0A= - struct filter *f;=0A= + uintptr_t vlan;=0A= =0A= if (hook =3D=3D priv->downstream_hook)=0A= priv->downstream_hook =3D NULL;=0A= @@ -454,11 +465,9 @@=0A= priv->nomatch_hook =3D NULL;=0A= else {=0A= /* Purge a rule that refers to this hook. */=0A= - if ((f =3D NG_HOOK_PRIVATE(hook)) !=3D NULL) {=0A= - LIST_REMOVE(f, next);=0A= - priv->nent--;=0A= - free(f, M_NETGRAPH);=0A= - }=0A= + vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= + if ((vlan & HOOK_VLAN_SET_MASK) =3D=3D HOOK_VLAN_SET_MASK)=0A= + priv->vlan_hook[(vlan & EVL_VLID_MASK)] =3D NULL;=0A= }=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) =3D=3D 0) &&=0A= ------=_NextPart_000_0001_01CC32DC.C33B2950-- From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 17:23:53 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 567DB106566B for ; Fri, 24 Jun 2011 17:23:53 +0000 (UTC) (envelope-from Rozhuk_I@mail.ru) Received: from fallback6.mail.ru (fallback6.mail.ru [94.100.176.134]) by mx1.freebsd.org (Postfix) with ESMTP id AAAF48FC08 for ; Fri, 24 Jun 2011 17:23:52 +0000 (UTC) Received: from smtp14.mail.ru (smtp14.mail.ru [94.100.176.91]) by fallback6.mail.ru (mPOP.Fallback_MX) with ESMTP id 7805B3B0A163 for ; Fri, 24 Jun 2011 21:07:57 +0400 (MSD) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:Reply-To; bh=qRIPbVWMVWqPO8Lz+q5uRXDVxnwCCI++uEwyHcx7XBM=; b=Xd93XEwXLsiqdvPMQEDcKK6kTxXGU7nqWEHC/rvMzq/LVXvzC8cBujCNG2dbf7VIR/ggfHa9X1czTpbwUp5ZPqv3uH7IZUn+E7BiuUsL1ziS5CxONow+EZfh01UJ4zxw; Received: from [92.124.31.124] (port=52076 helo=rimwks1x64) by smtp14.mail.ru with asmtp id 1Qa9r6-0002iw-00 for freebsd-net@freebsd.org; Fri, 24 Jun 2011 21:07:44 +0400 From: "Rozhuk Ivan" To: Date: Sat, 25 Jun 2011 02:07:36 +0900 Message-ID: <00d001cc3291$3c277f90$b4767eb0$@ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00D1_01CC32DC.AC0F2790" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcwykTbaNiFrv8+8RWuTntPUEoR3Lg== Content-Language: ru X-Spam: Not detected X-Mras: Ok X-Mailman-Approved-At: Fri, 24 Jun 2011 17:55:30 +0000 Subject: ng_vlan improvements X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Rozhuk_I@mail.ru List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jun 2011 17:23:53 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_00D1_01CC32DC.AC0F2790 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: quoted-printable Diffs =A0 -- Rozhuk Ivan =A0=20 ------=_NextPart_000_00D1_01CC32DC.AC0F2790 Content-Type: application/octet-stream; name="ng_vlan.h.orig.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ng_vlan.h.orig.patch" --- ng_vlan.h.orig 2009-08-03 17:13:06.000000000 +0900=0A= +++ ng_vlan.h 2011-06-24 05:35:05.000000000 +0900=0A= @@ -43,7 +43,9 @@=0A= enum {=0A= NGM_VLAN_ADD_FILTER =3D 1,=0A= NGM_VLAN_DEL_FILTER,=0A= - NGM_VLAN_GET_TABLE=0A= + NGM_VLAN_GET_TABLE,=0A= + NGM_VLAN_GET_ENCAP,=0A= + NGM_VLAN_SET_ENCAP=0A= };=0A= =0A= /* For NGM_VLAN_ADD_FILTER control message. */=0A= ------=_NextPart_000_00D1_01CC32DC.AC0F2790 Content-Type: application/octet-stream; name="ng_vlan.c.orig.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ng_vlan.c.orig.patch" --- ng_vlan.c.orig 2009-08-03 17:13:06.000000000 +0900=0A= +++ ng_vlan.c 2011-06-24 21:00:22.000000000 +0900=0A= @@ -110,6 +110,20 @@=0A= NULL,=0A= &ng_vlan_table_type=0A= },=0A= + {=0A= + NGM_VLAN_COOKIE,=0A= + NGM_VLAN_GET_ENCAP,=0A= + "getencap",=0A= + NULL,=0A= + &ng_parse_int32_type=0A= + },=0A= + {=0A= + NGM_VLAN_COOKIE,=0A= + NGM_VLAN_SET_ENCAP,=0A= + "setencap",=0A= + &ng_parse_int32_type,=0A= + NULL=0A= + },=0A= { 0 }=0A= };=0A= =0A= @@ -126,47 +140,27 @@=0A= };=0A= NETGRAPH_INIT(vlan, &ng_vlan_typestruct);=0A= =0A= -struct filter {=0A= - LIST_ENTRY(filter) next;=0A= - u_int16_t vlan;=0A= - hook_p hook;=0A= -};=0A= =0A= -#define HASHSIZE 16=0A= -#define HASH(id) ((((id) >> 8) ^ ((id) >> 4) ^ (id)) & 0x0f)=0A= -LIST_HEAD(filterhead, filter);=0A= =0A= typedef struct {=0A= hook_p downstream_hook;=0A= hook_p nomatch_hook;=0A= - struct filterhead hashtable[HASHSIZE];=0A= - u_int32_t nent;=0A= + hook_p vlan_hook[(EVL_VLID_MASK + 1)];=0A= + int vlan_encap;=0A= } *priv_p;=0A= +#define HOOK_VLAN_SET_MASK ((uintptr_t)((~0) & ~(EVL_VLID_MASK)))=0A= =0A= -static struct filter *=0A= -ng_vlan_findentry(priv_p priv, u_int16_t vlan)=0A= -{=0A= - struct filterhead *chain =3D &priv->hashtable[HASH(vlan)];=0A= - struct filter *f;=0A= -=0A= - LIST_FOREACH(f, chain, next)=0A= - if (f->vlan =3D=3D vlan)=0A= - return (f);=0A= - return (NULL);=0A= -}=0A= =0A= static int=0A= ng_vlan_constructor(node_p node)=0A= {=0A= priv_p priv;=0A= - int i;=0A= =0A= priv =3D malloc(sizeof(*priv), M_NETGRAPH, M_NOWAIT | M_ZERO);=0A= if (priv =3D=3D NULL)=0A= return (ENOMEM);=0A= - for (i =3D 0; i < HASHSIZE; i++)=0A= - LIST_INIT(&priv->hashtable[i]);=0A= - NG_NODE_SET_PRIVATE(node, priv);=0A= + priv->vlan_encap =3D 1;=0A= +=0A= return (0);=0A= }=0A= =0A= @@ -193,13 +187,12 @@=0A= ng_vlan_rcvmsg(node_p node, item_p item, hook_p lasthook)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(node);=0A= - int error =3D 0;=0A= struct ng_mesg *msg, *resp =3D NULL;=0A= struct ng_vlan_filter *vf;=0A= - struct filter *f;=0A= hook_p hook;=0A= struct ng_vlan_table *t;=0A= - int i;=0A= + uintptr_t vlan, vlan_count;=0A= + int error =3D 0;=0A= =0A= NGI_GET_MSG(item, msg);=0A= /* Deal with message according to cookie and command. */=0A= @@ -231,30 +224,18 @@=0A= break;=0A= }=0A= /* And is not already in service. */=0A= - if (NG_HOOK_PRIVATE(hook) !=3D NULL) {=0A= + if (((uintptr_t)NG_HOOK_PRIVATE(hook) & HOOK_VLAN_SET_MASK) =3D=3D = HOOK_VLAN_SET_MASK) {=0A= error =3D EEXIST;=0A= break;=0A= }=0A= /* Check we don't already trap this VLAN. */=0A= - if (ng_vlan_findentry(priv, vf->vlan)) {=0A= + if (priv->vlan_hook[vf->vlan] !=3D NULL) {=0A= error =3D EEXIST;=0A= break;=0A= }=0A= - /* Create filter. */=0A= - f =3D malloc(sizeof(*f),=0A= - M_NETGRAPH, M_NOWAIT | M_ZERO);=0A= - if (f =3D=3D NULL) {=0A= - error =3D ENOMEM;=0A= - break;=0A= - }=0A= - /* Link filter and hook together. */=0A= - f->hook =3D hook;=0A= - f->vlan =3D vf->vlan;=0A= - NG_HOOK_SET_PRIVATE(hook, f);=0A= - /* Register filter in a hash table. */=0A= - LIST_INSERT_HEAD(=0A= - &priv->hashtable[HASH(f->vlan)], f, next);=0A= - priv->nent++;=0A= + /* Link vlan and hook together. */=0A= + priv->vlan_hook[vf->vlan] =3D hook;=0A= + NG_HOOK_SET_PRIVATE(hook, (void *)(HOOK_VLAN_SET_MASK | vf->vlan));=0A= break;=0A= case NGM_VLAN_DEL_FILTER:=0A= /* Check that message is long enough. */=0A= @@ -264,35 +245,64 @@=0A= }=0A= /* Check that hook exists and is active. */=0A= hook =3D ng_findhook(node, (char *)msg->data);=0A= - if (hook =3D=3D NULL ||=0A= - (f =3D NG_HOOK_PRIVATE(hook)) =3D=3D NULL) {=0A= + if (hook =3D=3D NULL)=0A= + error =3D ENOENT;=0A= + break;=0A= + vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= + if ((vlan & HOOK_VLAN_SET_MASK) !=3D HOOK_VLAN_SET_MASK) {=0A= error =3D ENOENT;=0A= break;=0A= }=0A= + vlan &=3D EVL_VLID_MASK; /* remove HOOK_VLAN_SET_MASK from vlan num = */=0A= +=0A= /* Purge a rule that refers to this hook. */=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= - LIST_REMOVE(f, next);=0A= - priv->nent--;=0A= - free(f, M_NETGRAPH);=0A= + priv->vlan_hook[vlan] =3D NULL;=0A= break;=0A= case NGM_VLAN_GET_TABLE:=0A= + /* calculate vlans */=0A= + vlan_count =3D 0;=0A= + for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= + if (priv->vlan_hook[vlan] !=3D NULL)=0A= + vlan_count ++;=0A= + }=0A= +=0A= + /* allocate memory for responce */=0A= NG_MKRESPONSE(resp, msg, sizeof(*t) +=0A= - priv->nent * sizeof(*t->filter), M_NOWAIT);=0A= + vlan_count * sizeof(*t->filter), M_NOWAIT);=0A= if (resp =3D=3D NULL) {=0A= error =3D ENOMEM;=0A= break;=0A= }=0A= +=0A= + /* pack data to responce */=0A= t =3D (struct ng_vlan_table *)resp->data;=0A= - t->n =3D priv->nent;=0A= + t->n =3D vlan_count;=0A= vf =3D &t->filter[0];=0A= - for (i =3D 0; i < HASHSIZE; i++) {=0A= - LIST_FOREACH(f, &priv->hashtable[i], next) {=0A= - vf->vlan =3D f->vlan;=0A= - strncpy(vf->hook, NG_HOOK_NAME(f->hook),=0A= + for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= + if (priv->vlan_hook[vlan] =3D=3D NULL)=0A= + continue;=0A= +=0A= + vf->vlan =3D vlan;=0A= + strncpy(vf->hook, NG_HOOK_NAME(priv->vlan_hook[vlan]),=0A= NG_HOOKSIZ);=0A= - vf++;=0A= - }=0A= + vf ++;=0A= + }=0A= + break;=0A= + case NGM_VLAN_GET_ENCAP:=0A= + NG_MKRESPONSE(resp, msg, sizeof(u_int32_t), M_NOWAIT);=0A= + if (resp =3D=3D NULL) {=0A= + error =3D ENOMEM;=0A= + break;=0A= }=0A= + (*((u_int32_t *)resp->data)) =3D priv->vlan_encap;=0A= + break;=0A= + case NGM_VLAN_SET_ENCAP:=0A= + if (msg->header.arglen !=3D sizeof(u_int32_t)) {=0A= + error =3D EINVAL;=0A= + break;=0A= + }=0A= + priv->vlan_encap =3D ((*((u_int32_t *)msg->data)) !=3D 0);=0A= break;=0A= default: /* Unknown command. */=0A= error =3D EINVAL;=0A= @@ -302,8 +312,6 @@=0A= case NGM_FLOW_COOKIE:=0A= {=0A= struct ng_mesg *copy;=0A= - struct filterhead *chain;=0A= - struct filter *f;=0A= =0A= /*=0A= * Flow control messages should come only=0A= @@ -316,15 +324,15 @@=0A= break;=0A= =0A= /* Broadcast the event to all uplinks. */=0A= - for (i =3D 0, chain =3D priv->hashtable; i < HASHSIZE;=0A= - i++, chain++)=0A= - LIST_FOREACH(f, chain, next) {=0A= + for (vlan =3D 0; vlan < (EVL_VLID_MASK + 1); vlan ++) {=0A= + if (priv->vlan_hook[vlan] =3D=3D NULL)=0A= + continue;=0A= +=0A= NG_COPYMESSAGE(copy, msg, M_NOWAIT);=0A= if (copy =3D=3D NULL)=0A= - continue;=0A= - NG_SEND_MSG_HOOK(error, node, copy, f->hook, 0);=0A= + continue;=0A= + NG_SEND_MSG_HOOK(error, node, copy, priv->vlan_hook[vlan], 0);=0A= }=0A= -=0A= break;=0A= }=0A= default: /* Unknown type cookie. */=0A= @@ -343,9 +351,9 @@=0A= struct ether_header *eh;=0A= struct ether_vlan_header *evl =3D NULL;=0A= int error;=0A= - u_int16_t vlan;=0A= + uintptr_t vlan;=0A= struct mbuf *m;=0A= - struct filter *f;=0A= + hook_p vlan_hook;=0A= =0A= /* Make sure we have an entire header. */=0A= NGI_GET_M(item, m);=0A= @@ -360,6 +368,7 @@=0A= * If from downstream, select between a match hook=0A= * or the nomatch hook.=0A= */=0A= + vlan_hook =3D priv->nomatch_hook;=0A= if (m->m_flags & M_VLANTAG ||=0A= eh->ether_type =3D=3D htons(ETHERTYPE_VLAN)) {=0A= if (m->m_flags & M_VLANTAG) {=0A= @@ -377,25 +386,20 @@=0A= evl =3D mtod(m, struct ether_vlan_header *);=0A= vlan =3D EVL_VLANOFTAG(ntohs(evl->evl_tag));=0A= }=0A= - if ((f =3D ng_vlan_findentry(priv, vlan)) !=3D NULL) {=0A= +=0A= + if (priv->vlan_hook[vlan] !=3D NULL) {=0A= + vlan_hook =3D priv->vlan_hook[vlan];=0A= if (m->m_flags & M_VLANTAG) {=0A= m->m_pkthdr.ether_vtag =3D 0;=0A= m->m_flags &=3D ~M_VLANTAG;=0A= } else {=0A= - evl->evl_encap_proto =3D evl->evl_proto;=0A= - bcopy(mtod(m, caddr_t),=0A= - mtod(m, caddr_t) +=0A= - ETHER_VLAN_ENCAP_LEN,=0A= - ETHER_HDR_LEN);=0A= + bcopy((char *)evl, (char *)evl + ETHER_VLAN_ENCAP_LEN,=0A= + (ETHER_HDR_LEN - ETHER_TYPE_LEN));=0A= m_adj(m, ETHER_VLAN_ENCAP_LEN);=0A= }=0A= }=0A= - } else=0A= - f =3D NULL;=0A= - if (f !=3D NULL)=0A= - NG_FWD_NEW_DATA(error, item, f->hook, m);=0A= - else=0A= - NG_FWD_NEW_DATA(error, item, priv->nomatch_hook, m);=0A= + }=0A= + NG_FWD_NEW_DATA(error, item, vlan_hook, m);=0A= } else {=0A= /*=0A= * It is heading towards the downstream.=0A= @@ -403,28 +407,35 @@=0A= * Otherwise, do the VLAN encapsulation.=0A= */=0A= if (hook !=3D priv->nomatch_hook) {=0A= - if ((f =3D NG_HOOK_PRIVATE(hook)) =3D=3D NULL) {=0A= + vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= + if ((vlan & HOOK_VLAN_SET_MASK) !=3D HOOK_VLAN_SET_MASK) {=0A= NG_FREE_ITEM(item);=0A= NG_FREE_M(m);=0A= return (EOPNOTSUPP);=0A= }=0A= - M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);=0A= - /* M_PREPEND takes care of m_len and m_pkthdr.len. */=0A= - if (m =3D=3D NULL || (m->m_len < sizeof(*evl) &&=0A= - (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL)) {=0A= - NG_FREE_ITEM(item);=0A= - return (ENOMEM);=0A= + vlan &=3D EVL_VLID_MASK; /* remove HOOK_VLAN_SET_MASK from vlan num = */=0A= + =0A= + if (priv->vlan_encap =3D=3D 0) {=0A= + m->m_flags |=3D M_VLANTAG;=0A= + m->m_pkthdr.ether_vtag =3D vlan;=0A= + } else {=0A= + M_PREPEND(m, ETHER_VLAN_ENCAP_LEN, M_DONTWAIT);=0A= + /* M_PREPEND takes care of m_len and m_pkthdr.len. */=0A= + if (m =3D=3D NULL || (m->m_len < sizeof(*evl) &&=0A= + (m =3D m_pullup(m, sizeof(*evl))) =3D=3D NULL)) {=0A= + NG_FREE_ITEM(item);=0A= + return (ENOMEM);=0A= + }=0A= + /*=0A= + * Transform the Ethernet header into an Ethernet header=0A= + * with 802.1Q encapsulation.=0A= + */=0A= + evl =3D mtod(m, struct ether_vlan_header *);=0A= + bcopy((char *)evl + ETHER_VLAN_ENCAP_LEN,=0A= + (char *)evl, (ETHER_HDR_LEN - ETHER_TYPE_LEN));=0A= + evl->evl_encap_proto =3D htons(ETHERTYPE_VLAN);=0A= + evl->evl_tag =3D htons(vlan);=0A= }=0A= - /*=0A= - * Transform the Ethernet header into an Ethernet header=0A= - * with 802.1Q encapsulation.=0A= - */=0A= - bcopy(mtod(m, char *) + ETHER_VLAN_ENCAP_LEN,=0A= - mtod(m, char *), ETHER_HDR_LEN);=0A= - evl =3D mtod(m, struct ether_vlan_header *);=0A= - evl->evl_proto =3D evl->evl_encap_proto;=0A= - evl->evl_encap_proto =3D htons(ETHERTYPE_VLAN);=0A= - evl->evl_tag =3D htons(f->vlan);=0A= }=0A= NG_FWD_NEW_DATA(error, item, priv->downstream_hook, m);=0A= }=0A= @@ -446,7 +457,7 @@=0A= ng_vlan_disconnect(hook_p hook)=0A= {=0A= const priv_p priv =3D NG_NODE_PRIVATE(NG_HOOK_NODE(hook));=0A= - struct filter *f;=0A= + uintptr_t vlan;=0A= =0A= if (hook =3D=3D priv->downstream_hook)=0A= priv->downstream_hook =3D NULL;=0A= @@ -454,11 +465,9 @@=0A= priv->nomatch_hook =3D NULL;=0A= else {=0A= /* Purge a rule that refers to this hook. */=0A= - if ((f =3D NG_HOOK_PRIVATE(hook)) !=3D NULL) {=0A= - LIST_REMOVE(f, next);=0A= - priv->nent--;=0A= - free(f, M_NETGRAPH);=0A= - }=0A= + vlan =3D (uintptr_t)NG_HOOK_PRIVATE(hook);=0A= + if ((vlan & HOOK_VLAN_SET_MASK) =3D=3D HOOK_VLAN_SET_MASK)=0A= + priv->vlan_hook[(vlan & EVL_VLID_MASK)] =3D NULL;=0A= }=0A= NG_HOOK_SET_PRIVATE(hook, NULL);=0A= if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) =3D=3D 0) &&=0A= ------=_NextPart_000_00D1_01CC32DC.AC0F2790-- From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 19:28:13 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A3141065672 for ; Fri, 24 Jun 2011 19:28:13 +0000 (UTC) (envelope-from cyko@cykotix.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id E38F08FC21 for ; Fri, 24 Jun 2011 19:28:12 +0000 (UTC) Received: by iwr19 with SMTP id 19so3678758iwr.13 for ; Fri, 24 Jun 2011 12:28:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.24.155 with SMTP id v27mr2186474ibb.57.1308942057103; Fri, 24 Jun 2011 12:00:57 -0700 (PDT) Sender: cyko@cykotix.com Received: by 10.231.30.73 with HTTP; Fri, 24 Jun 2011 12:00:57 -0700 (PDT) X-Originating-IP: [205.142.197.72] Date: Fri, 24 Jun 2011 15:00:57 -0400 X-Google-Sender-Auth: Pux4dc2wdKx_sBWBnzeI5rpSh8c Message-ID: From: Patrick Lahni To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: iwn -CURRENT drivers on -STABLE? 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, 24 Jun 2011 19:28:13 -0000 Hello, I have an Intel Centrino Advanced-N 6205 (iwn) I am trying to get to work on FreeBSD-STABLE (8.2). This may be a silly question, but is it possible to build and use iwn/iwnfw from head sources and use on a -stable machine? Ideally I don't want to move the whole machine from -stable to -current, I just want to test iwn/iwnfw in -current. This likely isn't possible due to kernel mismatch but thought I'd ask the people that know more than me. End game is I'd like tinker around using it at least in hostap mode. I realize 11n is still very much in development and I'm ok with that. Even using it as 11g in hostap mode would be a plus until 11n catches up. As of now, hostap isn't supported on my card in -stable, at least that's what dmesg tells me when I try. I'd love to help test this if it was possible to use -current for just those modules and -stable for the rest of the machine. Any input would be appreciated. Regards, Patrick From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 21:22:33 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F93106564A; Fri, 24 Jun 2011 21:22:32 +0000 (UTC) (envelope-from prvs=1156dbda56=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id EB6EA8FC12; Fri, 24 Jun 2011 21:22:31 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Fri, 24 Jun 2011 22:10:54 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 24 Jun 2011 22:10:54 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013860081.msg; Fri, 24 Jun 2011 22:10:53 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=1156dbda56=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> From: "Steven Hartland" To: , , Date: Fri, 24 Jun 2011 22:11:12 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Cc: Subject: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 24 Jun 2011 21:22:33 -0000 We're trying to get our machines IPv6 enabled but in doing so this seems to break java apps using openjdk6 for UDP sends. The server seems quite happy to send and receive TCP packets on IPv6 socket that are bound to IPv4 addresses, but the same is not true for UDP. The socket bind works fine and the packets sent to the server arrive and are processed by the app but when it tries to reply using send the result is:- java.io.IOException: Invalid argument at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:629) using truss we see the following:- socket(PF_INET6,SOCK_DGRAM,0) = 20 (0x14) setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) = 0 (0x0) setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) = 0 (0x0) bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) = 0 (0x0) .. recvfrom(20,0x7ffffeaeb580,1460,0x0,0x7ffffeaed580,0x7ffffeaed5ac) ERR#60 'Operation timed out' .. sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' sockstat shows it binding correctly root java 894 21 tcp4 85.236.109.212:25675 *:* The following PR seems relevant but also seems to indicate it was fixed back in 2006 http://www.freebsd.org/cgi/query-pr.cgi?pr=92620 Setting -Djava.net.preferIPv4Stack=true does workaround the issue but when we come to support IPv6 as well as IPv4 this won't work. Note: net.inet6.ip6.v6only was set to the default 1 but changing it to 0 has no effect on the issue. An ideas why tcp in this setup works fine for udp fails only on send? Not sure which list is best for this so sorry about the cross posting. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 22:22:32 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91E5E106566C for ; Fri, 24 Jun 2011 22:22:32 +0000 (UTC) (envelope-from milu@dat.pl) Received: from jab.dat.pl (dat.pl [80.51.155.34]) by mx1.freebsd.org (Postfix) with ESMTP id 50FBB8FC08 for ; Fri, 24 Jun 2011 22:22:32 +0000 (UTC) Received: from jab.dat.pl (jsrv.dat.pl [127.0.0.1]) by jab.dat.pl (Postfix) with ESMTP id EE823CD; Sat, 25 Jun 2011 00:03:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at dat.pl Received: from jab.dat.pl ([127.0.0.1]) by jab.dat.pl (jab.dat.pl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Lf2CHyipSURa; Sat, 25 Jun 2011 00:03:34 +0200 (CEST) Received: from snifi.laptop (178-36-140-41.adsl.inetia.pl [178.36.140.41]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by jab.dat.pl (Postfix) with ESMTPSA id D622DA3; Sat, 25 Jun 2011 00:03:33 +0200 (CEST) From: Maciej Milewski To: freebsd-net@freebsd.org Date: Sat, 25 Jun 2011 00:03:30 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.0-CURRENT; KDE/4.6.4; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201106250003.31135.milu@dat.pl> Cc: Patrick Lahni Subject: Re: iwn -CURRENT drivers on -STABLE? 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, 24 Jun 2011 22:22:32 -0000 On Friday 24 of June 2011 21:00:57 Patrick Lahni wrote: > Hello, > > I have an Intel Centrino Advanced-N 6205 (iwn) I am trying to get to work > on FreeBSD-STABLE (8.2). This may be a silly question, but is it possible > to build and use iwn/iwnfw from head sources and use on a -stable machine? > Ideally I don't want to move the whole machine from -stable to -current, I > just want to test iwn/iwnfw in -current. This likely isn't possible due > to kernel mismatch but thought I'd ask the people that know more than me. > > End game is I'd like tinker around using it at least in hostap mode. I > realize 11n is still very much in development and I'm ok with that. Even > using it as 11g in hostap mode would be a plus until 11n catches up. As of > now, hostap isn't supported on my card in -stable, at least that's what > dmesg tells me when I try. I'd love to help test this if it was possible > to use -current for just those modules and -stable for the rest of the > machine. > > Any input would be appreciated. > Regards, > Patrick Excerpt from man iwn(4): The iwn driver provides support for Intel Wireless WiFi Link 4965, 1000, 5000 and 6000 series of PCI-Express network adapters. iwn supports station, adhoc, and monitor mode operation. No chance for hostap mode even when you upgrade to head. But for running in station mode you may try doing it like in the archives: http://lists.freebsd.org/pipermail/freebsd-wireless/2011-April/000087.html Although I'm not sure if there is need to have net80211 from -head too. Maciek From owner-freebsd-net@FreeBSD.ORG Fri Jun 24 23:20:26 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8F28106574A for ; Fri, 24 Jun 2011 23:20:26 +0000 (UTC) (envelope-from matthias.andree@gmx.de) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mx1.freebsd.org (Postfix) with SMTP id 2A4028FC12 for ; Fri, 24 Jun 2011 23:20:25 +0000 (UTC) Received: (qmail invoked by alias); 24 Jun 2011 22:53:44 -0000 Received: from g230094120.adsl.alicedsl.de (EHLO apollo.emma.line.org) [92.230.94.120] by mail.gmx.net (mp067) with SMTP; 25 Jun 2011 00:53:44 +0200 X-Authenticated: #428038 X-Provags-ID: V01U2FsdGVkX1/4M0N4t3X4B/eyAvx+vwrD2qPqLdp3/wZvu0h6K3 xb+JWeA7o53WM6 Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by apollo.emma.line.org (Postfix) with ESMTP id CDF6A23DAE2; Sat, 25 Jun 2011 00:53:42 +0200 (CEST) Message-ID: <4E051576.7090505@gmx.de> Date: Sat, 25 Jun 2011 00:53:42 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Mnenhy/0.8.3 Thunderbird/3.1.10 MIME-Version: 1.0 To: Steven Hartland References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> In-Reply-To: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-net@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 24 Jun 2011 23:20:26 -0000 Removing -java@ list because the VM is an application on top of the kernel's network stack, and the issue isn't Java-specific. Am 24.06.2011 23:11, schrieb Steven Hartland: > We're trying to get our machines IPv6 enabled but in doing so this > seems to break java apps using openjdk6 for UDP sends. > > The server seems quite happy to send and receive TCP packets on > IPv6 socket that are bound to IPv4 addresses, but the same is not > true for UDP. Coincidence, and not guaranteed to work, and possibly using IPv4-mapped IPv4 addresses (i. e. ::ffff:10.11.12.13 style). See the v6-related sections of > The socket bind works fine and the packets sent to the server arrive > and are processed by the app but when it tries to reply using > send the result is:- > java.io.IOException: Invalid argument > at java.net.PlainDatagramSocketImpl.send(Native Method) > at java.net.DatagramSocket.send(DatagramSocket.java:629) > > using truss we see the following:- > socket(PF_INET6,SOCK_DGRAM,0) = 20 (0x14) > setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) = 0 (0x0) > setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) = 0 (0x0) > bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) = 0 (0x0) > .. > sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 > [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' You're trying to send to your own address, but you're likely not using the loopback interface for that. Is that permitted by your firewall configuration and routing? > sockstat shows it binding correctly > root java 894 21 tcp4 85.236.109.212:25675 *:* This is unrelated, as it has fd #21 not #20 as in the socket/bind/sendto calls. You've quoted the wrong line from sockstat output. > Note: net.inet6.ip6.v6only was set to the default 1 but changing > it to 0 has no effect on the issue. You aren't using IPv4 mapped addresses, and you haven't stated whether you're using wildcard listeners. Only in that case would it matter. inet6(4) reads: IPV6CTL_V6ONLY (ip6.v6only) Boolean: enable/disable the prohib- ited use of IPv4 mapped address on AF_INET6 sock- ets. Defaults to on. > An ideas why tcp in this setup works fine for udp fails only on > send? Are you sure that's what you seeing? It's not a match for what you give above, but anyways it's an implementation artifact because the tcp code for v4 and v6 used to be shared and the udp code separate. It is best to set up one IPv4 and one IPv6 listening socket. Check the URL above, perhaps that helps your understanding a bit. I presume 3800::10:0:0:0 is your server? From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 09:27:32 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37D67106566C for ; Sat, 25 Jun 2011 09:27:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id BD35D8FC15 for ; Sat, 25 Jun 2011 09:27:31 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B2E7E25D37C3; Sat, 25 Jun 2011 09:27:30 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 3AE6415A26B4; Sat, 25 Jun 2011 09:27:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id ki6k6yf6XZeF; Sat, 25 Jun 2011 09:27:28 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1773A15A2693; Sat, 25 Jun 2011 09:27:27 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" X-Priority: 3 In-Reply-To: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> Date: Sat, 25 Jun 2011 09:27:25 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <75860ED5-B60D-4EF2-90B6-F313BEFA36F7@FreeBSD.org> References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1084) Cc: freebsd-net@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 09:27:32 -0000 On Jun 24, 2011, at 9:11 PM, Steven Hartland wrote: Hi, > We're trying to get our machines IPv6 enabled but in doing so this > seems to break java apps using openjdk6 for UDP sends. One of the clues I can give you is: http://diario.behrens.de/2008/10/12/java_and_ipv6_on_bsd.html it's old(er) and I have lately been tolded that openjdk has a problem. > using truss we see the following:- > socket(PF_INET6,SOCK_DGRAM,0) =3D 20 (0x14) > setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) =3D 0 (0x0) > setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) =3D 0 (0x0) > bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) =3D 0 (0x0) > .. > recvfrom(20,0x7ffffeaeb580,1460,0x0,0x7ffffeaed580,0x7ffffeaed5ac) = ERR#60 'Operation timed out' > .. > sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 = [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' So how much is really between these ...? If you want, can you send me a full output in private email? Also which version of FreeBSD is this? > sockstat shows it binding correctly > root java 894 21 tcp4 85.236.109.212:25675 *:* That's unfortunately unreleated. > The following PR seems relevant but also seems to indicate it was > fixed back in 2006 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D92620 This doesn't seen to be related to the above as 3800::10:0:0:0 is not a v4-mapped-v6 address. Now there could be the problem really. Do you know which address the code above was trying to talk with? Also do you have a very simple test program I could try to run if I compile openjdk6? /bz --=20 Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 11:40:37 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B9F4106564A; Sat, 25 Jun 2011 11:40:37 +0000 (UTC) (envelope-from prvs=1157d11ea9=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 729F78FC0A; Sat, 25 Jun 2011 11:40:36 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Sat, 25 Jun 2011 12:28:28 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Sat, 25 Jun 2011 12:28:28 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013864816.msg; Sat, 25 Jun 2011 12:28:26 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=1157d11ea9=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <512CB9DD5802403BA3ACC48FE3AE63F5@multiplay.co.uk> From: "Steven Hartland" To: "Matthias Andree" References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <4E051576.7090505@gmx.de> Date: Sat, 25 Jun 2011 12:28:44 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Cc: freebsd-net@freebsd.org, freebsd-java@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 11:40:37 -0000 ----- Original Message ----- From: "Matthias Andree" I'm adding back in -java as based on you comments it may well be something in the jdk passing invalid values down to the kernel syscall. >> The socket bind works fine and the packets sent to the server arrive >> and are processed by the app but when it tries to reply using >> send the result is:- >> java.io.IOException: Invalid argument >> at java.net.PlainDatagramSocketImpl.send(Native Method) >> at java.net.DatagramSocket.send(DatagramSocket.java:629) >> >> using truss we see the following:- >> socket(PF_INET6,SOCK_DGRAM,0) = 20 (0x14) >> setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) = 0 (0x0) >> setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) = 0 (0x0) >> bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) = 0 (0x0) >> .. >> sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 >> [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' > > You're trying to send to your own address, but you're likely not using > the loopback interface for that. Is that permitted by your firewall > configuration and routing? No I'm not its replying to the sender. In the java code we have:- socket.send( new DatagramPacket( data, data.length, src.getSocketAddress() ) ); Where src is the src packet. This works fine on IPv4 only machines and when the jdk is told to use only IPv4 stack. So its not a problem with the java code itself but could well be an issue with the > >> sockstat shows it binding correctly >> root java 894 21 tcp4 85.236.109.212:25675 *:* > > This is unrelated, as it has fd #21 not #20 as in the socket/bind/sendto > calls. You've quoted the wrong line from sockstat output. Oops sorry cut and paste error (wrong line) heres the correct line. root java 894 20 udp4 85.236.109.212:25675 *:* 21 is the tcp port created in the same manor (ipv6 socket) which works fine. > >> Note: net.inet6.ip6.v6only was set to the default 1 but changing >> it to 0 has no effect on the issue. > > You aren't using IPv4 mapped addresses, and you haven't stated whether > you're using wildcard listeners. Only in that case would it matter. I'm not, its a bound port, as shown above now I have the correct line ;-) > inet6(4) reads: > > IPV6CTL_V6ONLY (ip6.v6only) Boolean: enable/disable the prohib- > ited use of IPv4 mapped address on AF_INET6 sock- > ets. Defaults to on. The jvm automatically sets this on all sockets for compatibility for this exact reason. I'm not rulling out an issue with the IPv6 -> v4 routing in the kernel though. > Are you sure that's what you seeing? It's not a match for what you give > above, but anyways it's an implementation artifact because the tcp code > for v4 and v6 used to be shared and the udp code separate. Thats not how the jdk works, its ment to be 100% transparent but isn't. See the following for some interesting details:- http://diario.beerensalat.info/2008/10/12/java_and_ipv6_on_bsd.html > It is best to set up one IPv4 and one IPv6 listening socket. I don't believe there is any way to do this in java it either uses the IPv4 stack only or the IPv6 stack only hence relies on the kernel routing IPv4 packets through the IPv6 stack. Thats the reason the jdk explicitly enables this for all the ports it creates, which was added as a back port of the jdk7 fixes which can be seen here:- http://www.freebsd.org/cgi/cvsweb.cgi/ports/java/openjdk6/files/patch-set > Check the URL above, perhaps that helps your understanding a bit. I > presume 3800::10:0:0:0 is your server? Not that I'm aware of, here's the output from ifconfig if anyone can tell me different, as I'm new to IPv6 and don't follow how its mapped yet. ifconfig igb0: flags=8843 metric 0 mtu 1500 options=1bb ether 00:25:90:2c:3c:b0 inet 85.236.109.212 netmask 0xffffff00 broadcast 85.236.109.255 inet6 fe80::225:90ff:fe2c:3cb0%igb0 prefixlen 64 scopeid 0x1 inet6 2001:4db0:20:2::1337 prefixlen 64 nd6 options=3 media: Ethernet autoselect (1000baseSX ) status: active igb1: flags=8802 metric 0 mtu 1500 options=1bb ether 00:25:90:2c:3c:b1 media: Ethernet autoselect (1000baseSX ) status: active lo0: flags=8049 metric 0 mtu 16384 options=3 inet 127.0.0.1 netmask 0xff000000 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 nd6 options=3 This is currently running on 8.2-RELEASE with openjdk6-b22_5 Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 12:19:37 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FCDE106566B for ; Sat, 25 Jun 2011 12:19:37 +0000 (UTC) (envelope-from prvs=1157d11ea9=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id E9EBF8FC0A for ; Sat, 25 Jun 2011 12:19:36 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Sat, 25 Jun 2011 13:18:54 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Sat, 25 Jun 2011 13:18:53 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013865102.msg; Sat, 25 Jun 2011 13:18:53 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=1157d11ea9=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <05C71CCF2FEF492D9571F57261FA884F@multiplay.co.uk> From: "Steven Hartland" To: "Bjoern A. Zeeb" References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <75860ED5-B60D-4EF2-90B6-F313BEFA36F7@FreeBSD.org> Date: Sat, 25 Jun 2011 13:19:13 +0100 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0057_01CC333A.7A3B2D00" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Cc: freebsd-net@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 12:19:37 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0057_01CC333A.7A3B2D00 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit ----- Original Message ----- From: "Bjoern A. Zeeb" To: "Steven Hartland" Cc: Sent: Saturday, June 25, 2011 10:27 AM Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send On Jun 24, 2011, at 9:11 PM, Steven Hartland wrote: Hi, > We're trying to get our machines IPv6 enabled but in doing so this > seems to break java apps using openjdk6 for UDP sends. > > One of the clues I can give you is: > http://diario.behrens.de/2008/10/12/java_and_ipv6_on_bsd.html > > it's old(er) and I have lately been tolded that openjdk has a problem. Yer read that but it seems like the jdk7 patch is already in which should fix it:- http://www.freebsd.org/cgi/cvsweb.cgi/ports/java/openjdk6/files/patch-set > using truss we see the following:- > socket(PF_INET6,SOCK_DGRAM,0) = 20 (0x14) > setsockopt(0x14,0x29,0x1b,0x7ffffedf0318,0x4,0x0) = 0 (0x0) > setsockopt(0x14,0xffff,0x20,0x7ffffedf031c,0x4,0x0) = 0 (0x0) > bind(20,{ AF_INET6 [3800::10:0:0:0]:20736 },28) = 0 (0x0) > .. > recvfrom(20,0x7ffffeaeb580,1460,0x0,0x7ffffeaed580,0x7ffffeaed5ac) ERR#60 'Operation timed out' > .. > sendto(20,"\M^?\M^?\M^?\M^?I\aMultiplay :: "...,82,0x0,{ AF_INET6 [3800::10:0:0:0]:20736 },0x1c) ERR#22 'Invalid argument' > > So how much is really between these ...? If you want, can you send > me a full output in private email? Just a load of gettimeofday, clock_gettime, _umtx_op and mprotect calls nothing of interest. > Also which version of FreeBSD is this? 8.2-RELEASE > sockstat shows it binding correctly > root java 894 21 tcp4 85.236.109.212:25675 *:* > > That's unfortunately unreleated. Yer cut and paste error (wrong line) heres the correct line. root java 894 20 udp4 85.236.109.212:25675 *:* 21 is the tcp port created in the same manor (ipv6 socket) which works fine. > The following PR seems relevant but also seems to indicate it was > fixed back in 2006 > http://www.freebsd.org/cgi/query-pr.cgi?pr=92620 > This doesn't seen to be related to the above as 3800::10:0:0:0 is > not a v4-mapped-v6 address. Now there could be the problem really. > Do you know which address the code above was trying to talk with? I'm wondering if thats a decode error by truss, as it doesn't seem to corrispond to anything on the machine and is the same no matter what ip the socket is bound to. ifconfig output in my last reply if that helps. > Also do you have a very simple test program I could try to run if > I compile openjdk6? The attached java file demonstrates the behviour. java Main Then just send any udp packet to :25675 it should respond with pong but on a dual stack machine it just throws as exception:- WARNING: IO: Invalid argument java.io.IOException: Invalid argument at java.net.PlainDatagramSocketImpl.send(Native Method) at java.net.DatagramSocket.send(DatagramSocket.java:629) at Main.main(Main.java:34) Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. ------=_NextPart_000_0057_01CC333A.7A3B2D00 Content-Type: application/octet-stream; name="Main.java" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="Main.java" import java.io.IOException;=0A= import java.net.InetAddress;=0A= import java.net.DatagramSocket;=0A= import java.net.SocketException;=0A= import java.net.DatagramPacket;=0A= import java.util.logging.Logger;=0A= import java.util.logging.Level;=0A= =0A= public class Main {=0A= =0A= public static void main(String[] args) throws java.io.IOException {=0A= if (1 !=3D args.length) {=0A= System.err.println( "Missing bind IP" );=0A= System.exit(1);=0A= }=0A= int port =3D 25675;=0A= InetAddress ipv4Address =3D InetAddress.getByName(args[0]);=0A= DatagramSocket socket =3D new DatagramSocket(port, ipv4Address);=0A= Logger log =3D Logger.getLogger("MAIN");=0A= byte[] buffer =3D new byte[1460];=0A= =0A= log.info( "Running on: " + ipv4Address + ":" + port);=0A= DatagramPacket request =3D new DatagramPacket( buffer, = buffer.length );=0A= try=0A= {=0A= while (true)=0A= {=0A= try=0A= {=0A= socket.receive(request);=0A= log.info("Recieved " + request.getLength() + " bytes = from: " + request.getSocketAddress());=0A= String response =3D new String("pong");=0A= byte[] bytes =3D response.getBytes();=0A= socket.send(new DatagramPacket(bytes, bytes.length, = request.getSocketAddress()));=0A= log.info("Sent pong");=0A= }=0A= catch (SocketException e)=0A= {=0A= log.log(Level.WARNING, "Socket: " + e.getMessage(), = e);=0A= }=0A= catch (IOException e )=0A= {=0A= log.log(Level.WARNING, "IO: " + e.getMessage(), e);=0A= }=0A= }=0A= }=0A= finally=0A= {=0A= if (null !=3D socket)=0A= {=0A= socket.close();=0A= socket =3D null;=0A= }=0A= }=0A= }=0A= } ------=_NextPart_000_0057_01CC333A.7A3B2D00-- From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 13:41:50 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2B3F1065673 for ; Sat, 25 Jun 2011 13:41:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 534FF8FC0C for ; Sat, 25 Jun 2011 13:41:50 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 4B8F925D3870; Sat, 25 Jun 2011 13:41:49 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 8942915A26DB; Sat, 25 Jun 2011 13:41:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id l34CnphimTg2; Sat, 25 Jun 2011 13:41:47 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C7EAF15A26DA; Sat, 25 Jun 2011 13:41:47 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" X-Priority: 3 In-Reply-To: <05C71CCF2FEF492D9571F57261FA884F@multiplay.co.uk> Date: Sat, 25 Jun 2011 13:41:47 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk> <75860ED5-B60D-4EF2-90B6-F313BEFA36F7@FreeBSD.org> <05C71CCF2FEF492D9571F57261FA884F@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1084) Cc: freebsd-net@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 13:41:50 -0000 >> This doesn't seen to be related to the above as 3800::10:0:0:0 is >> not a v4-mapped-v6 address. Now there could be the problem really. >> Do you know which address the code above was trying to talk with? > > I'm wondering if thats a decode error by truss, as it doesn't seem > to corrispond to anything on the machine and is the same no matter > what ip the socket is bound to. Sigh, I'll need to look at that then. I think you are hitting: http://svnweb.freebsd.org/base?view=revision&revision=220463 Can you apply that to your kernel, and see if that helps? Bjoern -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 16:05:58 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E6E7106566B; Sat, 25 Jun 2011 16:05:58 +0000 (UTC) (envelope-from prvs=1157d11ea9=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id CC72E8FC14; Sat, 25 Jun 2011 16:05:57 +0000 (UTC) X-MDAV-Processed: mail1.multiplay.co.uk, Sat, 25 Jun 2011 17:05:14 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Sat, 25 Jun 2011 17:05:14 +0100 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-5.0 required=6.0 tests=USER_IN_WHITELIST shortcircuit=ham autolearn=disabled version=3.2.5 Received: from r2d2 ([188.220.16.49]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50013866609.msg; Sat, 25 Jun 2011 17:05:13 +0100 X-MDRemoteIP: 188.220.16.49 X-Return-Path: prvs=1157d11ea9=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: From: "Steven Hartland" To: "Bjoern A. Zeeb" References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk><75860ED5-B60D-4EF2-90B6-F313BEFA36F7@FreeBSD.org><05C71CCF2FEF492D9571F57261FA884F@multiplay.co.uk> Date: Sat, 25 Jun 2011 17:05:32 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6090 Cc: freebsd-net@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 16:05:58 -0000 ----- Original Message ----- From: "Bjoern A. Zeeb" > Sigh, I'll need to look at that then. > > I think you are hitting: > http://svnweb.freebsd.org/base?view=revision&revision=220463 > > Can you apply that to your kernel, and see if that helps? Had to modify the patch slightly for 8.2-RELEASE but yes, that fixes it; thanks! Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 16:10:40 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CA4810656DA for ; Sat, 25 Jun 2011 16:10:40 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id AF6138FC1B for ; Sat, 25 Jun 2011 16:10:39 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 3EFAF25D385E; Sat, 25 Jun 2011 16:10:38 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 74ACC15A26ED; Sat, 25 Jun 2011 16:10:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id lGEE-Bdbg8aU; Sat, 25 Jun 2011 16:10:36 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id F3C7E15A26E7; Sat, 25 Jun 2011 16:10:35 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" X-Priority: 3 In-Reply-To: Date: Sat, 25 Jun 2011 16:10:34 +0000 Content-Transfer-Encoding: 7bit Message-Id: <0A801964-7584-4427-9D30-985725732655@FreeBSD.org> References: <9585F512F239475B8145C3D344F6EC62@multiplay.co.uk><75860ED5-B60D-4EF2-90B6-F313BEFA36F7@FreeBSD.org><05C71CCF2FEF492D9571F57261FA884F@multiplay.co.uk> To: Steven Hartland X-Mailer: Apple Mail (2.1084) Cc: freebsd-net@freebsd.org Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 16:10:40 -0000 On Jun 25, 2011, at 4:05 PM, Steven Hartland wrote: Hi, > ----- Original Message ----- From: "Bjoern A. Zeeb" >> Sigh, I'll need to look at that then. >> I think you are hitting: >> http://svnweb.freebsd.org/base?view=revision&revision=220463 >> Can you apply that to your kernel, and see if that helps? > > Had to modify the patch slightly for 8.2-RELEASE but yes, that > fixes it; thanks! Thanks for confirming; the change will be in 9.0-RELEASE and I'll try to make sure that it'll be in upcoming 8.x RELEASES as well. Bjoern -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 21:29:02 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25FCB106564A for ; Sat, 25 Jun 2011 21:29:02 +0000 (UTC) (envelope-from gygy@stsnet.ro) Received: from mail.stsnet.ro (mail.stsnet.ro [193.151.31.253]) by mx1.freebsd.org (Postfix) with ESMTP id D21B18FC19 for ; Sat, 25 Jun 2011 21:29:01 +0000 (UTC) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) by mail.stsnet.ro (Postfix) with ESMTP id 2A46216DDA7 for ; Sun, 26 Jun 2011 00:28:56 +0300 (EEST) Received: from localhost.localdomain [127.0.0.1] by BitDefender SMTP Proxy on localhost.localdomain [127.0.0.1] for localhost.localdomain [127.0.0.1]; Sun, 26 Jun 2011 00:28:56 +0300 (EEST) Received: from mail.stsnet.ro (localhost.localdomain [127.0.0.1]) (Authenticated sender: gygy) by mail.stsnet.ro (Postfix) with ESMTPA id 04A7116DDA5 for ; Sun, 26 Jun 2011 00:28:56 +0300 (EEST) Received: from 188.26.158.238 (SquirrelMail authenticated user gygy) by mail.stsnet.ro with HTTP; Sun, 26 Jun 2011 00:28:56 +0300 Message-ID: Date: Sun, 26 Jun 2011 00:28:56 +0300 From: "Adrian Minta" To: freebsd-net@freebsd.org User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BitDefender-Spam: No (0) X-BitDefender-SpamStamp: v1, build 2.8.97.165443, SQMD Hits: none, bayes score: 500(0), pbayes score: 241(0), neunet score: 0(0), SQMD: c4ce502682ed8394708f971efe147b57.fuzzy.fzrbl.org, total: 0(775) X-BitDefender-CF-Stamp: none X-BitDefender-Scanner: Clean, Agent: BitDefender Smtp Proxy 3.1.0 on mail.stsnet.ro, sigver: 7.38044 Subject: Re: FreeBSD 8.2 and MPD5 stability issues 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, 25 Jun 2011 21:29:02 -0000 After recompilation with "*default release=cvs tag=RELENG_8" and pooling disables the system still crashes around 4200 sessions. The server has a xeon E5520 CPU and 4G of ram. Here is the crash on the screen: http://img232.imageshack.us/img232/6751/crashm.png $uname -a FreeBSD lns 8.2-STABLE FreeBSD 8.2-STABLE #2: Sat Jun 25 23:50:06 EEST 2011 gygy@lns:/usr/obj/usr/src/sys/MYKERNELv3 amd64 /boot/loader.conf: net.graph.maxdata=65536 net.graph.maxalloc=65536 kern.ipc.maxpipekva=320000000 #I wave 4 cores net.isr.bindthreads=4 net.isr.maxthreads=1 net.isr.defaultqlimit=4096 /etc/sysctl.conf: net.inet.ip.forwarding=1 kern.maxfiles=65535 net.inet.ip.intr_queue_maxlen=8192 net.inet.icmp.icmplim=0 kern.ipc.nmbclusters=1280000 kern.ipc.maxsockbuf=128000000 net.graph.maxdgram=10240000 net.graph.recvspace=10240000 kern.random.sys.harvest.ethernet=0 net.isr.direct=1 net.isr.direct_force=0 Kernel GENERIC plus: #options DEVICE_POLLING options HZ=1000 options NETGRAPH options NETGRAPH_PPPOE options NETGRAPH_SOCKET options NETGRAPH_CISCO options NETGRAPH_ECHO options NETGRAPH_FRAME_RELAY options NETGRAPH_HOLE options NETGRAPH_KSOCKET options NETGRAPH_LMI options NETGRAPH_RFC1490 options NETGRAPH_TTY options NETGRAPH_ASYNC options NETGRAPH_BPF options NETGRAPH_ETHER options NETGRAPH_IFACE options NETGRAPH_L2TP options NETGRAPH_MPPC_ENCRYPTION options NETGRAPH_PPP options NETGRAPH_PPTPGRE options NETGRAPH_TEE options NETGRAPH_UI options NETGRAPH_VJC options ALTQ options ALTQ_CBQ options ALTQ_RED options ALTQ_RIO options ALTQ_HFSC options ALTQ_PRIQ # options ALTQ_NOPCC device pf device pflog device pfsync device gre device tap device hme # Bridging device if_bridge device lagg options IPSTEALTH options ZERO_COPY_SOCKETS options NETGRAPH_DEBUG options GDB options DDB options KDB_UNATTENDED From owner-freebsd-net@FreeBSD.ORG Sat Jun 25 21:48:35 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48EC21065672; Sat, 25 Jun 2011 21:48:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9D4118FC16; Sat, 25 Jun 2011 21:48:33 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p5PLmUWV003703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 26 Jun 2011 00:48:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p5PLmU4I008729; Sun, 26 Jun 2011 00:48:30 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p5PLmSO4008727; Sun, 26 Jun 2011 00:48:28 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 26 Jun 2011 00:48:27 +0300 From: Kostik Belousov To: "Bjoern A. Zeeb" Message-ID: <20110625214827.GC48734@deviant.kiev.zoral.com.ua> References: <0A801964-7584-4427-9D30-985725732655@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LTTBnC0ri/2pepbJ" Content-Disposition: inline In-Reply-To: <0A801964-7584-4427-9D30-985725732655@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-net@freebsd.org, Steven Hartland Subject: Re: IPv4 socket bind using IPv6 socket on openjdk6 breaks udp send 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, 25 Jun 2011 21:48:35 -0000 --LTTBnC0ri/2pepbJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 25, 2011 at 04:10:34PM +0000, Bjoern A. Zeeb wrote: > On Jun 25, 2011, at 4:05 PM, Steven Hartland wrote: >=20 > Hi, >=20 > > ----- Original Message ----- From: "Bjoern A. Zeeb" > >> Sigh, I'll need to look at that then. > >> I think you are hitting: > >> http://svnweb.freebsd.org/base?view=3Drevision&revision=3D220463 > >> Can you apply that to your kernel, and see if that helps? > >=20 > > Had to modify the patch slightly for 8.2-RELEASE but yes, that > > fixes it; thanks! >=20 > Thanks for confirming; the change will be in 9.0-RELEASE and I'll try to > make sure that it'll be in upcoming 8.x RELEASES as well. Isn't it already in stable/8 ? r220825 ? --LTTBnC0ri/2pepbJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk4GV6sACgkQC3+MBN1Mb4g5agCeJpHt5eGRvRkigguBckndUw72 x5AAn3xe3gcgXaIWdsq4sthXn1ZuDlN0 =9QOE -----END PGP SIGNATURE----- --LTTBnC0ri/2pepbJ--