From owner-freebsd-net@FreeBSD.ORG Sun Sep 14 17:15:28 2008 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 52C3D106564A for ; Sun, 14 Sep 2008 17:15:28 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.153]) by mx1.freebsd.org (Postfix) with ESMTP id CAA438FC15 for ; Sun, 14 Sep 2008 17:15:27 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1103508fgb.35 for ; Sun, 14 Sep 2008 10:15:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=brzbPang8EA8YNL45OHT292MfEut/daGfFgCRnQVIcY=; b=UCj6HHyaapII33v1SBzOl8YqPONatJyrSmh+hmnS5KKBOji3Sd98rnmdIXgjVlleY9 HDA8VNQRqDdibiMRGDadQEFMnMmFaDV62AhZFtMkoB/2g9664mPMD723UMA/QtBHU7Em 4eZQ3bWPyAThKB7cwE6wdEwLeZjR96drozVRA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=wnT0ArcNzERxXzBr4rCYgXmXlsRSW2ekFseH4OEHhk+V9688tcyWfOSKKLh9z0b58V COmpTdpudN/+LOYvZxDpq4KEi0JnvLzovgKRETQjzvmldTLhBp8bOfT+cE6PFGPzoJdL xf52umv2NF23Vq8fNQZizaYJpupzk63sxymCk= Received: by 10.187.250.1 with SMTP id c1mr870569fas.65.1221411043361; Sun, 14 Sep 2008 09:50:43 -0700 (PDT) Received: by 10.187.220.2 with HTTP; Sun, 14 Sep 2008 09:50:43 -0700 (PDT) Message-ID: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> Date: Sun, 14 Sep 2008 13:50:43 -0300 From: "Alexandre Biancalana" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 17:15:28 -0000 Hi! How's good is our ECMP ? Is someone using in production ? Regards, From owner-freebsd-net@FreeBSD.ORG Sun Sep 14 17:38:28 2008 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 12A9F1065670 for ; Sun, 14 Sep 2008 17:38:28 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.freebsd.org (Postfix) with ESMTP id CDFF78FC1C for ; Sun, 14 Sep 2008 17:38:27 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 1F125161073; Sun, 14 Sep 2008 13:38:27 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 14 Sep 2008 13:38:27 -0400 X-Sasl-enc: +mwBxI+ilnK53y67G54Er8gbo85sH4VXEjKaa3/TSuQn 1221413906 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 77F9F2A0AA; Sun, 14 Sep 2008 13:38:26 -0400 (EDT) Message-ID: <48CD4C11.6020104@FreeBSD.org> Date: Sun, 14 Sep 2008 18:38:25 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Alexandre Biancalana References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> In-Reply-To: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 17:38:28 -0000 Alexandre Biancalana wrote: > Hi! > > How's good is our ECMP ? Is someone using in production ? > Doesn't exist yet, care to contribute? There is "multiple routing tables" support but that's not quite the same thing. regards BMS From owner-freebsd-net@FreeBSD.ORG Sun Sep 14 17:53:55 2008 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 39DDF1065684 for ; Sun, 14 Sep 2008 17:53:55 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id AB8048FC44 for ; Sun, 14 Sep 2008 17:53:54 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so541615uge.39 for ; Sun, 14 Sep 2008 10:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=2yflfTwZy2ginpaTXt1yHb5nwyUBHRDeMmNEr0Yhdrg=; b=Pi+tsuqoHVKrl9KRogwBP6ZGykf3ARP8sLxdOQKknAYQhfGEDUhx02tQ2Z5uODZBQu W+xHLvhaw1vZBfGTLPZZjQ4ShFA83eA0EI2Pp2Mf16swo2nO0R/mZn/V6BtJz8AxRoLV yIZo7l1En0sE8P+fSp/WpplnzL++xDNlL+d6U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=gLGlgh46bJpdTU2ksPw56X5xlSWXmGEgzNmsKL7dIrQfeH7Z3qREuntONqgcX/RcbI pTI8JXFZAw5/I0aurhcBlmTlLr4Xs9CgYRLXZq3D9PVOALhAsYqXAx1VEWgNaYGxcgL3 cwjwqw03yoqveCf2HBE/k1DX4orlWe9F6CQHQ= Received: by 10.187.182.10 with SMTP id j10mr889330fap.39.1221414833322; Sun, 14 Sep 2008 10:53:53 -0700 (PDT) Received: by 10.187.220.2 with HTTP; Sun, 14 Sep 2008 10:53:53 -0700 (PDT) Message-ID: <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> Date: Sun, 14 Sep 2008 14:53:53 -0300 From: "Alexandre Biancalana" To: freebsd-net@freebsd.org In-Reply-To: <48CD4C11.6020104@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 17:53:55 -0000 On 9/14/08, Bruce M. Simpson wrote: > Alexandre Biancalana wrote: > > > Hi! > > > > How's good is our ECMP ? Is someone using in production ? > > > > > > Doesn't exist yet, care to contribute? > > There is "multiple routing tables" support but that's not quite the same > thing. Doesn't exists ?? So what's this commit message about ? http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html From owner-freebsd-net@FreeBSD.ORG Sun Sep 14 17:57:06 2008 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 17A2A1065677 for ; Sun, 14 Sep 2008 17:57:06 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.freebsd.org (Postfix) with ESMTP id D1BDC8FC17 for ; Sun, 14 Sep 2008 17:57:05 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 5822E15F2C1; Sun, 14 Sep 2008 13:57:05 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sun, 14 Sep 2008 13:57:05 -0400 X-Sasl-enc: mCV/6W2R8u4EP4i9jKMCBPYJdWDr+WcwgRsp58c6f191 1221415024 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id A35032F82; Sun, 14 Sep 2008 13:57:04 -0400 (EDT) Message-ID: <48CD506F.8090401@FreeBSD.org> Date: Sun, 14 Sep 2008 18:57:03 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Alexandre Biancalana References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> In-Reply-To: <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 17:57:06 -0000 Alexandre Biancalana wrote: >> There is "multiple routing tables" support but that's not quite the same >> thing. >> > > Doesn't exists ?? So what's this commit message about ? > > http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html > Qing Li committed this support to -CURRENT but not RELENG_7. AFAIK there hasn't been management tool support added, so further work is needed before it can be used. cheers BMS From owner-freebsd-net@FreeBSD.ORG Sun Sep 14 21:56:53 2008 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 804101065679 for ; Sun, 14 Sep 2008 21:56:53 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.228]) by mx1.freebsd.org (Postfix) with ESMTP id 297C58FC20 for ; Sun, 14 Sep 2008 21:56:53 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: by wx-out-0506.google.com with SMTP id s17so758843wxc.7 for ; Sun, 14 Sep 2008 14:56:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=WV0QTWMZWXUNUoo0PmS+VV6ZvxOayUOqiNaf9vrLf4s=; b=UNxnOQuYWzFcgf5VaPeI8YJFu0XSi9CNo+/caWp0Lfgf2wyHfohaXFPKuSaS7BPiCv wfUFCEBjCKZA4GCPrIHHIjdm6bR8ULR/zuOP6S+VpfYhb0kxjbBlbha0SiO9bUc+eUJ1 QtYrelSW5m1NjRazZJOJYIrfP9KjOsijNY5AE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=HC8T6bIMmN0CJHYPMsXPLieNj1U3t7+jHLZt46V1UrLgXypyrzLH3UOk0yHmKsFmks Xopcaf0KzV456OFK4WXDcmGjrg76nO+WM7Z1YbmK6yd0bafxIhqujKwvizUVlQ/9Uml1 JUU1xUMyHwdW5ofZF9mKP9aJSlnww8sdCtI5A= Received: by 10.187.219.6 with SMTP id w6mr917690faq.29.1221429411261; Sun, 14 Sep 2008 14:56:51 -0700 (PDT) Received: by 10.187.220.2 with HTTP; Sun, 14 Sep 2008 14:56:51 -0700 (PDT) Message-ID: <8e10486b0809141456t48e799a0tcd74b605f2ad473f@mail.gmail.com> Date: Sun, 14 Sep 2008 18:56:51 -0300 From: "Alexandre Biancalana" To: freebsd-net@freebsd.org In-Reply-To: <48CD506F.8090401@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> <48CD506F.8090401@FreeBSD.org> Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2008 21:56:53 -0000 On 9/14/08, Bruce M. Simpson wrote: > Alexandre Biancalana wrote: > > > > > > There is "multiple routing tables" support but that's not quite the > same > > > thing. > > > > > > > > > > Doesn't exists ?? So what's this commit message about ? > > > > > http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html > > > > > > Qing Li committed this support to -CURRENT but not RELENG_7. Sure! Excuse my misunderstanding.... > AFAIK there > hasn't been management tool support added, so further work is needed before > it can be used. There is any documentation about what have to be done ? Thank you From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 04:18:50 2008 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 3D7F1106567D for ; Mon, 15 Sep 2008 04:18:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outB.internet-mail-service.net (outb.internet-mail-service.net [216.240.47.225]) by mx1.freebsd.org (Postfix) with ESMTP id 224588FC12 for ; Mon, 15 Sep 2008 04:18:50 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id E1F9223F2; Sun, 14 Sep 2008 21:18:49 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 6B4262D6013; Sun, 14 Sep 2008 21:18:49 -0700 (PDT) Message-ID: <48CDE229.905@elischer.org> Date: Sun, 14 Sep 2008 21:18:49 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Alexandre Biancalana References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> <48CD506F.8090401@FreeBSD.org> <8e10486b0809141456t48e799a0tcd74b605f2ad473f@mail.gmail.com> In-Reply-To: <8e10486b0809141456t48e799a0tcd74b605f2ad473f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Qing Li Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 04:18:50 -0000 Alexandre Biancalana wrote: > On 9/14/08, Bruce M. Simpson wrote: >> Alexandre Biancalana wrote: >> >>>> There is "multiple routing tables" support but that's not quite the >> same >>>> thing. >>>> >>>> >>> Doesn't exists ?? So what's this commit message about ? >>> >>> >> http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html >>> >> Qing Li committed this support to -CURRENT but not RELENG_7. > > Sure! Excuse my misunderstanding.... > >> AFAIK there >> hasn't been management tool support added, so further work is needed before >> it can be used. > > There is any documentation about what have to be done ? I suggest you talk to Qing. He is probably lurking.. > > Thank you > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 11:20:50 2008 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 57C93106566B; Mon, 15 Sep 2008 11:20:50 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id DDC098FC1F; Mon, 15 Sep 2008 11:20:49 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Mon, 15 Sep 2008 13:08:39 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m8FB8c5v006109; Mon, 15 Sep 2008 13:08:38 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Mon, 15 Sep 2008 13:08:38 +0200 From: Matthias Apitz To: freebsd-net@FreeBSD.org, freebsd-hackers@freebsd.org Message-ID: <20080915110838.GA5258@rebelion.Sisis.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 15 Sep 2008 11:08:39.0382 (UTC) FILETIME=[680E1F60:01C91723] Cc: bug-followup@FreeBSD.org Subject: panic's on KDE-launches (but only in WPA Wifi area) / kern/122331 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 11:20:50 -0000 Hello, I'm booting my laptop 3 times a day: in the morning at home (WEP area), when I arrive in my office (WPA area) and in the evening at home (again); the sequence is always the same: booting, login into console, startx which launches via ~/.xinitrc the KDE; in about 1 of 2-3 cases and only in the office(!) the system panics when KDE comes up, at the end of the KDE booting and the jingle already played; today it crashed again and again and after switching off the Wifi radio on the laptop it came finally up fine; I did this (Wifi off) because I'm assuming somehow a relation with http://www.freebsd.org/cgi/query-pr.cgi?pr=122331 where my laptop as well only panic'ed in WPA mode (i.e. in the office) and with 'bgscan' active; which I now have deactivated; all these panics look in the debugger more or less like this one: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0xc fault code = supervisor read, page not present instruction pointer = 0x20:0xc0788b98 stack pointer = 0x28:0xe6960acc frame pointer = 0x28:0xe6960c50 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 1426 (kdeinit) trap number = 12 panic: page fault cpuid = 0 Uptime: 1m36s Physical memory: 1009 MB Dumping 129 MB: 114 98 82 66 50 34 18 2 #0 doadump () at pcpu.h:195 195 pcpu.h: No such file or directory. in pcpu.h (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xc0754457 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 #2 0xc0754719 in panic (fmt=Variable "fmt" is not available.) at /usr/src/sys/kern/kern_shutdown.c:563 #3 0xc0a4905c in trap_fatal (frame=0xe6960a8c, eva=12) at /usr/src/sys/i386/i386/trap.c:899 #4 0xc0a492e0 in trap_pfault (frame=0xe6960a8c, usermode=0, eva=12) at /usr/src/sys/i386/i386/trap.c:812 #5 0xc0a49c8c in trap (frame=0xe6960a8c) at /usr/src/sys/i386/i386/trap.c:490 #6 0xc0a2fc0b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #7 0xc0788b98 in kern_select (td=0xc49d5630, nd=9, fd_in=0x298ad840, fd_ou=0x298ad9c4, fd_ex=0x298adb48, tvp=0x0) at filedesc.h:136 #8 0xc07890de in select (td=0xc49d5630, uap=0xe6960cfc) at /usr/src/sys/kern/sys_generic.c:663 #9 0xc0a49635 in syscall (frame=0xe6960d38) at /usr/src/sys/i386/i386/trap.c:1035 #10 0xc0a2fc70 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196 #11 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) the 'current process' (kdeinit in the above crash) changes, but is always one of the KDE parts; of course the problem is not KDE related, it is just that the system comes under heavy usage in that moment; I already run 'memtest 128' for some hours without any noted problem in memory; test are just passing fine; the same problem is with 7.0-RELEASE as with RELENG_7; what can I do to nail this down? it sucks somehow seeing it crashing on startup in the morning in the office :-(( thx matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 14:31:44 2008 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 5578D10656CC for ; Mon, 15 Sep 2008 14:31:44 +0000 (UTC) (envelope-from hpcharles@gmail.com) Received: from hs-out-0708.google.com (hs-out-0708.google.com [64.233.178.246]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA5A8FC2F for ; Mon, 15 Sep 2008 14:31:38 +0000 (UTC) (envelope-from hpcharles@gmail.com) Received: by hs-out-0708.google.com with SMTP id h53so670017hsh.11 for ; Mon, 15 Sep 2008 07:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=DfTYXG4V3V2nPy9b8T22annzRWwbxqUBQ6iv6kHPXTg=; b=PkwNeJAjizeCGEOmdaLyM8SW4zW4p/9d59j9lRTnLJN/wgxJMd2rjfTob3RRymyMr5 KpmRd6yoepqUV988xotBB3EJZ1g6hVdK28UpUxN5CKtLsHkR0c5AytZx0XGidovO1MiV Sxwsgry+agIsEi6d9+Gem2DMUdmEteF2jw/w4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=D0Sd5FLCRgxxxyclC9IZFvuY3SeEyeWqZVhpYRkrd8yMCYdeEUxC/So4FrL1Kvu1jL 5mZIYaWnCHuZdolzoerB6n2lnc/R87phXiuyEoozjg9Q14GpOAIeLpidE3ePb1D0XM5k dAP/BPD0fOB6/7EKJuuq57+JUm5HKnts0A8AQ= Received: by 10.143.1.12 with SMTP id d12mr2686638wfi.297.1221487143930; Mon, 15 Sep 2008 06:59:03 -0700 (PDT) Received: by 10.142.203.16 with HTTP; Mon, 15 Sep 2008 06:59:03 -0700 (PDT) Message-ID: <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> Date: Mon, 15 Sep 2008 15:59:03 +0200 From: "Henri-Pierre Charles" To: "Rui Paulo" In-Reply-To: <20080828002919.GA54169@alpha.local> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080828002919.GA54169@alpha.local> Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hpcharles@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 14:31:44 -0000 Hi, On Thu, Aug 28, 2008 at 2:29 AM, Rui Paulo wrote: > We've updated ath_hal in HEAD to 0.10.5.10. This supports a couple of > new chips, namely those on the Asus Eee PC, MacBooks and other laptops. It's included into 8.0-CURRENT-200809-i386 snapshot if I understand correctly. > If you have an Atheros or Atheros based card, I really wanted you to > test it. We were unable to test this in several Atheros chipsets, so > if you find a regression, please contact me or Sam Leffler > (sam@freebsd.org) ASAP. I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. The corresponding dmesg can be found here : * http://www.prism.uvsq.fr/~hpc/pmwiki/uploads/Data/dmesg-7.1-BETA.txt * http://www.prism.uvsq.fr/~hpc/pmwiki/uploads/Data/dmesg-8.0-200809.txt The 8.0-CURRENT-200809-i386 contain ath_hal 0.10.5.10 but I was unable to use the interface. "dhclient ath0" never give up. Let me know if I can try something. In the past I had success with 7.0 code base + madwifi-ng-r2756+ar5007.hal I was able to use ath with dhclient and wpa_supplicant. And what about the rj45 interface for eee 701 ? Any chance to be supported in a near future ? -- HPC From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 15:18:52 2008 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 D629D1065676 for ; Mon, 15 Sep 2008 15:18:52 +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 C4AA28FC26 for ; Mon, 15 Sep 2008 15:18:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8FFIqF6018970 for ; Mon, 15 Sep 2008 15:18:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8FFIqRg018966 for freebsd-net@FreeBSD.org; Mon, 15 Sep 2008 15:18:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Sep 2008 15:18:52 GMT Message-Id: <200809151518.m8FFIqRg018966@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, 15 Sep 2008 15:18:52 -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 -------------------------------------------------------------------------------- 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/127102 net [wpi] Intel 3945ABG low throughput 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/126984 net [carp][patch] add carp userland notifications via devc 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 bin/126822 net wpa_supplicant(8): WPA PSK does not work in adhoc mode o kern/126742 net [panic] kernel panic when sending file via ng_ubt(4) 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/126688 net [ixgbe] [patch] 1.4.7 ixgbe driver panic with 4GB and f kern/126564 net [ath] doesn't work with my PCI-E X1 wireless network a o kern/126561 net [nlm] [patch] NLM (rpclockd) RPC UNLOCK failure (stall o kern/126475 net [ath] [panic] ath pcmcia card inevitably panics under o kern/126469 net [fxp] [panic] fxp(4) related kernel panic o kern/126339 net [ipw] ipw driver drops the connection o kern/126214 net [ath] txpower problem with Atheros wifi card o kern/126075 net [in] Network: 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] [bridge] carp stuck in init when using bridge i f kern/125502 net [ral] ifconfig ral0 scan produces no output unless in o kern/125258 net [socket] socket's SO_REUSEADDR option does not work o kern/125239 net [gre] kernel crash when using gre f kern/125195 net [fxp] fxp(4) driver failed to initialize device Intel o kern/125181 net [ndis] [patch] with wep enters kdb.enter.unknown, pani o kern/125079 net [ppp] host routes added by ppp with gateway flag (regr o kern/124904 net [fxp] EEPROM corruption with Compaq NC3163 NIC o kern/124767 net [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124753 net [ieee80211] net80211 discards power-save queue packets o kern/124609 net [ipsec] [panic] ipsec 'remainder too big' panic with p o kern/124341 net [ral] promiscuous mode for wireless device ral0 looses o kern/124160 net [libc] connect(2) function loops indefinitely o kern/124127 net [msk] watchdog timeout (missed Tx interrupts) -- recov o kern/124021 net [ip6] [panic] page fault in nd6_output() o bin/124004 net ifconfig(8): Cannot assign both an IP and a MAC addres o kern/123968 net [rum] [panic] rum driver causes kernel panic with WPA. p kern/123961 net [vr] [patch] Allow vr interface to handle vlans o kern/123892 net [tap] [patch] No buffer space available o kern/123881 net [tcp] Turning on TCP blackholing causes slow localhost o kern/123796 net [ipf] FreeBSD 6.1+VPN+ipnat+ipf: port mapping does not o bin/123633 net ifconfig(8) doesn't set inet and ether address in one o kern/123617 net [tcp] breaking connection when client downloading file o kern/123603 net [tcp] tcp_do_segment and Received duplicate SYN 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 kern/123429 net [nfe] [hang] "ifconfig nfe up" causes a hard system lo o kern/123347 net [bge] bge1: watchdog timeout -- linkstate changed to D o conf/123330 net [nsswitch.conf] Enabling samba wins in nsswitch.conf c o kern/123256 net [wpi] panic: blockable sleep lock with wpi(4) f kern/123200 net [netgraph] Server failure due to netgraph mpd and dhcp f kern/123172 net [bce] Watchdog timeout problems with if_bce o kern/123160 net [ip] Panic and reboot at sysctl kern.polling.enable=0 o kern/123066 net [ipsec] [panic] kernel trap with ipsec 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 o kern/122928 net [em] interface watchdog timeouts and stops receiving p f kern/122839 net [multicast] FreeBSD 7 multicast routing problem f kern/122794 net [lagg] Kernel panic after brings lagg(8) up if NICs ar o kern/122780 net [lagg] tcpdump on lagg interface during high pps wedge o kern/122772 net [em] em0 taskq panic, tcp reassembly bug causes radix o kern/122743 net [panic] vm_page_unwire: invalid wire count: 0 o kern/122697 net [ath] Atheros card is not well supported o kern/122685 net It is not visible passing packets in tcpdump o kern/122551 net [bge] Broadcom 5715S no carrier on HP BL460c blade usi o kern/122427 net [apm] [panic] apm and mDNSResponder cause panic during 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 f kern/122252 net [ipmi] [bge] IPMI problem with BCM5704 (does not work o kern/122195 net [ed] Alignment problems in if_ed o kern/122082 net [in_pcb] NULL pointer dereference in in_pcbdrop o kern/122068 net [ppp] ppp can not set the correct interface with pptpd o kern/122058 net [em] [panic] Panic on em1: taskq o kern/122033 net [ral] [lor] Lock order reversal in ral0 at bootup [reg o kern/121983 net [fxp] fxp0 MBUF and PAE o kern/121872 net [wpi] driver fails to attach on a fujitsu-siemens s711 s kern/121774 net [swi] [panic] 6.3 kernel panic in swi1: net o kern/121706 net [netinet] [patch] "rtfree: 0xc4383870 has 1 refs" emit o kern/121624 net [em] [regression] Intel em WOL fails after upgrade to 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 kern/121298 net [em] [panic] Fatal trap 12: page fault while in kernel 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/121080 net [bge] IPv6 NUD problem on multi address config on bge0 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 [panic] gnugk causes kernel panic when closing UDP soc o kern/120232 net [nfe] [patch] Bring in nfe(4) to RELENG_6 o kern/120130 net [carp] [panic] carp causes kernel panics in any conste 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/119361 net [bge] bge(4) transmit performance problem o kern/119345 net [ath] Unsuported Atheros 5424/2424 and CPU speedstep n o kern/119225 net [wi] 7.0-RC1 no carrier with Prism 2.5 wifi card [regr o bin/118987 net ifconfig(8): ifconfig -l (address_family) does not wor o kern/118880 net [ip6] IP_RECVDSTADDR & IP_SENDSRCADDR not implemented a kern/118879 net [bge] [patch] bge has checksum problems on the 5703 ch 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 kern/117043 net [em] Intel PWLA8492MT Dual-Port Network adapter EEPROM o kern/116837 net [tun] [panic] [patch] ifconfig tunX destroy: panic o kern/116747 net [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile o bin/116643 net [patch] [request] fstat(1): add INET/INET6 socket deta o kern/116328 net [bge]: Solid hang with bge interface o kern/116185 net [iwi] if_iwi driver leads system to reboot o kern/116077 net [ip] [patch] 6.2-STABLE panic during use of multi-cast o kern/115239 net [ipnat] panic with 'kmem_map too small' using ipnat o kern/114915 net [patch] [pcn] pcn (sys/pci/if_pcn.c) ethernet driver f o kern/114839 net [fxp] fxp looses ability to speak with traffic o kern/114714 net [gre][patch] gre(4) is not MPSAFE and does not support o kern/113842 net [ip6] PF_INET6 proto domain state can't be cleared wit o kern/112722 net [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/109733 net [bge] bge link state issues [regression] 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/108542 net [bce]: Huge network latencies with 6.2-RELEASE / STABL o conf/107035 net [patch] bridge interface given in rc.conf not taking a 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 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 conf/102502 net [patch] ifconfig name does't rename netgraph node in n 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/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/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 o kern/93378 net [tcp] Slow data transfer in Postfix and Cyrus IMAP (wo f kern/92552 net A serious bug in most network drivers from 5.X to 6.X o kern/92090 net [bge] bge0: watchdog timeout -- resetting s kern/91777 net [ipf] [patch] wrong behaviour with skip rule inside an o kern/91594 net [em] FreeBSD > 5.4 w/ACPI fails to detect Intel Pro/10 o kern/87521 net [ipf] [panic] using ipfilter "auth" keyword leads to k s kern/86920 net [ndis] ifconfig: SIOCS80211: Invalid argument [regress o kern/86103 net [ipf] Illegal NAT Traversal in IPFilter s kern/81147 net [net] [patch] em0 reinitialization while adding aliase o kern/79895 net [ipf] 5.4-RC2 breaks ipfilter NAT when using netgraph o bin/79228 net [patch] extend arp(8) to be able to create blackhole r o kern/78090 net [ipf] ipf filtering on bridged packets doesn't work if p kern/77913 net [wi] [patch] Add the APDL-325 WLAN pccard to wi(4) 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/70904 net [ipf] ipfilter ipnat problem with h323 proxy support o kern/64556 net [sis] if_sis short cable fix problems with NetGear FA3 s kern/60293 net FreeBSD arp poison patch 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/35442 net [sis] [patch] Problem transmitting runts in if_sis dri o kern/34665 net [ipf] [hang] ipfilter rcmd proxy "hangs". o kern/27474 net [ipf] [ppp] Interactive use of user PPP and ipfilter c o conf/23063 net [PATCH] for static ARP tables in rc.network 173 problems total. From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 15:19:51 2008 Return-Path: Delivered-To: net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B96B7106567E for ; Mon, 15 Sep 2008 15:19:51 +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 902438FC19 for ; Mon, 15 Sep 2008 15:19:51 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8FFJplW020040 for ; Mon, 15 Sep 2008 15:19:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8FFJpfC020036 for net@FreeBSD.org; Mon, 15 Sep 2008 15:19:51 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 15 Sep 2008 15:19:51 GMT Message-Id: <200809151519.m8FFJpfC020036@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: net@FreeBSD.org Cc: Subject: Current problem reports assigned to 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, 15 Sep 2008 15:19:51 -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 -------------------------------------------------------------------------------- p docs/120945 net [PATCH] ip6(4) man page lacks documentation for TCLASS 1 problem total. From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 16:27:33 2008 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 3617E1065680 for ; Mon, 15 Sep 2008 16:27:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outP.internet-mail-service.net (outp.internet-mail-service.net [216.240.47.239]) by mx1.freebsd.org (Postfix) with ESMTP id 0F60D8FC29 for ; Mon, 15 Sep 2008 16:27:33 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 2F16F2443; Mon, 15 Sep 2008 09:27:33 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 615D92D6006; Mon, 15 Sep 2008 09:27:32 -0700 (PDT) Message-ID: <48CE8CF3.6060802@elischer.org> Date: Mon, 15 Sep 2008 09:27:31 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> In-Reply-To: <48CD4C11.6020104@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Alexandre Biancalana Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 16:27:33 -0000 Bruce M. Simpson wrote: > Alexandre Biancalana wrote: >> Hi! >> >> How's good is our ECMP ? Is someone using in production ? >> > > Doesn't exist yet, care to contribute? > > There is "multiple routing tables" support but that's not quite the same > thing. > > regards > BMS > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 17:42:09 2008 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 5BBE51065677 for ; Mon, 15 Sep 2008 17:42:09 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 26D778FC22 for ; Mon, 15 Sep 2008 17:42:09 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from bcs-mail03.internal.cacheflow.com ([10.2.2.95]) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id m8FHSLbT026146; Mon, 15 Sep 2008 10:28:22 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Sep 2008 10:28:17 -0700 Message-ID: In-Reply-To: <48CDE229.905@elischer.org> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ECMP Support Thread-Index: AckW6k9RxLT1fWdxTtqG0uNz8h6vowAaLb4g References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> <48CD506F.8090401@FreeBSD.org><8e10486b0809141456t48e799a0tcd74b605f2ad473f@mail.gmail.com> <48CDE229.905@elischer.org> From: "Li, Qing" To: "Alexandre Biancalana" Cc: freebsd-net@freebsd.org, Julian Elischer , Qing Li Subject: RE: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 17:42:09 -0000 I can't tell you if the current ECMP support is good enough for you without knowing what your requirements are. We are using the code in production environments (along with other pieces of=20 supporting infrastructure to perform our enhanced features). I know Barrett Lyon from BitGravity has been testing the code. I developed the code on FreeBSD 5.4 originally and I integrated the changes into -current, so I can't imagine it would be that hard=20 to get it working in the 7.x branch if that is what you need. The main issue of running the ECMP code in any release later than=20 the 5.4 release, is the lack of "inp_route" field that caches the route. In a system where the routing table changes frequently, the symptom would be packets of a flow could be spread across multiple paths, which could have serious impact on TCP performance. The "inp_route" field was removed in 5.4 release if I remembered correctly. I reintroduced this field in our custom releases. The "route" and "netstat" commands work with ECMP. There isn't much documentation but I do intend to update the manpages soon. Please indicate if there is any other command that you need. -- Qing =09 > -----Original Message----- > From: owner-freebsd-net@freebsd.org=20 > [mailto:owner-freebsd-net@freebsd.org] On Behalf Of Julian Elischer > Sent: Sunday, September 14, 2008 9:19 PM > To: Alexandre Biancalana > Cc: freebsd-net@freebsd.org; Qing Li > Subject: Re: ECMP Support >=20 > Alexandre Biancalana wrote: > > On 9/14/08, Bruce M. Simpson wrote: > >> Alexandre Biancalana wrote: > >> > >>>> There is "multiple routing tables" support but that's not quite=20 > >>>> the > >> same > >>>> thing. > >>>> > >>>> > >>> Doesn't exists ?? So what's this commit message about ? > >>> > >>> > >> http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html > >>> > >> Qing Li committed this support to -CURRENT but not RELENG_7. > >=20 > > Sure! Excuse my misunderstanding.... > >=20 > >> AFAIK there > >> hasn't been management tool support added, so further work=20 > is needed=20 > >> before it can be used. > >=20 > > There is any documentation about what have to be done ? >=20 > I suggest you talk to Qing. He is probably lurking.. > >=20 > > Thank you > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to=20 > "freebsd-net-unsubscribe@freebsd.org" >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >=20 From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 17:44:22 2008 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 DFA00106567F for ; Mon, 15 Sep 2008 17:44:22 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184]) by mx1.freebsd.org (Postfix) with ESMTP id 6D4788FC17 for ; Mon, 15 Sep 2008 17:44:22 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so1206655tid.3 for ; Mon, 15 Sep 2008 10:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=LxjizoULc9kHU3g1AEEp8OK4E/THHKzFmMt4tNehKWw=; b=lW+7IRQqHgQYKCCEL9iL0bulxhVv5rogE8IziwHuLdVYGdyy8uGPZ93aScxw2EG3gj AJfhbSoaiMLpHMlSgYWJbAZimVGmsDINLmzyn7y9sYj+tJYjNipV2+k5yhmVbjB5DqFz unN/Pj8anPhwFQ1YzE6KKWKkAuWMqiIQeTuUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=JRDFlZ4nG1S27WggNiEFUQF5cHWfyeGDVz3KUFzKkpQwB5lDkz/YVq3+24LEkMRxLu UwLDKFYxDfgJ4l8enUe9N6GLg+MQyWC4GADpL17uSJgnj3wuHfvikPCe3PqkJDLkFbnP P4rpUHAMoagWyy9QCm4yRlm7D9mMsM1uH8ckA= Received: by 10.110.60.2 with SMTP id i2mr10470584tia.0.1221499243192; Mon, 15 Sep 2008 10:20:43 -0700 (PDT) Received: by 10.110.90.11 with HTTP; Mon, 15 Sep 2008 10:20:43 -0700 (PDT) Message-ID: Date: Tue, 16 Sep 2008 01:20:43 +0800 From: "Jian Qiu" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 17:44:23 -0000 I noticed there was a project trying to parallelize netisr in SMP. But I cannot find the relevant codes in either stable 7 or current 8. I'm wondering what's the current status of this project? When will it be merged into FreeBSD source tree? Many thanks. Best regards, Jian From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 19:28:55 2008 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 2EC3C1065682; Mon, 15 Sep 2008 19:28:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9BBBF8FC24; Mon, 15 Sep 2008 19:28:54 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8FJRe5i082601; Mon, 15 Sep 2008 15:28:48 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org, Matthias Apitz Date: Mon, 15 Sep 2008 14:48:05 -0400 User-Agent: KMail/1.9.7 References: <20080915110838.GA5258@rebelion.Sisis.de> In-Reply-To: <20080915110838.GA5258@rebelion.Sisis.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809151448.06105.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 15 Sep 2008 15:28:48 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8249/Mon Sep 15 12:31:36 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-net@freebsd.org, bug-followup@freebsd.org Subject: Re: panic's on KDE-launches (but only in WPA Wifi area) / kern/122331 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 19:28:55 -0000 On Monday 15 September 2008 07:08:38 am Matthias Apitz wrote: > > Hello, > > I'm booting my laptop 3 times a day: in the morning at home (WEP area), > when I arrive in my office (WPA area) and in the evening at home > (again); > > the sequence is always the same: booting, login into console, startx > which launches via ~/.xinitrc the KDE; > > in about 1 of 2-3 cases and only in the office(!) the system panics when > KDE comes up, at the end of the KDE booting and the jingle already > played; today it crashed again and again and after switching off the > Wifi radio on the laptop it came finally up fine; > > I did this (Wifi off) because I'm assuming somehow a relation with > http://www.freebsd.org/cgi/query-pr.cgi?pr=122331 > where my laptop as well only panic'ed in WPA mode (i.e. in the office) > and with 'bgscan' active; which I now have deactivated; > > all these panics look in the debugger more or less like this one: > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0xc > fault code = supervisor read, page not present > instruction pointer = 0x20:0xc0788b98 > stack pointer = 0x28:0xe6960acc > frame pointer = 0x28:0xe6960c50 > code segment = base 0x0, limit 0xfffff, type 0x1b > = DPL 0, pres 1, def32 1, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 1426 (kdeinit) > trap number = 12 > panic: page fault > cpuid = 0 > Uptime: 1m36s > Physical memory: 1009 MB > Dumping 129 MB: 114 98 82 66 50 34 18 2 > > #0 doadump () at pcpu.h:195 > 195 pcpu.h: No such file or directory. > in pcpu.h > (kgdb) bt > #0 doadump () at pcpu.h:195 > #1 0xc0754457 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 > #2 0xc0754719 in panic (fmt=Variable "fmt" is not available.) at /usr/src/sys/kern/kern_shutdown.c:563 > #3 0xc0a4905c in trap_fatal (frame=0xe6960a8c, eva=12) at /usr/src/sys/i386/i386/trap.c:899 > #4 0xc0a492e0 in trap_pfault (frame=0xe6960a8c, usermode=0, eva=12) > at /usr/src/sys/i386/i386/trap.c:812 > #5 0xc0a49c8c in trap (frame=0xe6960a8c) at /usr/src/sys/i386/i386/trap.c:490 > #6 0xc0a2fc0b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 > #7 0xc0788b98 in kern_select (td=0xc49d5630, nd=9, fd_in=0x298ad840, fd_ou=0x298ad9c4, > fd_ex=0x298adb48, tvp=0x0) at filedesc.h:136 > #8 0xc07890de in select (td=0xc49d5630, uap=0xe6960cfc) at /usr/src/sys/kern/sys_generic.c:663 > #9 0xc0a49635 in syscall (frame=0xe6960d38) at /usr/src/sys/i386/i386/trap.c:1035 > #10 0xc0a2fc70 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196 > #11 0x00000033 in ?? () > Previous frame inner to this frame (corrupt stack?) > (kgdb) > > the 'current process' (kdeinit in the above crash) changes, but is > always one of the KDE parts; of course the problem is not KDE related, > it is just that the system comes under heavy usage in that moment; > > I already run 'memtest 128' for some hours without any noted problem in > memory; test are just passing fine; > > the same problem is with 7.0-RELEASE as with RELENG_7; > > what can I do to nail this down? it sucks somehow seeing it crashing on > startup in the morning in the office :-(( Can you go to frame 7 in kgdb and 'p *fdp'? -- John Baldwin From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 19:55:22 2008 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 60D96106567C; Mon, 15 Sep 2008 19:55:22 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (mail.oclc.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD9D8FC12; Mon, 15 Sep 2008 19:55:21 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id VAA25128; Mon, 15 Sep 2008 21:41:13 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) Received: from ppp-62-216-212-223.dynamic.mnet-online.de(62.216.212.223) by hunter.Sisis.de via smap (V2.1) id xma025053; Mon, 15 Sep 08 21:40:36 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m8FJmsKC008583; Mon, 15 Sep 2008 21:48:54 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Mon, 15 Sep 2008 21:48:53 +0200 From: Matthias Apitz To: John Baldwin Message-ID: <20080915194853.GA8365@rebelion.Sisis.de> References: <20080915110838.GA5258@rebelion.Sisis.de> <200809151448.06105.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200809151448.06105.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-hackers@freebsd.org, Matthias Apitz , bug-followup@freebsd.org, freebsd-net@freebsd.org Subject: Re: panic's on KDE-launches (but only in WPA Wifi area) / kern/122331 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 19:55:22 -0000 El día Monday, September 15, 2008 a las 02:48:05PM -0400, John Baldwin escribió: > > #0 doadump () at pcpu.h:195 > > 195 pcpu.h: No such file or directory. > > in pcpu.h > > (kgdb) bt > > #0 doadump () at pcpu.h:195 > > #1 0xc0754457 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 > > #2 0xc0754719 in panic (fmt=Variable "fmt" is not available.) > at /usr/src/sys/kern/kern_shutdown.c:563 > > #3 0xc0a4905c in trap_fatal (frame=0xe6960a8c, eva=12) > at /usr/src/sys/i386/i386/trap.c:899 > > #4 0xc0a492e0 in trap_pfault (frame=0xe6960a8c, usermode=0, eva=12) > > at /usr/src/sys/i386/i386/trap.c:812 > > #5 0xc0a49c8c in trap (frame=0xe6960a8c) > at /usr/src/sys/i386/i386/trap.c:490 > > #6 0xc0a2fc0b in calltrap () at /usr/src/sys/i386/i386/exception.s:139 > > #7 0xc0788b98 in kern_select (td=0xc49d5630, nd=9, fd_in=0x298ad840, > fd_ou=0x298ad9c4, > > fd_ex=0x298adb48, tvp=0x0) at filedesc.h:136 > > #8 0xc07890de in select (td=0xc49d5630, uap=0xe6960cfc) > at /usr/src/sys/kern/sys_generic.c:663 > > #9 0xc0a49635 in syscall (frame=0xe6960d38) > at /usr/src/sys/i386/i386/trap.c:1035 > > #10 0xc0a2fc70 in Xint0x80_syscall () > at /usr/src/sys/i386/i386/exception.s:196 > > #11 0x00000033 in ?? () > > Previous frame inner to this frame (corrupt stack?) > > (kgdb) > > ... > Can you go to frame 7 in kgdb and 'p *fdp'? (kgdb) frame 7 #7 0xc0788b98 in kern_select (td=0xc49d5630, nd=9, fd_in=0x298ad840, fd_ou=0x298ad9c4, fd_ex=0x298adb48, tvp=0x0) at filedesc.h:136 return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]); (kgdb) p *fdp Variable "fdp" is not available. (kgdb) perhaps I do something wrong? matthias From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 20:02:45 2008 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 6691B1065670 for ; Mon, 15 Sep 2008 20:02:45 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.186]) by mx1.freebsd.org (Postfix) with ESMTP id DF5DF8FC08 for ; Mon, 15 Sep 2008 20:02:44 +0000 (UTC) (envelope-from biancalana@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so1136491gve.39 for ; Mon, 15 Sep 2008 13:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=lMB7zA4IdT/TOCJ0306uqcYMTtYve95VEARO1zSQhe8=; b=HA1jtJPfkajes6bzspUa5hah4tmNI4b3GJIZmHmVV/sct9ugonrgw5/4HdToEF3sOJ Yv1x3Fx17p/UN+Y0YCPHzi7ocR8BhhBPfXSJPXAbB6rqt/DAkQFRS/wW+I0MBYCOEACH Yj3gPtXdIuPmF8oa4v9ESdwjsNK3+rtESoSdY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=HWlejheu021id7hCBRlDtPjIuDHYVgQpcy+rQHQOuu4QLXBq5TIQU1/9fhMj4RV40c +UFzuUisT0eNstyRihhrPSgrsEAWUK+PZB+6n/hVPElzhfWeKU9S/nKmTisuejFei1ja v181kdHJ8dSJIL656oiiEay8Hp9ptn32MXQpQ= Received: by 10.187.201.15 with SMTP id d15mr5903faq.32.1221508963240; Mon, 15 Sep 2008 13:02:43 -0700 (PDT) Received: by 10.187.220.2 with HTTP; Mon, 15 Sep 2008 13:02:43 -0700 (PDT) Message-ID: <8e10486b0809151302l5a1c9433j5e44b54198409cd8@mail.gmail.com> Date: Mon, 15 Sep 2008 17:02:43 -0300 From: "Alexandre Biancalana" To: "Li, Qing" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> <48CD506F.8090401@FreeBSD.org> <8e10486b0809141456t48e799a0tcd74b605f2ad473f@mail.gmail.com> <48CDE229.905@elischer.org> Cc: freebsd-net@freebsd.org, Julian Elischer , Qing Li Subject: Re: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 20:02:45 -0000 On 9/15/08, Li, Qing wrote: > > I can't tell you if the current ECMP support is good enough for > you without knowing what your requirements are. We are using > the code in production environments (along with other pieces of > supporting infrastructure to perform our enhanced features). > I know Barrett Lyon from BitGravity has been testing the code. Hi Qing ! Thank you for your answer ! My idea is use ECMP on 7.x branch to balance 100Mbit Lan-2-Lan links between our enterprise network and IDC network. > > I developed the code on FreeBSD 5.4 originally and I integrated > the changes into -current, so I can't imagine it would be that > hard > to get it working in the 7.x branch if that is what you need. > > The main issue of running the ECMP code in any release later > than > the 5.4 release, is the lack of "inp_route" field that caches > the route. In a system where the routing table changes > frequently, > the symptom would be packets of a flow could be spread across > multiple paths, which could have serious impact on TCP > performance. In this case the route table only change when a link goes down, so I will remove this from routing table until this goes up again. This is a problem with current ECMP implementation ? > The "inp_route" field was removed in 5.4 release if I remembered > correctly. I reintroduced this field in our custom releases. > > The "route" and "netstat" commands work with ECMP. There isn't > much documentation but I do intend to update the manpages soon. > Please indicate if there is any other command that you need. I think this is enough for me. Regards, Alexandre > > > -----Original Message----- > > From: owner-freebsd-net@freebsd.org > > [mailto:owner-freebsd-net@freebsd.org] On Behalf Of Julian Elischer > > Sent: Sunday, September 14, 2008 9:19 PM > > To: Alexandre Biancalana > > Cc: freebsd-net@freebsd.org; Qing Li > > Subject: Re: ECMP Support > > > > Alexandre Biancalana wrote: > > > On 9/14/08, Bruce M. Simpson wrote: > > >> Alexandre Biancalana wrote: > > >> > > >>>> There is "multiple routing tables" support but that's not quite > > >>>> the > > >> same > > >>>> thing. > > >>>> > > >>>> > > >>> Doesn't exists ?? So what's this commit message about ? > > >>> > > >>> > > >> http://lists.freebsd.org/pipermail/cvs-src/2008-April/089956.html > > >>> > > >> Qing Li committed this support to -CURRENT but not RELENG_7. > > > > > > Sure! Excuse my misunderstanding.... > > > > > >> AFAIK there > > >> hasn't been management tool support added, so further work > > is needed > > >> before it can be used. > > > > > > There is any documentation about what have to be done ? > > > > I suggest you talk to Qing. He is probably lurking.. > > > > > > Thank you > > > _______________________________________________ > > > 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 Mon Sep 15 20:49:49 2008 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 AD3011065671; Mon, 15 Sep 2008 20:49:49 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id E8CB98FC12; Mon, 15 Sep 2008 20:49:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8FKnSXC083294; Mon, 15 Sep 2008 16:49:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Matthias Apitz Date: Mon, 15 Sep 2008 16:08:06 -0400 User-Agent: KMail/1.9.7 References: <20080915110838.GA5258@rebelion.Sisis.de> <200809151448.06105.jhb@freebsd.org> <20080915194853.GA8365@rebelion.Sisis.de> In-Reply-To: <20080915194853.GA8365@rebelion.Sisis.de> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200809151608.06738.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 15 Sep 2008 16:49:42 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8250/Mon Sep 15 14:08:28 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, bug-followup@freebsd.org, freebsd-net@freebsd.org Subject: Re: panic's on KDE-launches (but only in WPA Wifi area) / kern/122331 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 20:49:49 -0000 On Monday 15 September 2008 03:48:53 pm Matthias Apitz wrote: > El d=EDa Monday, September 15, 2008 a las 02:48:05PM -0400, John Baldwin= =20 escribi=F3: >=20 > > > #0 doadump () at pcpu.h:195 > > > 195 pcpu.h: No such file or directory. > > > in pcpu.h > > > (kgdb) bt > > > #0 doadump () at pcpu.h:195 > > > #1 0xc0754457 in boot (howto=3D260)=20 at /usr/src/sys/kern/kern_shutdown.c:409 > > > #2 0xc0754719 in panic (fmt=3DVariable "fmt" is not available.)=20 > > at /usr/src/sys/kern/kern_shutdown.c:563 > > > #3 0xc0a4905c in trap_fatal (frame=3D0xe6960a8c, eva=3D12)=20 > > at /usr/src/sys/i386/i386/trap.c:899 > > > #4 0xc0a492e0 in trap_pfault (frame=3D0xe6960a8c, usermode=3D0, eva= =3D12) > > > at /usr/src/sys/i386/i386/trap.c:812 > > > #5 0xc0a49c8c in trap (frame=3D0xe6960a8c)=20 > > at /usr/src/sys/i386/i386/trap.c:490 > > > #6 0xc0a2fc0b in calltrap () at /usr/src/sys/i386/i386/exception.s:1= 39 > > > #7 0xc0788b98 in kern_select (td=3D0xc49d5630, nd=3D9, fd_in=3D0x298= ad840,=20 > > fd_ou=3D0x298ad9c4,=20 > > > fd_ex=3D0x298adb48, tvp=3D0x0) at filedesc.h:136 > > > #8 0xc07890de in select (td=3D0xc49d5630, uap=3D0xe6960cfc)=20 > > at /usr/src/sys/kern/sys_generic.c:663 > > > #9 0xc0a49635 in syscall (frame=3D0xe6960d38)=20 > > at /usr/src/sys/i386/i386/trap.c:1035 > > > #10 0xc0a2fc70 in Xint0x80_syscall ()=20 > > at /usr/src/sys/i386/i386/exception.s:196 > > > #11 0x00000033 in ?? () > > > Previous frame inner to this frame (corrupt stack?) > > > (kgdb)=20 > > >=20 > ... > > Can you go to frame 7 in kgdb and 'p *fdp'? >=20 > (kgdb) frame 7 > #7 0xc0788b98 in kern_select (td=3D0xc49d5630, nd=3D9, fd_in=3D0x298ad84= 0,=20 > fd_ou=3D0x298ad9c4, fd_ex=3D0x298adb48, tvp=3D0x0) at filedesc.h:136 > return (fd < 0 || fd >=3D fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]); > (kgdb) p *fdp > Variable "fdp" is not available. > (kgdb)=20 If 'td' is available then you can do 'p *td->td_proc->p_fd' =2D-=20 John Baldwin From owner-freebsd-net@FreeBSD.ORG Mon Sep 15 22:24:36 2008 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 B13E91065672; Mon, 15 Sep 2008 22:24:36 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4318FC21; Mon, 15 Sep 2008 22:24:35 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id AAA09932; Tue, 16 Sep 2008 00:16:14 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) Received: from ppp-62-216-212-223.dynamic.mnet-online.de(62.216.212.223) by hunter.Sisis.de via smap (V2.1) id xma009913; Tue, 16 Sep 08 00:15:57 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m8FMOE3r012550; Tue, 16 Sep 2008 00:24:14 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Tue, 16 Sep 2008 00:24:14 +0200 From: Matthias Apitz To: John Baldwin Message-ID: <20080915222414.GA12474@rebelion.Sisis.de> References: <20080915110838.GA5258@rebelion.Sisis.de> <200809151448.06105.jhb@freebsd.org> <20080915194853.GA8365@rebelion.Sisis.de> <200809151608.06738.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200809151608.06738.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-hackers@freebsd.org, Matthias Apitz , bug-followup@freebsd.org, freebsd-net@freebsd.org Subject: Re: panic's on KDE-launches (but only in WPA Wifi area) / kern/122331 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Sep 2008 22:24:37 -0000 El día Monday, September 15, 2008 a las 04:08:06PM -0400, John Baldwin escribió: > > > Can you go to frame 7 in kgdb and 'p *fdp'? > > > > (kgdb) frame 7 > > #7 0xc0788b98 in kern_select (td=0xc49d5630, nd=9, fd_in=0x298ad840, > > fd_ou=0x298ad9c4, fd_ex=0x298adb48, tvp=0x0) at filedesc.h:136 > > return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]); > > (kgdb) p *fdp > > Variable "fdp" is not available. > > (kgdb) > > If 'td' is available then you can do 'p *td->td_proc->p_fd' (kgdb) frame 7 #7 0xc0788b98 in kern_select (td=0xc49d5630, nd=9, fd_in=0x298ad840, fd_ou=0x298ad9c4, fd_ex=0x298adb48, tvp=0x0) at filedesc.h:136 136 return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]); (kgdb) p td $7 = (struct thread *) 0xc49d5630 (kgdb) p *td->td_proc->p_fd $8 = {fd_ofiles = 0x0, fd_ofileflags = 0x0, fd_cdir = 0x0, fd_rdir = 0xc42f3a00, fd_jdir = 0x0, fd_nfiles = 20, fd_map = 0xc49db8b4, fd_lastfile = 9, fd_freefile = 10, fd_cmask = 18, fd_refcnt = 1, fd_holdcnt = 1, fd_sx = {lock_object = { lo_name = 0xc0ad3cbe "filedesc structure", lo_type = 0xc0ad3cbe "filedesc structure", lo_flags = 37421056, lo_witness_data = {lod_list = {stqe_next = 0x0}, lod_witness = 0x0}}, sx_lock = 17, sx_recurse = 0}, fd_kqlist = {slh_first = 0x0}, fd_holdleaderscount = 0, fd_holdleaderswakeup = 0} (kgdb) matthias From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 00:10:26 2008 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 54945106566B; Tue, 16 Sep 2008 00:10:26 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 38AC18FC21; Tue, 16 Sep 2008 00:10:26 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from bcs-mail03.internal.cacheflow.com ([10.2.2.95]) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id m8G0APa8014989; Mon, 15 Sep 2008 17:10:25 -0700 (PDT) X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 15 Sep 2008 17:10:19 -0700 Message-ID: In-Reply-To: <8e10486b0809151302l5a1c9433j5e44b54198409cd8@mail.gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ECMP Support Thread-Index: AckXbgWtwhY7QdlUQN6IRzYpoKtPbAAINjpA References: <8e10486b0809140950h6200dfdco5950f59d23718866@mail.gmail.com> <48CD4C11.6020104@FreeBSD.org> <8e10486b0809141053i69f9c4b5raffdad187ecd16eb@mail.gmail.com> <48CD506F.8090401@FreeBSD.org> <8e10486b0809141456t48e799a0tcd74b605f2ad473f@mail.gmail.com> <48CDE229.905@elischer.org> <8e10486b0809151302l5a1c9433j5e44b54198409cd8@mail.gmail.com> From: "Li, Qing" To: "Alexandre Biancalana" Cc: freebsd-net@freebsd.org, Julian Elischer , Qing Li Subject: RE: ECMP Support X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 00:10:26 -0000 >=20 > My idea is use ECMP on 7.x branch to balance 100Mbit=20 > Lan-2-Lan links between our enterprise network and IDC network. >=20 I can merge those changes into 7.x. Frankly I have lost track of the release schedule so I do need to talk to the FreeBSD release team to figure out where and when I should integrate the code. >=20 > In this case the route table only change when a link goes=20 > down, so I will remove this from routing table until this=20 > goes up again. This is a problem with current ECMP implementation ? >=20 The route selection uses a hash and because the number of route=20 entries changes when you remove that route from the routing table, and depending on the hash key, you may get a different route=20 entry. In earlier 5.x releases when "inp_route" is present (route is sticky), tcp_output() provides that value and route lookup is bypassed. =09 This is something we are working on for a fix in -current. > > > > The "route" and "netstat" commands work with ECMP.=20 > > There isn't much documentation but I do intend to update the=20 > > manpages soon. > > Please indicate if there is any other command that you need. >=20 > I think this is enough for me. >=20 Okay. -- Qing From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 03:52:40 2008 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 32536106566B for ; Tue, 16 Sep 2008 03:52:40 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id EF9E08FC0C for ; Tue, 16 Sep 2008 03:52:39 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3238272rvf.43 for ; Mon, 15 Sep 2008 20:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=lrrKHkifpyCPuWc6nF9QaNlUt6IF4ZooGDcNMeJlaOs=; b=pTBZOj98HLb8pm7Lh37cMk00IfSxYXIeuLY0oZagxQujztEPfd4BjwnsE9m/0IkCjx G0cgCfBNIdW7NgLxeYmjWmR8kBGriZwJa83okUmlsIlo9PGLiPdNnsqaz9INnqn0zT2d b88ASC6iHAlRpMm0q6G+OpTV+Tc//gRaKJHwM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=f/hjyHbykIxQMYxL5tjhcRB6L59ZWIpGBviR460aDooZxnPU2h1ABCnwfofO9Af+mJ VMRX+Z72Sv6v37R+degkzCcukVGhkTuwJMcKloXOnA0T4aUW606jExfwgquQGvQxzsJe nuNBBUPsEkLKNMCwfk+D77jmoDxEloGfVnEcY= Received: by 10.141.177.10 with SMTP id e10mr5335848rvp.112.1221537159430; Mon, 15 Sep 2008 20:52:39 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id g31sm24374464rvb.7.2008.09.15.20.51.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 15 Sep 2008 20:51:48 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m8G3nmhD003089 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Sep 2008 12:49:48 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m8G3nl7E003088; Tue, 16 Sep 2008 12:49:47 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Tue, 16 Sep 2008 12:49:47 +0900 From: Pyun YongHyeon To: Chris Message-ID: <20080916034947.GB1301@cdnetworks.co.kr> References: <1221215436.13772.15.camel@desktop.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1221215436.13772.15.camel@desktop.lan> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 7.0 and vr0 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: Tue, 16 Sep 2008 03:52:40 -0000 On Fri, Sep 12, 2008 at 01:30:36PM +0300, Chris wrote: > Hello, > > I have a FreeBSD 7.0 server with patch level 3 and no ipv6 services > running. > > SSH / web-server / ftp server / etc stop responding but server responds > to ping. > > A reboot fix this. > > The logs show nothing. > > Any idea what may be wrong? > vr(4) had a couple of bugs in link state handling and a lot of changes made to fix all known issue since 7.0-RELEASE. Would you try 7.1-BETA? -- Regards, Pyun YongHyeon From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 05:11:26 2008 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 9A1D6106566B for ; Tue, 16 Sep 2008 05:11:26 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from server4.cretaforce.gr (server4.cretaforce.gr [85.17.232.205]) by mx1.freebsd.org (Postfix) with ESMTP id 618878FC12 for ; Tue, 16 Sep 2008 05:11:20 +0000 (UTC) (envelope-from chris@cretaforce.gr) Received: from [192.168.0.10] (athedsl-337415.home.otenet.gr [85.72.173.165]) by server4.cretaforce.gr (Postfix) with ESMTPA id 6809C398F2; Tue, 16 Sep 2008 08:11:19 +0300 (EEST) From: Chris To: pyunyh@gmail.com In-Reply-To: <20080916034947.GB1301@cdnetworks.co.kr> References: <1221215436.13772.15.camel@desktop.lan> <20080916034947.GB1301@cdnetworks.co.kr> Content-Type: text/plain Date: Tue, 16 Sep 2008 08:12:31 +0300 Message-Id: <1221541951.15672.1.camel@desktop.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: FreeBSD 7.0 and vr0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 05:11:26 -0000 I upgrade to 7.1-PRERELEASE and I will see how it goes. Also today I had similar problem with nfe card (another server). The hangs are not related to the network hard, but with something else. > vr(4) had a couple of bugs in link state handling and a lot of > changes made to fix all known issue since 7.0-RELEASE. > Would you try 7.1-BETA? > From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 07:46:16 2008 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 13C14106567E for ; Tue, 16 Sep 2008 07:46:16 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7FCC08FC0A; Tue, 16 Sep 2008 07:46:15 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48CF6450.6020909@FreeBSD.org> Date: Tue, 16 Sep 2008 08:46:24 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Jian Qiu References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 07:46:16 -0000 Jian Qiu wrote: > I noticed there was a project trying to parallelize netisr in SMP. > > But I cannot find the relevant codes in either stable 7 or current 8. > > I'm wondering what's the current status of this project? > > When will it be merged into FreeBSD source tree? It's available in a perforce branch owned by rwatson (sorry, I don't have the branch name handy), but in my tests it either produced no benefits, or actually reduced performance. This is surprising and the reasons for this are still unknown. Kris From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 09:08:24 2008 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 58878106564A; Tue, 16 Sep 2008 09:08:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3176B8FC1E; Tue, 16 Sep 2008 09:08:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from freefall.freebsd.org (bz@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8G98O0c070517; Tue, 16 Sep 2008 09:08:24 GMT (envelope-from bz@freefall.freebsd.org) Received: (from bz@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8G98OkG070513; Tue, 16 Sep 2008 09:08:24 GMT (envelope-from bz) Date: Tue, 16 Sep 2008 09:08:24 GMT Message-Id: <200809160908.m8G98OkG070513@freefall.freebsd.org> To: bz@FreeBSD.org, net@FreeBSD.org, freebsd-net@FreeBSD.org From: bz@FreeBSD.org Cc: Subject: Re: docs/120945: [PATCH] ip6(4) man page lacks documentation for TCLASS option. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 09:08:24 -0000 Synopsis: [PATCH] ip6(4) man page lacks documentation for TCLASS option. Responsible-Changed-From-To: net->freebsd-net Responsible-Changed-By: bz Responsible-Changed-When: Tue Sep 16 09:07:33 UTC 2008 Responsible-Changed-Why: Change Resp. to not get an extra GNATS spam every week. http://www.freebsd.org/cgi/query-pr.cgi?pr=120945 From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 09:08:24 2008 Return-Path: Delivered-To: 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 58878106564A; Tue, 16 Sep 2008 09:08:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3176B8FC1E; Tue, 16 Sep 2008 09:08:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from freefall.freebsd.org (bz@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8G98O0c070517; Tue, 16 Sep 2008 09:08:24 GMT (envelope-from bz@freefall.freebsd.org) Received: (from bz@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8G98OkG070513; Tue, 16 Sep 2008 09:08:24 GMT (envelope-from bz) Date: Tue, 16 Sep 2008 09:08:24 GMT Message-Id: <200809160908.m8G98OkG070513@freefall.freebsd.org> To: bz@FreeBSD.org, net@FreeBSD.org, freebsd-net@FreeBSD.org From: bz@FreeBSD.org Cc: Subject: Re: docs/120945: [PATCH] ip6(4) man page lacks documentation for TCLASS option. X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 09:08:24 -0000 Synopsis: [PATCH] ip6(4) man page lacks documentation for TCLASS option. Responsible-Changed-From-To: net->freebsd-net Responsible-Changed-By: bz Responsible-Changed-When: Tue Sep 16 09:07:33 UTC 2008 Responsible-Changed-Why: Change Resp. to not get an extra GNATS spam every week. http://www.freebsd.org/cgi/query-pr.cgi?pr=120945 From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 09:23:31 2008 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 2391E106564A for ; Tue, 16 Sep 2008 09:23:31 +0000 (UTC) (envelope-from hpcharles@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id EA49D8FC17 for ; Tue, 16 Sep 2008 09:23:30 +0000 (UTC) (envelope-from hpcharles@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so2481052wfg.7 for ; Tue, 16 Sep 2008 02:23:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=CDnWMgunSR/CAb3WCYsy13FcYTFk7EwLPuB8kXgnd2U=; b=GzOCOUrsw24s3pfBrm6D9+QpiiTQ6fEYlGrPY4UXM1/APxWgBIOzYVZ3qSfptAItoC y7m7xtZ7OtO/LDZvYkDPKQQwFVd8CYR8sDq/7nfvxxeh+TKkYbXTcLUxO4GD37kEImmD C/aNjfhrK5QabRypNZ11DU8HnZALIfH9pSdrc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=OKHkOcYuQCELPHYrhyo5K5qBcDjcN4ORMQoiubRmfxe75djT9a8OgHecQSgnEVv7tj D/meJ3Lj1HLvqm3mhUUtJOr4DTFzCswezExMwIZ3R9HloM7EcGYFdQeHcZ7FSsZbhioh 8Z1AeNjtg1cu6p2569loHZ/nRj/05w4lCfp6M= Received: by 10.142.191.10 with SMTP id o10mr271894wff.94.1221557010836; Tue, 16 Sep 2008 02:23:30 -0700 (PDT) Received: by 10.142.203.16 with HTTP; Tue, 16 Sep 2008 02:23:30 -0700 (PDT) Message-ID: <4734a3ed0809160223p6ddc6fd5pacb901ea9dfccfe3@mail.gmail.com> Date: Tue, 16 Sep 2008 11:23:30 +0200 From: "Henri-Pierre Charles" To: "Rui Paulo" In-Reply-To: <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080828002919.GA54169@alpha.local> <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hpcharles@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 09:23:31 -0000 Hello, (I reply to myself) On Mon, Sep 15, 2008 at 3:59 PM, Henri-Pierre Charles wrote: > Hi, > > On Thu, Aug 28, 2008 at 2:29 AM, Rui Paulo wrote: >> We've updated ath_hal in HEAD to 0.10.5.10. This supports a couple of >> new chips, namely those on the Asus Eee PC, MacBooks and other laptops. > > It's included into 8.0-CURRENT-200809-i386 snapshot if I understand correctly. > I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 > > 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. > The corresponding dmesg can be found here : > > * http://www.prism.uvsq.fr/~hpc/pmwiki/uploads/Data/dmesg-7.1-BETA.txt > * http://www.prism.uvsq.fr/~hpc/pmwiki/uploads/Data/dmesg-8.0-200809.txt > > The 8.0-CURRENT-200809-i386 contain ath_hal 0.10.5.10 but I was unable > to use the interface. "dhclient ath0" never give up. Let me know if I > can try something. I discover a "new" way to configure network interface, with wlan I have tried to put in my rc.conf: wlans_ath0=wlan0 ifconfig_wlan0="WPA DHCP" And .. it works, with a WPA2 configuration and also with only DHCP. Conclusion 8-0-CURRENT-200809 work out of the box for the eeepc 701. The only documentation I have found is http://people.freebsd.org/~sam/BSDCan2005.pdf . Is there something more substantial ? > And what about the rj45 interface for eee 701 ? Any chance to be supported > in a near future ? Any tips ? H-P -- HPC From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 09:52:18 2008 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 DCAFC106566B; Tue, 16 Sep 2008 09:52:18 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from unsane.co.uk (unsane-pt.tunnel.tserv5.lon1.ipv6.he.net [IPv6:2001:470:1f08:110::2]) by mx1.freebsd.org (Postfix) with ESMTP id 42F7D8FC2F; Tue, 16 Sep 2008 09:52:18 +0000 (UTC) (envelope-from vince@unsane.co.uk) Received: from vhoffman.lon.namesco.net (150.117-84-212.staticip.namesco.net [212.84.117.150]) (authenticated bits=0) by unsane.co.uk (8.14.0/8.14.0) with ESMTP id m8G9qNNc007877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 16 Sep 2008 10:52:24 +0100 (BST) (envelope-from vince@unsane.co.uk) Message-ID: <48CF81CE.2070608@unsane.co.uk> Date: Tue, 16 Sep 2008 10:52:14 +0100 From: Vincent Hoffman User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: hpcharles@gmail.com References: <20080828002919.GA54169@alpha.local> <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> <4734a3ed0809160223p6ddc6fd5pacb901ea9dfccfe3@mail.gmail.com> In-Reply-To: <4734a3ed0809160223p6ddc6fd5pacb901ea9dfccfe3@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, Rui Paulo , freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 09:52:19 -0000 Henri-Pierre Charles wrote: > Hello, (I reply to myself) > > On Mon, Sep 15, 2008 at 3:59 PM, Henri-Pierre Charles > wrote: > >> Hi, >> >> On Thu, Aug 28, 2008 at 2:29 AM, Rui Paulo wrote: >> >>> We've updated ath_hal in HEAD to 0.10.5.10. This supports a couple of >>> new chips, namely those on the Asus Eee PC, MacBooks and other laptops. >>> >> It's included into 8.0-CURRENT-200809-i386 snapshot if I understand correctly. >> I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 >> >> 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. >> The corresponding dmesg can be found here : >> >> * http://www.prism.uvsq.fr/~hpc/pmwiki/uploads/Data/dmesg-7.1-BETA.txt >> * http://www.prism.uvsq.fr/~hpc/pmwiki/uploads/Data/dmesg-8.0-200809.txt >> >> The 8.0-CURRENT-200809-i386 contain ath_hal 0.10.5.10 but I was unable >> to use the interface. "dhclient ath0" never give up. Let me know if I >> can try something. >> > > I discover a "new" way to configure network interface, with wlan > I have tried to put in my rc.conf: > wlans_ath0=wlan0 > ifconfig_wlan0="WPA DHCP" > > And .. it works, with a WPA2 configuration and also with only DHCP. > Conclusion 8-0-CURRENT-200809 work out of the box for the eeepc 701. > > The only documentation I have found is > http://people.freebsd.org/~sam/BSDCan2005.pdf . Is there something > more substantial ? > > /usr/src/UPDATING check the 20080420 entry. Always check this when updating your sources unless you read every mail on the current@ mailing list and even then its worth checking it. Vince >> And what about the rj45 interface for eee 701 ? Any chance to be supported >> in a near future ? >> > > Any tips ? > > H-P > > From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 11:22:49 2008 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 B6F52106564A for ; Tue, 16 Sep 2008 11:22:49 +0000 (UTC) (envelope-from jespasac@minibofh.org) Received: from smtp01.cdmon.com (smtp01.cdmon.com [212.36.75.232]) by mx1.freebsd.org (Postfix) with ESMTP id 818918FC15 for ; Tue, 16 Sep 2008 11:22:49 +0000 (UTC) (envelope-from jespasac@minibofh.org) Received: from jespasac.cdmon.com (62.Red-217-126-43.staticIP.rima-tde.net [217.126.43.62]) by smtp01.cdmon.com (Postfix) with ESMTP id A4665F7AA4 for ; Tue, 16 Sep 2008 13:05:49 +0200 (CEST) Message-ID: <48CF930B.4020704@minibofh.org> Date: Tue, 16 Sep 2008 13:05:47 +0200 From: Jordi Espasa Clofent User-Agent: Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Subject: Change netmask with /etc/rc.d/network restart or reboot the machine? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 11:22:49 -0000 Hi all, I've a lot of boxes in production with a lot of associated services (http, ftp, ssh, smtp, mysql...). Because of internal administration reasons I need to ampliate my internal IPs range from /24 to /16; so I need to change my internal NIC settings. The last goal is make the change with _security_. I prefer a reboot with thier 2/4 minutes downtime than a odd miss-function in several production services. I tend to think that the use of ifconfig(8) will be enough; of course, I'll also modify /etc/rc.conf 'ifconfig_' record for posterior reboots. Or maybe I has more sense to modify directly the /etc/rc.conf record and next use the '/etc/rc.d/netif restart'; or maybe make the change in /etc/rc.conf and reboot the machines. ¿What do you tink about? -- Thanks, Jordi Espasa Clofent From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 11:23:11 2008 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 18C5B106567C for ; Tue, 16 Sep 2008 11:23:11 +0000 (UTC) (envelope-from nacho319@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.242]) by mx1.freebsd.org (Postfix) with ESMTP id CAB7A8FC1A for ; Tue, 16 Sep 2008 11:23:10 +0000 (UTC) (envelope-from nacho319@gmail.com) Received: by an-out-0708.google.com with SMTP id b33so257851ana.13 for ; Tue, 16 Sep 2008 04:23:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=Pb9DDvAZnxQmZlJypZdKcQmgfXDfsWjtYtCmgUSE0yo=; b=FRH1qn0RvOOOTplIn8MeGZwHyXEVfjcYIpttKLBJISiOdLHQjbCneMrjXRNXN897eN IaC2f3HPr0wq4JtMV4dPhj7O2vyZcETOYqR5W95rP8REaC+mC+YIoOBdBNJYjZrUtkzK 6MxhQaTfO12lHIH41o65jfxz+lcNvCfwiuuoI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=xmw0lOipCgCLzBY+Ol55KJeo25RhicZxFZLQMoOtQU39EGzTrS1qyBpV807N7HTV34 iyHeGMj+wuw8R4GPCmV2fbJz+RWx78FNkWo6kvCYoUFk8A1Q/JEZYH6WS/7EU/y3+RfY trkOUFaNMYjEgqMPgEr+QPxgQRd/ijiamilcQ= Received: by 10.100.108.20 with SMTP id g20mr1254115anc.105.1221562874830; Tue, 16 Sep 2008 04:01:14 -0700 (PDT) Received: by 10.100.95.14 with HTTP; Tue, 16 Sep 2008 04:01:14 -0700 (PDT) Message-ID: <900019150809160401v316682fdt4cf8a95bfcb48dc2@mail.gmail.com> Date: Tue, 16 Sep 2008 07:01:14 -0400 From: "Chris Inacio" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: help with code to determine external IP address on FreeBSD gateway machine X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 11:23:11 -0000 Hello, I'm writing a tiny bit of code to do NAT-PMP and I need code that can determine what the external facing IP address is on a machine with presumably multiple interfaces. I think I have a method in mind which would involve getting the default route, and then figuring out which interface is reachable by that default route. There are always all the other methods of going out to a web site which will reflect my IP address back to me on a web site - and while reliable, that seems sort of hackish. So the thing is, I'm not super familiar with the necessary ioctl calls, or routing socket calls, or...? Can somebody save me a ton of time and just point me in the right direction as to how to get this done? I was looking through the code of src/net/route.c, but decided a lot of context was needed to understand what I was reading. Any help would be very much appreciated. Thanks, Chris From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 11:31:30 2008 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 9F9DD1065681 for ; Tue, 16 Sep 2008 11:31:30 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id 5CCBF8FC40 for ; Tue, 16 Sep 2008 11:31:30 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: by gxk10 with SMTP id 10so25075422gxk.19 for ; Tue, 16 Sep 2008 04:31:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=TQrCOhfWXOFSo20u7f1OY7hxuPg5JiziRGgOSQa/kKI=; b=aoUDTdm6YDCymPlgAGQmhsQWFFoAOaiN8t5a7uX6PjLGWgnfDvRuBHB4DqITpcMeUM zIY2FHvH660tPIGNXT0kwgqdIFrAjr4slEz68Mv5PuM/1yVQB0+4PCijZ4sFV14k5E0Y lTqNycoEllo0mJK5LFpDSa4yF6zSIus9tcvLc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=tXiT+niJSFZktNHANSXI8/7tZkcbCaOI1z2y5dYDoOcOa+CPM1jG9K1f+Bdq/OY1Cw R3C5e0fr87SPpQ2zJ/VHD2RzRpHhUOT+UTClDzcPEikRk83q0bbvZ+kHvdEj5obe29rQ N0NAFDZuZtkXwDSVEh0dF7AaSXbve//H4q51Q= Received: by 10.150.137.8 with SMTP id k8mr1310649ybd.202.1221564689678; Tue, 16 Sep 2008 04:31:29 -0700 (PDT) Received: by 10.151.8.8 with HTTP; Tue, 16 Sep 2008 04:31:29 -0700 (PDT) Message-ID: <4ad871310809160431j4adfc578g71afc242e8ead3b3@mail.gmail.com> Date: Tue, 16 Sep 2008 07:31:29 -0400 From: "Glen Barber" To: "Jordi Espasa Clofent" In-Reply-To: <48CF930B.4020704@minibofh.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48CF930B.4020704@minibofh.org> Cc: freebsd-net@freebsd.org Subject: Re: Change netmask with /etc/rc.d/network restart or reboot the machine? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 11:31:30 -0000 You could change the interface settings in rc.conf, and /etc/rc.d/netif restart. I've added/removed aliased interfaces in a similar fashion, and haven't experienced hiccups. You should, however, double check your service applications that listen on particular IP addresses to make sure they are going to behave after netif restarts, as well as after a reboot. Certain changes, for example apache, require the service to be restarted as well. Regards. -- Glen Barber From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 11:33:55 2008 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 EBD2E106564A for ; Tue, 16 Sep 2008 11:33:55 +0000 (UTC) (envelope-from debarshi.ray@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7FD538FC0A for ; Tue, 16 Sep 2008 11:33:55 +0000 (UTC) (envelope-from debarshi.ray@gmail.com) Received: by ey-out-2122.google.com with SMTP id 6so1058397eyi.7 for ; Tue, 16 Sep 2008 04:33:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=STlbn1neF8qU41H1XrCZHuoX2QK02Pfj6p+N3fr1w7o=; b=wj+lVArgMwZxNXbjXwlZmudcq/NqejhTKf+R7gSpduKZik9wkONTbIm3jUKBDWUh0Y LjpjNRDGwmysE3uvgwyRtxrFntLW+Xfuv/HE8YrZ++moMQfm4VKH4S1lYc0A9Zwq1wAC jy3Sc49ai063hv6yf9k1UgD461Jir3BMIT4p8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=TXPr63DVBbeSKVvbbiJ0v9n8Ng6sF6/QK736Pa4UT7PddPCkOFia0wyVUnvop8Ao62 Nu2I3n+WB4w5vrETW3MskbBw0SIpKaMQ0ZUCS+SOux4wI0jbUHtyDVLlt/oxlCFdJkKO drKUW7z2w1d7drdeeqOoq+PNqsGS2YgirOZw0= Received: by 10.187.201.15 with SMTP id d15mr100723faq.32.1221564834115; Tue, 16 Sep 2008 04:33:54 -0700 (PDT) Received: by 10.187.245.8 with HTTP; Tue, 16 Sep 2008 04:33:54 -0700 (PDT) Message-ID: <3170f42f0809160433x78d6637odc58da304cf3e19e@mail.gmail.com> Date: Tue, 16 Sep 2008 17:03:54 +0530 From: "Debarshi Ray" To: "Chris Inacio" In-Reply-To: <900019150809160401v316682fdt4cf8a95bfcb48dc2@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <900019150809160401v316682fdt4cf8a95bfcb48dc2@mail.gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: help with code to determine external IP address on FreeBSD gateway machine X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: debarshi.ray@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 11:33:56 -0000 I have some PF_ROUTE based code, which shows the routing table of a FreeBSD system. If you are interested, I can show it to you once I get back home tonight. Happy hacking, Debarshi From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 11:51:12 2008 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 3E5B61065670 for ; Tue, 16 Sep 2008 11:51:12 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail5out.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) by mx1.freebsd.org (Postfix) with ESMTP id F20A88FC08 for ; Tue, 16 Sep 2008 11:51:11 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail5out.barnet.com.au (Postfix, from userid 1001) id 386372218824; Tue, 16 Sep 2008 21:34:54 +1000 (EST) X-Viruscan-Id: <48CF99DE00009214757EF3@BarNet> Received: from mail5auth.barnet.com.au (mail5.barnet.com.au [202.83.178.78]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail5auth.barnet.com.au", Issuer "*.barnet.com.au" (verified OK)) by mail5.barnet.com.au (Postfix) with ESMTP id E7EBA21B5938; Tue, 16 Sep 2008 21:34:53 +1000 (EST) Received: from k7.mavetju (ppp121-44-125-22.lns10.syd6.internode.on.net [121.44.125.22]) by mail5auth.barnet.com.au (Postfix) with ESMTP id 8FC0D2218950; Tue, 16 Sep 2008 21:34:53 +1000 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id D874C41D; Tue, 16 Sep 2008 21:34:55 +1000 (EST) Date: Tue, 16 Sep 2008 21:34:55 +1000 From: Edwin Groothuis To: Jordi Espasa Clofent Message-ID: <20080916113455.GA83338@k7.mavetju> References: <48CF930B.4020704@minibofh.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48CF930B.4020704@minibofh.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: Re: Change netmask with /etc/rc.d/network restart or reboot the machine? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 11:51:12 -0000 On Tue, Sep 16, 2008 at 01:05:47PM +0200, Jordi Espasa Clofent wrote: > I've a lot of boxes in production with a lot of associated services > (http, ftp, ssh, smtp, mysql...). > Because of internal administration reasons I need to ampliate my > internal IPs range from /24 to /16; so I need to change my internal NIC > settings. The last goal is make the change with _security_. I prefer a > reboot with thier 2/4 minutes downtime than a odd miss-function in > several production services. > > I tend to think that the use of ifconfig(8) will be enough; of course, > I'll also modify /etc/rc.conf 'ifconfig_' record for posterior > reboots. Or maybe I has more sense to modify directly the /etc/rc.conf > record and next use the '/etc/rc.d/netif restart'; or maybe make the > change in /etc/rc.conf and reboot the machines. > > ?What do you tink about? Like you said, ifconfig is the simplest way to do it. Just make sure your default gateway doesn't need a change neither. Foolproof should be: - Modify /etc/rc.conf - "shutdown -r +3" - "ifconfig nic0 1.2.3.4 netmask 255.255.0.0" - "killall -TERM shutdown" That way even if the ifconfig goes wrong for some reason (it will happen if you do 700 machines) the machine will come back after the reboot. Don't forget about possible ipfw rule changes! Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://www.mavetju.org/weblog/ From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 14:43:27 2008 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 B07F6106566C for ; Tue, 16 Sep 2008 14:43:27 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6AD8FC19 for ; Tue, 16 Sep 2008 14:43:27 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so1496251tid.3 for ; Tue, 16 Sep 2008 07:43:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=HzCFUk3NUavaXNBJZJ3GYqXODzD3zl34MeDu8hf8/78=; b=QVlo/e7DLAyy/6QuK1mZEjqFrp/kySq5ksGkR9Jlgmm+BGSvKQQ+OHu5Tz9bRW4/T/ QulgaMn+AJTxTPlhx74EOaIeb1gV0SJuji+NnfBAw7D/8Mro213Fk5CQib05pYKMtnR0 fw8Mo7u4N8o5APCddzJtGXxiOyE1uV032KzNg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=j8RwA0moS+WshpjJU9kHh9NzkdS8wAWFQHNXkU0P+BIadJLbpWD95OTXl3etNiIqUU LlN7TtaIj7j2+/TUa/cA05MemSJfIuUQt3g23GHjKGbwg/NCmEMUlPFHX+Mrpe8BgDEk li4usAdRjeJrd2APX2Fbm0DNM2tgoPeSEiuaU= Received: by 10.110.47.9 with SMTP id u9mr1482872tiu.42.1221576205614; Tue, 16 Sep 2008 07:43:25 -0700 (PDT) Received: by 10.110.90.11 with HTTP; Tue, 16 Sep 2008 07:43:25 -0700 (PDT) Message-ID: Date: Tue, 16 Sep 2008 22:43:25 +0800 From: "Jian Qiu" To: "Kris Kennaway" In-Reply-To: <48CF6450.6020909@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48CF6450.6020909@FreeBSD.org> Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 14:43:27 -0000 Interesting. I did a test on local UDP throughput. I was surprised to find out the performance with a SMP kernel was worse than UP. (~74MB/s v.s. 96 MB/s). I had though parallel netisr might be a solution. Anyway, thanks for the info. On Tue, Sep 16, 2008 at 3:46 PM, Kris Kennaway wrote: > Jian Qiu wrote: >> >> I noticed there was a project trying to parallelize netisr in SMP. >> >> But I cannot find the relevant codes in either stable 7 or current 8. >> >> I'm wondering what's the current status of this project? >> >> When will it be merged into FreeBSD source tree? > > It's available in a perforce branch owned by rwatson (sorry, I don't have > the branch name handy), but in my tests it either produced no benefits, or > actually reduced performance. This is surprising and the reasons for this > are still unknown. > > Kris > From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 15:29:34 2008 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 3905B1065673 for ; Tue, 16 Sep 2008 15:29:34 +0000 (UTC) (envelope-from nacho319@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id E52F18FC1C for ; Tue, 16 Sep 2008 15:29:33 +0000 (UTC) (envelope-from nacho319@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so823333ywe.13 for ; Tue, 16 Sep 2008 08:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=Wi/NHUqslU4WT3Eah06zjMh9kUnpvTDKB17puN2dtPM=; b=KTLbHeVZ2N2wr7/ZmJsZQZ2yZzO0Te92U1RDnYsa6OySCs5JRVGlq50QfjEdEGzKS3 2D3esEiUHePkdC8vylz35RzGi4Kfb08JWe0zR+DuOiNPICvqlI8i0CcyujAA91/kFPrZ A4MeYEkcVdbpO8ISdtZXz0dHPnbAVM1RnAnOw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=oQH0gjK50FATTELPdLGwWOnfTlYjypXCztMJwP2W/ZLrur2/FoDjaTsmh0+XDIi5AI 1YYvUQ8oxuKi4cd24S6ABer8x6d+xAozvTu37jzdWwh/+DY/u3GZe3k8mI6ll5Wp47yy n2QpLXUAf6ruVyKYzl1kxRrRgPU1UWFbC3Jms= Received: by 10.100.41.15 with SMTP id o15mr1754509ano.48.1221578973066; Tue, 16 Sep 2008 08:29:33 -0700 (PDT) Received: by 10.100.95.14 with HTTP; Tue, 16 Sep 2008 08:29:32 -0700 (PDT) Message-ID: <900019150809160829n7bf785ddn9ee2a86f11174885@mail.gmail.com> Date: Tue, 16 Sep 2008 11:29:32 -0400 From: "Chris Inacio" To: debarshi.ray@gmail.com In-Reply-To: <3170f42f0809160433x78d6637odc58da304cf3e19e@mail.gmail.com> MIME-Version: 1.0 References: <900019150809160401v316682fdt4cf8a95bfcb48dc2@mail.gmail.com> <3170f42f0809160433x78d6637odc58da304cf3e19e@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: help with code to determine external IP address on FreeBSD gateway machine X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 15:29:34 -0000 Debarshi, Yes, I would be interested in seeing the code. I would hope that this task isn't too complicated, but I have my suspicions that it will be a fair number of steps. Thanks, Chris On Tue, Sep 16, 2008 at 7:33 AM, Debarshi Ray wrote: > I have some PF_ROUTE based code, which shows the routing table of a > FreeBSD system. If you are interested, I can show it to you once I get > back home tonight. > > Happy hacking, > Debarshi > From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 18:39:39 2008 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 38E53106567D for ; Tue, 16 Sep 2008 18:39:39 +0000 (UTC) (envelope-from debarshi.ray@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id E60958FC24 for ; Tue, 16 Sep 2008 18:39:38 +0000 (UTC) (envelope-from debarshi.ray@gmail.com) Received: by gxk10 with SMTP id 10so26083870gxk.19 for ; Tue, 16 Sep 2008 11:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=uadegF7zavoHPfpwVwKztz2Btg3n04Qu21j0oq9Xw9Y=; b=HVdQ6OkRabfol4kj02AxlCs9NNsX52zqrRv9TAHKCbiMB85K8LMuNIbB6IZE8sJ6cd tQ/dmkErAdtAMqMN0hdSvQpIc8OYM4yXUvBasMf+6e8B1/XGCn7vDsqV/VCLkhmARbWo jZdqehScbf6OGUFt44lD9tu4XoxCv7+kejzAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=QKLLfDUn8YonuI6NvzjgrxcxajFzi6D/rhV0WNSOs9cMkFqIcZBpIUo3g1R1wRYcLU aXCQrdXHALTPmYtxzBuaMUhL/6RX0eXYq2k0817DNZpYaX5FS4+kLp6vc+q7hiyHU+mo RjbUkbPPceTdoTHw1fXI7JU1eLdXMe/1d1BhA= Received: by 10.187.223.6 with SMTP id a6mr188090far.45.1221590377389; Tue, 16 Sep 2008 11:39:37 -0700 (PDT) Received: by 10.187.245.8 with HTTP; Tue, 16 Sep 2008 11:39:37 -0700 (PDT) Message-ID: <3170f42f0809161139k44b67895id412832aafe0568f@mail.gmail.com> Date: Wed, 17 Sep 2008 00:09:37 +0530 From: "Debarshi Ray" To: "Chris Inacio" In-Reply-To: <900019150809160829n7bf785ddn9ee2a86f11174885@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <900019150809160401v316682fdt4cf8a95bfcb48dc2@mail.gmail.com> <3170f42f0809160433x78d6637odc58da304cf3e19e@mail.gmail.com> <900019150809160829n7bf785ddn9ee2a86f11174885@mail.gmail.com> Cc: freebsd-net@freebsd.org Subject: Re: help with code to determine external IP address on FreeBSD gateway machine X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: debarshi.ray@gmail.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 18:39:39 -0000 Here is the code: http://rishi.fedorapeople.org/gnu/inetutils-1.5.tar.gz You will be interested in route/bsd_show.c and the function in that file named bsd_show. It uses a combination of sysctl and PF_ROUTE to retrieve the information. Please ask if you encounter any problem. :-) Happy hacking, Debarshi From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 18:46:39 2008 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 86A56106567D; Tue, 16 Sep 2008 18:46:39 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal4.es.net [198.124.252.66]) by mx1.freebsd.org (Postfix) with ESMTP id 207FF8FC15; Tue, 16 Sep 2008 18:46:38 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal3.es.net [198.128.3.207]) by postal4.es.net (Postal Node 4) with ESMTP (SSL) id WBA97800; Tue, 16 Sep 2008 11:36:00 -0700 Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal3.es.net (Postal Node 3) with ESMTP (SSL) id WBZ61859; Tue, 16 Sep 2008 11:35:59 -0700 Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 949004500F; Tue, 16 Sep 2008 11:35:59 -0700 (PDT) To: "Jian Qiu" In-Reply-To: Your message of "Tue, 16 Sep 2008 22:43:25 +0800." Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1221590159_63566P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Tue, 16 Sep 2008 11:35:59 -0700 From: "Kevin Oberman" Message-Id: <20080916183559.949004500F@ptavv.es.net> X-Sender-IP: 198.128.3.207 X-Sender-Domain: es.net X-Recipent: ; ; ; X-Sender: X-To_Name: Jian Qiu X-To_Domain: gmail.com X-To: "Jian Qiu" X-To_Email: swordqiu@gmail.com X-To_Alias: swordqiu Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 18:46:39 -0000 --==_Exmh_1221590159_63566P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Tue, 16 Sep 2008 22:43:25 +0800 > From: "Jian Qiu" > Sender: owner-freebsd-net@freebsd.org > > Interesting. > > I did a test on local UDP throughput. > > I was surprised to find out the performance with a SMP kernel was > worse than UP. (~74MB/s v.s. 96 MB/s). Look at CPU affinity. I have seen significant jumps in performance when things switch between CPUs. It's best to lock the UDP cannon to a single CPU and that the CPU not be CPU0. (This applies to both BSD and Linux systems that I have worked with.) -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1221590159_63566P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFIz/yPkn3rs5h7N1ERAsSZAJ9w4+rEVVDIHiE2fCwZCGxgHdG/gwCdFkLm Bwgx02cPR/sE/HF8EOWzD1o= =0lO3 -----END PGP SIGNATURE----- --==_Exmh_1221590159_63566P-- From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 18:55:08 2008 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 38CC6106564A; Tue, 16 Sep 2008 18:55:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id D49FE8FC1C; Tue, 16 Sep 2008 18:55:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 345BA41C67E; Tue, 16 Sep 2008 20:55:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id ygwbixzGLtzj; Tue, 16 Sep 2008 20:55:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id B199241C679; Tue, 16 Sep 2008 20:55:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 891D044487F; Tue, 16 Sep 2008 18:51:05 +0000 (UTC) Date: Tue, 16 Sep 2008 18:51:04 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: freebsd-net@freebsd.org In-Reply-To: <20080824111925.X66593@maildrop.int.zabbadoz.net> Message-ID: <20080916183952.A65801@maildrop.int.zabbadoz.net> References: <20080824111925.X66593@maildrop.int.zabbadoz.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: FreeBSD current mailing list Subject: Re: [CFT/R] IPv4 source address selection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-net@freebsd.org List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 18:55:08 -0000 On Sun, 24 Aug 2008, Bjoern A. Zeeb wrote: Hi, > I have a patch, that was inspired by work from Y!, to do porper > IPv4 source address selection for unbound sockets (with multi-IP > jails). > > You can temporary find it here: > http://people.freebsd.org/~bz/20080823-01-in_pcbladdr.diff > > People running my latest jail patches have been ``testing'' this > without really knowing the last weeks. > > In case you wonder why, in the jail case, I loop over the ifa first > before simply falling back to the primary jail IP (which is the only > jail IP as in HEAD) -- this is because with the upcoming jail patches > I have to check if any of possibly lots of IPs match any IP on an > interface and only if none matches I have to fall back to the 'primary' > jail IP. > So the code has been prepared for upcoming changes already. > > > Feel free to test it and report problems or unexpected behavior. > Unless someone is going to cry it'll hit HEAD in a few days. Okay, there was close to zero feedback:( I had Kris test it performance wise and he found a performance regression and I talked to Robert about the general code a bit more then decided that I can simplify it. After that I re-ran some performance tests myself and found that passing in pointers improves things and now we are at the following with unbound udp sockets: x cvs-plain2 + bz-laddr +------------------------------------------------------------+ |+ + + + x x x + x| | |______________________A_____M________|_______|_A________|| +------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 498932.16 500399.34 499727.93 499724.08 668.35243 + 5 496178.62 500190.01 498391.13 497996.98 1649.8572 No difference proven at 95.0% confidence x cvs-plain2-jailed + bz-laddr-jailed +------------------------------------------------------------+ |x + * + xx + x +| | ||_________________M_AA______M____________|| | +------------------------------------------------------------+ N Min Max Median Avg Stddev x 5 493049.99 499015.59 497250.89 496364.37 2305.2757 + 5 493335.46 499712.52 496067.19 496411.24 2431.479 No difference proven at 95.0% confidence For jails this already has the loops, though I was still trying with a single (extra) IP only. So the latest patch is here: http://people.freebsd.org/~bz/20080831-01-in_pcbladdr.diff I'd really like some review before this goes in especially as it changes the semantics for jails a bit more. I'll probably time out by Sunday (UTC) or so; in case you want to look at it but need more time, let me know and I'll wait. /bz PS: I'll also post an updated jail patch for HEAD with this change in case people want to try that with multi-IP jails. > PS: in case you review this properly (not only glance at it or test > it) let me know so I can punish you in the Reviewed by: line;-) -- Bjoern A. Zeeb Stop bit received. Insert coin for new game. From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 19:27:12 2008 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 23492106567F for ; Tue, 16 Sep 2008 19:27:12 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 888CE8FC2E; Tue, 16 Sep 2008 19:27:11 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48D00899.4070908@FreeBSD.org> Date: Tue, 16 Sep 2008 20:27:21 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Jian Qiu References: <48CF6450.6020909@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 19:27:12 -0000 Jian Qiu wrote: > Interesting. > > I did a test on local UDP throughput. > > I was surprised to find out the performance with a SMP kernel was > worse than UP. (~74MB/s v.s. 96 MB/s). > > I had though parallel netisr might be a solution. Make sure you are testing with either 8.0 or 7.1 (or late 7.0-STABLE), i.e. after the fixes to improve UDP performance on SMP systems. Kris From owner-freebsd-net@FreeBSD.ORG Tue Sep 16 19:49:22 2008 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 CB72D1065672; Tue, 16 Sep 2008 19:49:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4CDF18FC16; Tue, 16 Sep 2008 19:49:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m8GJn1qh096729; Tue, 16 Sep 2008 15:49:15 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Matthias Apitz Date: Tue, 16 Sep 2008 11:25:44 -0400 User-Agent: KMail/1.9.7 References: <20080915110838.GA5258@rebelion.Sisis.de> <200809151608.06738.jhb@freebsd.org> <20080915222414.GA12474@rebelion.Sisis.de> In-Reply-To: <20080915222414.GA12474@rebelion.Sisis.de> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200809161125.45034.jhb@freebsd.org> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Tue, 16 Sep 2008 15:49:16 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8265/Tue Sep 16 15:26:49 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_03_06,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: freebsd-hackers@freebsd.org, bug-followup@freebsd.org, freebsd-net@freebsd.org Subject: Re: kern/122331: panic's on KDE-launches (but only in WPA Wifi area) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Sep 2008 19:49:22 -0000 On Monday 15 September 2008 06:24:14 pm Matthias Apitz wrote: > El d=EDa Monday, September 15, 2008 a las 04:08:06PM -0400, John Baldwin= =20 escribi=F3: >=20 > > > > Can you go to frame 7 in kgdb and 'p *fdp'? > > >=20 > > > (kgdb) frame 7 > > > #7 0xc0788b98 in kern_select (td=3D0xc49d5630, nd=3D9, fd_in=3D0x298= ad840,=20 > > > fd_ou=3D0x298ad9c4, fd_ex=3D0x298adb48, tvp=3D0x0) at filedesc.h:= 136 > > > return (fd < 0 || fd >=3D fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd= ]); > > > (kgdb) p *fdp > > > Variable "fdp" is not available. > > > (kgdb)=20 > >=20 > > If 'td' is available then you can do 'p *td->td_proc->p_fd' >=20 > (kgdb) frame 7 > #7 0xc0788b98 in kern_select (td=3D0xc49d5630, nd=3D9, fd_in=3D0x298ad84= 0,=20 > fd_ou=3D0x298ad9c4, fd_ex=3D0x298adb48, tvp=3D0x0) at filedesc.h:136 > 136 return (fd < 0 || fd >=3D fdp->fd_nfiles ? NULL : > fdp->fd_ofiles[fd]); > (kgdb) p td > $7 =3D (struct thread *) 0xc49d5630 > (kgdb) p *td->td_proc->p_fd > $8 =3D {fd_ofiles =3D 0x0, fd_ofileflags =3D 0x0, fd_cdir =3D 0x0,=20 Well, fd_ofiles being NULL here is really odd. It's also odd that you have= no=20 current directory. Because fd_nfiles is 20, fd_ofiles should be pointing t= o=20 the static file descriptor array. Off the top of my head I don't see how=20 this is happening. It might help if you can narrow down exactly what WPA=20 operation you are doing that causes the panic. =2D-=20 John Baldwin From owner-freebsd-net@FreeBSD.ORG Wed Sep 17 01:12:26 2008 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 3DACC106566B for ; Wed, 17 Sep 2008 01:12:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outI.internet-mail-service.net (outi.internet-mail-service.net [216.240.47.232]) by mx1.freebsd.org (Postfix) with ESMTP id 2044B8FC19 for ; Wed, 17 Sep 2008 01:12:20 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 80152242D; Tue, 16 Sep 2008 18:12:21 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 3A7B62D6013; Tue, 16 Sep 2008 18:12:20 -0700 (PDT) Message-ID: <48D05972.3060509@elischer.org> Date: Tue, 16 Sep 2008 18:12:18 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: freebsd-net@freebsd.org References: <20080824111925.X66593@maildrop.int.zabbadoz.net> <20080916183952.A65801@maildrop.int.zabbadoz.net> In-Reply-To: <20080916183952.A65801@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD current mailing list Subject: Re: [CFT/R] IPv4 source address selection X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 01:12:26 -0000 Bjoern A. Zeeb wrote: > On Sun, 24 Aug 2008, Bjoern A. Zeeb wrote: > > Hi, > >> I have a patch, that was inspired by work from Y!, to do porper >> IPv4 source address selection for unbound sockets (with multi-IP >> jails). >> >> You can temporary find it here: >> http://people.freebsd.org/~bz/20080823-01-in_pcbladdr.diff >> >> People running my latest jail patches have been ``testing'' this >> without really knowing the last weeks. >> >> In case you wonder why, in the jail case, I loop over the ifa first >> before simply falling back to the primary jail IP (which is the only >> jail IP as in HEAD) -- this is because with the upcoming jail patches >> I have to check if any of possibly lots of IPs match any IP on an >> interface and only if none matches I have to fall back to the 'primary' >> jail IP. >> So the code has been prepared for upcoming changes already. >> >> >> Feel free to test it and report problems or unexpected behavior. >> Unless someone is going to cry it'll hit HEAD in a few days. > > Okay, there was close to zero feedback:( sorry I'm flat out, but very interested.. > > I had Kris test it performance wise and he found a performance regression > and I talked to Robert about the general code a bit more then decided > that I can simplify it. After that I re-ran some performance tests > myself and found that passing in pointers improves things and now we are > at the following with unbound udp sockets: > > x cvs-plain2 > + bz-laddr > +------------------------------------------------------------+ > |+ + + + x x x + x| > | |______________________A_____M________|_______|_A________|| > +------------------------------------------------------------+ > N Min Max Median Avg > Stddev > x 5 498932.16 500399.34 499727.93 499724.08 668.35243 > + 5 496178.62 500190.01 498391.13 497996.98 1649.8572 > No difference proven at 95.0% confidence > > x cvs-plain2-jailed > + bz-laddr-jailed > +------------------------------------------------------------+ > |x + * + xx + x +| > | ||_________________M_AA______M____________|| | > +------------------------------------------------------------+ > N Min Max Median Avg > Stddev > x 5 493049.99 499015.59 497250.89 496364.37 2305.2757 > + 5 493335.46 499712.52 496067.19 496411.24 2431.479 > No difference proven at 95.0% confidence > > > For jails this already has the loops, though I was still trying > with a single (extra) IP only. > > So the latest patch is here: > http://people.freebsd.org/~bz/20080831-01-in_pcbladdr.diff > > I'd really like some review before this goes in especially as it > changes the semantics for jails a bit more. I'll probably time out > by Sunday (UTC) or so; in case you want to look at it but need more > time, let me know and I'll wait. > > /bz > > > PS: I'll also post an updated jail patch for HEAD with this change in case > people want to try that with multi-IP jails. > > >> PS: in case you review this properly (not only glance at it or test >> it) let me know so I can punish you in the Reviewed by: line;-) > From owner-freebsd-net@FreeBSD.ORG Wed Sep 17 07:28:03 2008 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 BDCBB1065697; Wed, 17 Sep 2008 07:28:03 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 7E88F8FC18; Wed, 17 Sep 2008 07:27:49 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Wed, 17 Sep 2008 09:27:48 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m8H7RlOK002996; Wed, 17 Sep 2008 09:27:47 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Wed, 17 Sep 2008 09:27:47 +0200 From: Matthias Apitz To: John Baldwin Message-ID: <20080917072747.GA2738@rebelion.Sisis.de> References: <20080915110838.GA5258@rebelion.Sisis.de> <200809151608.06738.jhb@freebsd.org> <20080915222414.GA12474@rebelion.Sisis.de> <200809161125.45034.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <200809161125.45034.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 17 Sep 2008 07:27:48.0305 (UTC) FILETIME=[E29FBC10:01C91896] Cc: freebsd-hackers@freebsd.org, bug-followup@freebsd.org, freebsd-net@freebsd.org Subject: Re: kern/122331: panic's on KDE-launches (but only in WPA Wifi area) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 07:28:03 -0000 El día Tuesday, September 16, 2008 a las 11:25:44AM -0400, John Baldwin escribió: > Well, fd_ofiles being NULL here is really odd. It's also odd that you have no > current directory. Because fd_nfiles is 20, fd_ofiles should be pointing to > the static file descriptor array. Off the top of my head I don't see how > this is happening. It might help if you can narrow down exactly what WPA > operation you are doing that causes the panic. I'm doing nothing by my own with WPA; the wpa_supplicant is launched at boot time via /etc/rc.conf entry as: ifconfig_iwi0="WPA" i.e. in the moment when I launch the X11+KDE with 'startx' is already running, iwi0 is associated with the AP and IP/routing is up in the interface (I've checked this always with 'ifconfig iwi0'); the difference between my home and the office is WEP (at home where I don't face that problem) and WPA in the office; yesterday and today morning KDE booted fine without causing this panic; could the reason be some inconsistency in the file system? but in this case as well I don't know where this could come from; I have always clean shutdowns before moving from my home to the office: matthias -- Matthias Apitz A computer is like an air conditioner, it stops working when you open Windows Una computadora es como aire acondicionado, deja de funcionar si abres Windows From owner-freebsd-net@FreeBSD.ORG Wed Sep 17 19:02:49 2008 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 BF38C106569A; Wed, 17 Sep 2008 19:02:49 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id DEB358FC0C; Wed, 17 Sep 2008 19:02:48 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 442AC1C7187; Wed, 17 Sep 2008 23:02:36 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1146221066; Wed, 17 Sep 2008 23:02:35 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m8HJ2Zcv002984; Wed, 17 Sep 2008 23:02:35 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m8HJ2UiT002983; Wed, 17 Sep 2008 23:02:30 +0400 (MSD) (envelope-from root) Date: Wed, 17 Sep 2008 23:02:30 +0400 From: Chagin Dmitry To: freebsd-emulation@freebsd.org, freebsd-net@freebsd.org Message-ID: <20080917190230.GA2947@dchagin.dialup.corbina.ru> Mail-Followup-To: freebsd-emulation@freebsd.org, freebsd-net@freebsd.org References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080917183801.GA2714@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i Cc: Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 19:02:49 -0000 On Wed, Sep 17, 2008 at 10:38:01PM +0400, Chagin Dmitry wrote: > > Please review, any comment will be helpful. > thnx! > ups... I have lost a new file, the previous patch is incorrect. sorry. diff --git a/src/sys/amd64/linux32/linux.h b/src/sys/amd64/linux32/linux.h index 8940289..9439900 100644 --- a/src/sys/amd64/linux32/linux.h +++ b/src/sys/amd64/linux32/linux.h @@ -685,6 +685,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 @@ -709,6 +710,28 @@ struct l_sockaddr { char sa_data[14]; } __packed; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +} __packed; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +} __packed; + +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +} __packed; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; diff --git a/src/sys/amd64/linux32/linux32_io.h b/src/sys/amd64/linux32/linux32_io.h new file mode 100644 index 0000000..c1a9f1c --- /dev/null +++ b/src/sys/amd64/linux32/linux32_io.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2004 Tim J. Robbins + * Copyright (c) 2001 Doug Rabson + * Copyright (c) 1994-1996 Søren Schmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _AMD64_LINUX32_IO_H_ +#define _AMD64_LINUX32_IO_H_ + + +struct iovec32 { + u_int32_t iov_base; + int iov_len; +}; + +CTASSERT(sizeof(struct iovec32) == 8); + +int linux32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, + int error); + +#endif /* !_AMD64_LINUX32_IO_H_ */ diff --git a/src/sys/amd64/linux32/linux32_machdep.c b/src/sys/amd64/linux32/linux32_machdep.c index 32cbe0b..26459c9 100644 --- a/src/sys/amd64/linux32/linux32_machdep.c +++ b/src/sys/amd64/linux32/linux32_machdep.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.49 2008/09/08 09 #include #include +#include #include #include #include @@ -232,13 +233,6 @@ linux_execve(struct thread *td, struct linux_execve_args *args) return (error); } -struct iovec32 { - u_int32_t iov_base; - int iov_len; -}; - -CTASSERT(sizeof(struct iovec32) == 8); - static int linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) { @@ -281,6 +275,34 @@ linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) } int +linux32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, + int error) +{ + struct iovec32 iov32; + struct iovec *iov; + u_int iovlen; + int i; + + *iovp = NULL; + if (iovcnt > UIO_MAXIOV) + return (error); + iovlen = iovcnt * sizeof(struct iovec); + iov = malloc(iovlen, M_IOV, M_WAITOK); + for (i = 0; i < iovcnt; i++) { + error = copyin(&iovp32[i], &iov32, sizeof(struct iovec32)); + if (error) { + free(iov, M_IOV); + return (error); + } + iov[i].iov_base = PTRIN(iov32.iov_base); + iov[i].iov_len = iov32.iov_len; + } + *iovp = iov; + return(0); + +} + +int linux_readv(struct thread *td, struct linux_readv_args *uap) { struct uio *auio; diff --git a/src/sys/compat/linux/linux_socket.c b/src/sys/compat/linux/linux_socket.c index f97aa23..34e25dc 100644 --- a/src/sys/compat/linux/linux_socket.c +++ b/src/sys/compat/linux/linux_socket.c @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.76 2008/09/09 13:01: #ifdef COMPAT_LINUX32 #include +#include #include #else #include @@ -294,6 +295,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); + case LINUX_SO_PASSCRED: + return (LOCAL_CREDS); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: @@ -421,6 +424,63 @@ linux_sa_put(struct osockaddr *osa) } static int +linux_to_bsd_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case LINUX_SCM_RIGHTS: + return (SCM_RIGHTS); + case LINUX_SCM_CREDENTIALS: + return (SCM_CREDS); + } + return (cmsg_type); +} + +static int +bsd_to_linux_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case SCM_RIGHTS: + return (LINUX_SCM_RIGHTS); + case SCM_CREDS: + return (LINUX_SCM_CREDENTIALS); + } + return (cmsg_type); +} + + + +static int +linux_to_bsd_msghdr(struct msghdr *bhdr, const struct l_msghdr *lhdr) +{ + if (lhdr->msg_controllen > INT_MAX) + return (ENOBUFS); + + bhdr->msg_name = PTRIN(lhdr->msg_name); + bhdr->msg_namelen = lhdr->msg_namelen; + bhdr->msg_iov = PTRIN(lhdr->msg_iov); + bhdr->msg_iovlen = lhdr->msg_iovlen; + bhdr->msg_control = PTRIN(lhdr->msg_control); + bhdr->msg_controllen = lhdr->msg_controllen; + bhdr->msg_flags = linux_to_bsd_msg_flags(lhdr->msg_flags); + return (0); +} + +static int +bsd_to_linux_msghdr(const struct msghdr *bhdr, struct l_msghdr *lhdr) +{ + lhdr->msg_name = PTROUT(bhdr->msg_name); + lhdr->msg_namelen = bhdr->msg_namelen; + lhdr->msg_iov = PTROUT(bhdr->msg_iov); + lhdr->msg_iovlen = bhdr->msg_iovlen; + lhdr->msg_control = PTROUT(bhdr->msg_control); + lhdr->msg_controllen = bhdr->msg_controllen; + /* msg_flags skipped */ + return (0); +} + +static int linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, enum uio_seg segflg) { @@ -437,25 +497,57 @@ linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, to = NULL; if (mp->msg_control != NULL) { + struct l_cmsghdr *ptr_cmsg; + struct l_cmsghdr linux_cmsg; struct cmsghdr *cmsg; - - if (mp->msg_controllen < sizeof(struct cmsghdr)) { - error = EINVAL; - goto bad; - } - error = sockargs(&control, mp->msg_control, - mp->msg_controllen, MT_CONTROL); - if (error) - goto bad; - - cmsg = mtod(control, struct cmsghdr *); - cmsg->cmsg_level = linux_to_bsd_sockopt_level(cmsg->cmsg_level); + void *data; + socklen_t datalen; + + cmsg = malloc(CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + control = m_get(M_WAIT, MT_CONTROL); + ptr_cmsg = LINUX_CMSG_FIRSTHDR(mp); + + do { + error = copyin(ptr_cmsg, &linux_cmsg, + sizeof(struct l_cmsghdr)); + if (error) + goto bad; + if (linux_cmsg.cmsg_len < sizeof(struct l_cmsghdr) || + linux_cmsg.cmsg_len > INT_MAX) { + error = EINVAL; + goto bad; + } + + switch (linux_cmsg.cmsg_type) { + case LINUX_SCM_RIGHTS: + cmsg->cmsg_type = + linux_to_bsd_cmsg_type(linux_cmsg.cmsg_type); + break; + default: + error = EINVAL; + goto bad; + } + cmsg->cmsg_level = + linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); + + datalen = linux_cmsg.cmsg_len - L_CMSG_HDRSZ; + cmsg->cmsg_len = CMSG_LEN(datalen); + data = LINUX_CMSG_DATA(ptr_cmsg); + + error = ENOBUFS; + if (!m_append(control, CMSG_HDRSZ, (c_caddr_t) cmsg)) + goto bad; + if (!m_append(control, datalen, (c_caddr_t) data)) + goto bad; + + } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(mp, ptr_cmsg))); + + free(cmsg, M_TEMP); } else control = NULL; error = kern_sendit(td, s, mp, linux_to_bsd_msg_flags(flags), control, segflg); - bad: if (to) FREE(to, M_SONAME); @@ -960,12 +1052,14 @@ static int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) { struct msghdr msg; + struct l_msghdr linux_msg; struct iovec *iov; int error; - /* XXXTJR sendmsg is broken on amd64 */ - - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); + error = linux_to_bsd_msghdr(&msg, &linux_msg); if (error) return (error); @@ -978,9 +1072,13 @@ linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) */ if (msg.msg_control != NULL && msg.msg_controllen == 0) msg.msg_control = NULL; + +#if defined(__amd64__) && defined(COMPAT_LINUX32) + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); - if (error) - return (error); +#endif msg.msg_iov = iov; msg.msg_flags = 0; error = linux_sendit(td, args->s, &msg, args->flags, UIO_USERSPACE); @@ -997,44 +1095,168 @@ struct linux_recvmsg_args { static int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args) { - struct recvmsg_args /* { - int s; - struct msghdr *msg; - int flags; - } */ bsd_args; struct msghdr msg; - struct cmsghdr *cmsg; + struct l_msghdr linux_msg; + struct l_cmsghdr *linux_cmsg = NULL; + struct iovec *iov, *uiov; + struct mbuf *control = NULL; + struct mbuf **controlp; int error; - /* XXXTJR recvmsg is broken on amd64 */ + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); - if ((error = copyin(PTRIN(args->msg), &msg, sizeof (msg)))) + error = linux_to_bsd_msghdr(&msg, &linux_msg); + if (error) return (error); - bsd_args.s = args->s; - bsd_args.msg = PTRIN(args->msg); - bsd_args.flags = linux_to_bsd_msg_flags(args->flags); - if (msg.msg_name) { - linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, - msg.msg_namelen); - error = recvmsg(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)msg.msg_name); - } else - error = recvmsg(td, &bsd_args); +#if defined(__amd64__) && defined(COMPAT_LINUX32) + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else + error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); +#endif if (error) return (error); - if (bsd_args.msg->msg_control != NULL && - bsd_args.msg->msg_controllen > 0) { - cmsg = (struct cmsghdr*)bsd_args.msg->msg_control; - cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level); + if (msg.msg_name) { + error = linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, + msg.msg_namelen); + if (error) + goto bad; } - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + uiov = msg.msg_iov; + msg.msg_iov = iov; + controlp = (msg.msg_control != NULL) ? &control : NULL; + error = kern_recvit(td, args->s, &msg, UIO_USERSPACE, controlp); + msg.msg_iov = uiov; if (error) - return (error); - if (msg.msg_name && msg.msg_namelen > 2) - error = linux_sa_put(msg.msg_name); + goto bad; + + error = bsd_to_linux_msghdr(&msg, &linux_msg); + if (error) + goto bad; + + if (linux_msg.msg_name) { + error = bsd_to_linux_sockaddr((struct sockaddr *) + PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + if (linux_msg.msg_name && linux_msg.msg_namelen > 2) { + error = linux_sa_put(PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + + if (control) { + caddr_t outbuf; + struct cmsghdr *cm; + socklen_t datalen, outlen; + socklen_t clen; + void *data; + struct sockcred *scred; + struct l_ucred lcred; + + linux_cmsg = malloc(L_CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + outbuf = PTRIN(linux_msg.msg_control); + cm = mtod(control, struct cmsghdr *); + outlen = 0; + clen = control->m_len; + + while (cm != NULL) { + + switch (cm->cmsg_type) { + case SCM_CREDS: + + scred = (struct sockcred *)CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - + (caddr_t)scred; + + if (outlen + LINUX_CMSG_LEN(sizeof(lcred)) > + linux_msg.msg_controllen) { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + + lcred.pid = -1; + lcred.uid = scred->sc_uid; + lcred.gid = scred->sc_gid; + + linux_cmsg->cmsg_len = + LINUX_CMSG_LEN(sizeof(lcred)); + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(&lcred, outbuf, sizeof(lcred)); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(sizeof(lcred)); + outlen += LINUX_CMSG_LEN(sizeof(lcred)); + linux_msg.msg_controllen = outlen; + break; + + default: + + data = CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; + + if (outlen + LINUX_CMSG_LEN(datalen) > + linux_msg.msg_controllen) { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + + linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen); + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(data, outbuf, datalen); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(datalen); + outlen += LINUX_CMSG_LEN(datalen); + linux_msg.msg_controllen = outlen; + break; + } + + if (CMSG_SPACE(datalen) < clen) { + clen -= CMSG_SPACE(datalen); + cm = (struct cmsghdr *) + ((caddr_t)cm + CMSG_SPACE(datalen)); + } else + cm = NULL; + } + } + +out: + error = copyout(&linux_msg, PTRIN(args->msg), sizeof(linux_msg)); + +bad: + free(iov, M_IOV); + if (control != NULL) + m_freem(control); + if (linux_cmsg != NULL) + free(linux_cmsg, M_TEMP); + return (error); } @@ -1081,6 +1303,12 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + /* FreeBSD bug? socket level opts at non socket level */ + bsd_args.level = 0; + break; + } break; case IPPROTO_IP: name = linux_to_bsd_ip_sockopt(args->optname); @@ -1136,6 +1364,11 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + bsd_args.level = 0; + break; + } break; case IPPROTO_IP: name = linux_to_bsd_ip_sockopt(args->optname); diff --git a/src/sys/compat/linux/linux_socket.h b/src/sys/compat/linux/linux_socket.h index 074e8e0..e8c2ec8 100644 --- a/src/sys/compat/linux/linux_socket.h +++ b/src/sys/compat/linux/linux_socket.h @@ -49,4 +49,36 @@ #define LINUX_MSG_ERRQUEUE 0x2000 #define LINUX_MSG_NOSIGNAL 0x4000 +/* Socket-level control message types */ + +#define LINUX_SCM_RIGHTS 0x01 +#define LINUX_SCM_CREDENTIALS 0x02 + +/* Ancilliary data object information macros */ + +#define LINUX_CMSG_ALIGN(len) (((len) + sizeof(l_long)-1) & ~(sizeof(l_long)-1)) +#define LINUX_CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)))) +#define LINUX_CMSG_SPACE(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + LINUX_CMSG_ALIGN(len)) +#define LINUX_CMSG_LEN(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + (len)) +#define LINUX_CMSG_FIRSTHDR(msg) \ + ((msg)->msg_controllen >= \ + sizeof(struct l_cmsghdr) ? \ + (struct l_cmsghdr *)((msg)->msg_control) : \ + (struct l_cmsghdr *)(NULL)) +#define LINUX_CMSG_NXTHDR(msg, cmsg) \ + ((((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \ + sizeof(*(cmsg))) > \ + (((char *)(msg)->msg_control) + \ + (msg)->msg_controllen)) ? \ + (struct l_cmsghdr *) NULL : \ + (struct l_cmsghdr *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len))) + +#define CMSG_HDRSZ CMSG_LEN(0) +#define L_CMSG_HDRSZ LINUX_CMSG_LEN(0) + #endif /* _LINUX_SOCKET_H_ */ diff --git a/src/sys/i386/linux/linux.h b/src/sys/i386/linux/linux.h index 1c3627d..28655fe 100644 --- a/src/sys/i386/linux/linux.h +++ b/src/sys/i386/linux/linux.h @@ -656,6 +656,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 @@ -680,6 +681,28 @@ struct l_sockaddr { char sa_data[14]; }; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +}; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +}; + +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +}; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; -- Have fun! chd From owner-freebsd-net@FreeBSD.ORG Wed Sep 17 19:08:23 2008 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 8657A1065671 for ; Wed, 17 Sep 2008 19:08:23 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id B23C78FC12 for ; Wed, 17 Sep 2008 19:08:22 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 84FC51C249A; Wed, 17 Sep 2008 22:38:07 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1146127590; Wed, 17 Sep 2008 22:38:07 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.2/8.14.2) with ESMTP id m8HIc6pO002798; Wed, 17 Sep 2008 22:38:06 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.2/8.14.2/Submit) id m8HIc1TU002797; Wed, 17 Sep 2008 22:38:01 +0400 (MSD) (envelope-from root) Date: Wed, 17 Sep 2008 22:38:01 +0400 From: Chagin Dmitry To: freebsd-emulation@freebsd.org Message-ID: <20080917183801.GA2714@dchagin.dialup.corbina.ru> Mail-Followup-To: freebsd-emulation@freebsd.org, freebsd-net@freebsd.org References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080902085623.GA12395@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org Subject: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 19:08:23 -0000 On Tue, Sep 02, 2008 at 10:56:23AM +0200, Roman Divacky wrote: > On Sun, Aug 31, 2008 at 03:06:10PM +0400, Chagin Dmitry wrote: > > On Fri, Aug 22, 2008 at 01:29:46PM +0200, Roman Divacky wrote: > > > On Fri, Aug 22, 2008 at 01:29:27PM +0200, Ed Schouten wrote: > > > > Hello Emulation folks, > > > > > > > > I just wanted to send you all a message to say one of the things I tried > > > > to improve in the MPSAFE TTY branch was support for PTY's for Linux > > > > binaries. > > > > > > > > At home I've got a FreeBSD Jail running Debian Etch. Unfortunately, > > > > Linux sendmsg() is a little broken on FreeBSD/amd64, but so far I've > > > > been able to at least get OpenSSH (as root) and GNU Screen working. > > > > > > I believe dmitry has a patch for this.. > > > > the patch is bellow, I tested a patch only on LTP tests (with little changes), > > it's necessary to test on real apps, it will be good if Ed will test.. > > this should be reviewed by someone with a knowledge of how networking works in > FreeBSD. Any volunteer? Dmitry, can you send a mail to net@ describing the changes > in the patch and ask for a review there? > Hi, So, a patch bellow. The patch corrects sendmsg() recvmsg() in our linuxulator, also adds SO_PASSCRED option to linuxulator setsockopt() getsockopt() it's necessary for implementing Linux analogue of FreeBSD SCM_CREDS control message. I have tested it on i386 && ia32@amd64 linuxulators, it works for me now. Please review, any comment will be helpful. thnx! diff --git a/src/sys/amd64/linux32/linux.h b/src/sys/amd64/linux32/linux.h index 8940289..9439900 100644 --- a/src/sys/amd64/linux32/linux.h +++ b/src/sys/amd64/linux32/linux.h @@ -685,6 +685,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 @@ -709,6 +710,28 @@ struct l_sockaddr { char sa_data[14]; } __packed; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +} __packed; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +} __packed; + +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +} __packed; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; diff --git a/src/sys/amd64/linux32/linux32_machdep.c b/src/sys/amd64/linux32/linux32_machdep.c index 32cbe0b..26459c9 100644 --- a/src/sys/amd64/linux32/linux32_machdep.c +++ b/src/sys/amd64/linux32/linux32_machdep.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.49 2008/09/08 09 #include #include +#include #include #include #include @@ -232,13 +233,6 @@ linux_execve(struct thread *td, struct linux_execve_args *args) return (error); } -struct iovec32 { - u_int32_t iov_base; - int iov_len; -}; - -CTASSERT(sizeof(struct iovec32) == 8); - static int linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) { @@ -281,6 +275,34 @@ linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) } int +linux32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, + int error) +{ + struct iovec32 iov32; + struct iovec *iov; + u_int iovlen; + int i; + + *iovp = NULL; + if (iovcnt > UIO_MAXIOV) + return (error); + iovlen = iovcnt * sizeof(struct iovec); + iov = malloc(iovlen, M_IOV, M_WAITOK); + for (i = 0; i < iovcnt; i++) { + error = copyin(&iovp32[i], &iov32, sizeof(struct iovec32)); + if (error) { + free(iov, M_IOV); + return (error); + } + iov[i].iov_base = PTRIN(iov32.iov_base); + iov[i].iov_len = iov32.iov_len; + } + *iovp = iov; + return(0); + +} + +int linux_readv(struct thread *td, struct linux_readv_args *uap) { struct uio *auio; diff --git a/src/sys/compat/linux/linux_socket.c b/src/sys/compat/linux/linux_socket.c index f97aa23..34e25dc 100644 --- a/src/sys/compat/linux/linux_socket.c +++ b/src/sys/compat/linux/linux_socket.c @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.76 2008/09/09 13:01: #ifdef COMPAT_LINUX32 #include +#include #include #else #include @@ -294,6 +295,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); + case LINUX_SO_PASSCRED: + return (LOCAL_CREDS); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: @@ -421,6 +424,63 @@ linux_sa_put(struct osockaddr *osa) } static int +linux_to_bsd_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case LINUX_SCM_RIGHTS: + return (SCM_RIGHTS); + case LINUX_SCM_CREDENTIALS: + return (SCM_CREDS); + } + return (cmsg_type); +} + +static int +bsd_to_linux_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case SCM_RIGHTS: + return (LINUX_SCM_RIGHTS); + case SCM_CREDS: + return (LINUX_SCM_CREDENTIALS); + } + return (cmsg_type); +} + + + +static int +linux_to_bsd_msghdr(struct msghdr *bhdr, const struct l_msghdr *lhdr) +{ + if (lhdr->msg_controllen > INT_MAX) + return (ENOBUFS); + + bhdr->msg_name = PTRIN(lhdr->msg_name); + bhdr->msg_namelen = lhdr->msg_namelen; + bhdr->msg_iov = PTRIN(lhdr->msg_iov); + bhdr->msg_iovlen = lhdr->msg_iovlen; + bhdr->msg_control = PTRIN(lhdr->msg_control); + bhdr->msg_controllen = lhdr->msg_controllen; + bhdr->msg_flags = linux_to_bsd_msg_flags(lhdr->msg_flags); + return (0); +} + +static int +bsd_to_linux_msghdr(const struct msghdr *bhdr, struct l_msghdr *lhdr) +{ + lhdr->msg_name = PTROUT(bhdr->msg_name); + lhdr->msg_namelen = bhdr->msg_namelen; + lhdr->msg_iov = PTROUT(bhdr->msg_iov); + lhdr->msg_iovlen = bhdr->msg_iovlen; + lhdr->msg_control = PTROUT(bhdr->msg_control); + lhdr->msg_controllen = bhdr->msg_controllen; + /* msg_flags skipped */ + return (0); +} + +static int linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, enum uio_seg segflg) { @@ -437,25 +497,57 @@ linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, to = NULL; if (mp->msg_control != NULL) { + struct l_cmsghdr *ptr_cmsg; + struct l_cmsghdr linux_cmsg; struct cmsghdr *cmsg; - - if (mp->msg_controllen < sizeof(struct cmsghdr)) { - error = EINVAL; - goto bad; - } - error = sockargs(&control, mp->msg_control, - mp->msg_controllen, MT_CONTROL); - if (error) - goto bad; - - cmsg = mtod(control, struct cmsghdr *); - cmsg->cmsg_level = linux_to_bsd_sockopt_level(cmsg->cmsg_level); + void *data; + socklen_t datalen; + + cmsg = malloc(CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + control = m_get(M_WAIT, MT_CONTROL); + ptr_cmsg = LINUX_CMSG_FIRSTHDR(mp); + + do { + error = copyin(ptr_cmsg, &linux_cmsg, + sizeof(struct l_cmsghdr)); + if (error) + goto bad; + if (linux_cmsg.cmsg_len < sizeof(struct l_cmsghdr) || + linux_cmsg.cmsg_len > INT_MAX) { + error = EINVAL; + goto bad; + } + + switch (linux_cmsg.cmsg_type) { + case LINUX_SCM_RIGHTS: + cmsg->cmsg_type = + linux_to_bsd_cmsg_type(linux_cmsg.cmsg_type); + break; + default: + error = EINVAL; + goto bad; + } + cmsg->cmsg_level = + linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); + + datalen = linux_cmsg.cmsg_len - L_CMSG_HDRSZ; + cmsg->cmsg_len = CMSG_LEN(datalen); + data = LINUX_CMSG_DATA(ptr_cmsg); + + error = ENOBUFS; + if (!m_append(control, CMSG_HDRSZ, (c_caddr_t) cmsg)) + goto bad; + if (!m_append(control, datalen, (c_caddr_t) data)) + goto bad; + + } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(mp, ptr_cmsg))); + + free(cmsg, M_TEMP); } else control = NULL; error = kern_sendit(td, s, mp, linux_to_bsd_msg_flags(flags), control, segflg); - bad: if (to) FREE(to, M_SONAME); @@ -960,12 +1052,14 @@ static int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) { struct msghdr msg; + struct l_msghdr linux_msg; struct iovec *iov; int error; - /* XXXTJR sendmsg is broken on amd64 */ - - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); + error = linux_to_bsd_msghdr(&msg, &linux_msg); if (error) return (error); @@ -978,9 +1072,13 @@ linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) */ if (msg.msg_control != NULL && msg.msg_controllen == 0) msg.msg_control = NULL; + +#if defined(__amd64__) && defined(COMPAT_LINUX32) + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); - if (error) - return (error); +#endif msg.msg_iov = iov; msg.msg_flags = 0; error = linux_sendit(td, args->s, &msg, args->flags, UIO_USERSPACE); @@ -997,44 +1095,168 @@ struct linux_recvmsg_args { static int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args) { - struct recvmsg_args /* { - int s; - struct msghdr *msg; - int flags; - } */ bsd_args; struct msghdr msg; - struct cmsghdr *cmsg; + struct l_msghdr linux_msg; + struct l_cmsghdr *linux_cmsg = NULL; + struct iovec *iov, *uiov; + struct mbuf *control = NULL; + struct mbuf **controlp; int error; - /* XXXTJR recvmsg is broken on amd64 */ + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); - if ((error = copyin(PTRIN(args->msg), &msg, sizeof (msg)))) + error = linux_to_bsd_msghdr(&msg, &linux_msg); + if (error) return (error); - bsd_args.s = args->s; - bsd_args.msg = PTRIN(args->msg); - bsd_args.flags = linux_to_bsd_msg_flags(args->flags); - if (msg.msg_name) { - linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, - msg.msg_namelen); - error = recvmsg(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)msg.msg_name); - } else - error = recvmsg(td, &bsd_args); +#if defined(__amd64__) && defined(COMPAT_LINUX32) + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else + error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); +#endif if (error) return (error); - if (bsd_args.msg->msg_control != NULL && - bsd_args.msg->msg_controllen > 0) { - cmsg = (struct cmsghdr*)bsd_args.msg->msg_control; - cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level); + if (msg.msg_name) { + error = linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, + msg.msg_namelen); + if (error) + goto bad; } - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + uiov = msg.msg_iov; + msg.msg_iov = iov; + controlp = (msg.msg_control != NULL) ? &control : NULL; + error = kern_recvit(td, args->s, &msg, UIO_USERSPACE, controlp); + msg.msg_iov = uiov; if (error) - return (error); - if (msg.msg_name && msg.msg_namelen > 2) - error = linux_sa_put(msg.msg_name); + goto bad; + + error = bsd_to_linux_msghdr(&msg, &linux_msg); + if (error) + goto bad; + + if (linux_msg.msg_name) { + error = bsd_to_linux_sockaddr((struct sockaddr *) + PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + if (linux_msg.msg_name && linux_msg.msg_namelen > 2) { + error = linux_sa_put(PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + + if (control) { + caddr_t outbuf; + struct cmsghdr *cm; + socklen_t datalen, outlen; + socklen_t clen; + void *data; + struct sockcred *scred; + struct l_ucred lcred; + + linux_cmsg = malloc(L_CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + outbuf = PTRIN(linux_msg.msg_control); + cm = mtod(control, struct cmsghdr *); + outlen = 0; + clen = control->m_len; + + while (cm != NULL) { + + switch (cm->cmsg_type) { + case SCM_CREDS: + + scred = (struct sockcred *)CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - + (caddr_t)scred; + + if (outlen + LINUX_CMSG_LEN(sizeof(lcred)) > + linux_msg.msg_controllen) { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + + lcred.pid = -1; + lcred.uid = scred->sc_uid; + lcred.gid = scred->sc_gid; + + linux_cmsg->cmsg_len = + LINUX_CMSG_LEN(sizeof(lcred)); + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(&lcred, outbuf, sizeof(lcred)); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(sizeof(lcred)); + outlen += LINUX_CMSG_LEN(sizeof(lcred)); + linux_msg.msg_controllen = outlen; + break; + + default: + + data = CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; + + if (outlen + LINUX_CMSG_LEN(datalen) > + linux_msg.msg_controllen) { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + + linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen); + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(data, outbuf, datalen); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(datalen); + outlen += LINUX_CMSG_LEN(datalen); + linux_msg.msg_controllen = outlen; + break; + } + + if (CMSG_SPACE(datalen) < clen) { + clen -= CMSG_SPACE(datalen); + cm = (struct cmsghdr *) + ((caddr_t)cm + CMSG_SPACE(datalen)); + } else + cm = NULL; + } + } + +out: + error = copyout(&linux_msg, PTRIN(args->msg), sizeof(linux_msg)); + +bad: + free(iov, M_IOV); + if (control != NULL) + m_freem(control); + if (linux_cmsg != NULL) + free(linux_cmsg, M_TEMP); + return (error); } @@ -1081,6 +1303,12 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + /* FreeBSD bug? socket level opts at non socket level */ + bsd_args.level = 0; + break; + } break; case IPPROTO_IP: name = linux_to_bsd_ip_sockopt(args->optname); @@ -1136,6 +1364,11 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + bsd_args.level = 0; + break; + } break; case IPPROTO_IP: name = linux_to_bsd_ip_sockopt(args->optname); diff --git a/src/sys/compat/linux/linux_socket.h b/src/sys/compat/linux/linux_socket.h index 074e8e0..e8c2ec8 100644 --- a/src/sys/compat/linux/linux_socket.h +++ b/src/sys/compat/linux/linux_socket.h @@ -49,4 +49,36 @@ #define LINUX_MSG_ERRQUEUE 0x2000 #define LINUX_MSG_NOSIGNAL 0x4000 +/* Socket-level control message types */ + +#define LINUX_SCM_RIGHTS 0x01 +#define LINUX_SCM_CREDENTIALS 0x02 + +/* Ancilliary data object information macros */ + +#define LINUX_CMSG_ALIGN(len) (((len) + sizeof(l_long)-1) & ~(sizeof(l_long)-1)) +#define LINUX_CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)))) +#define LINUX_CMSG_SPACE(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + LINUX_CMSG_ALIGN(len)) +#define LINUX_CMSG_LEN(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + (len)) +#define LINUX_CMSG_FIRSTHDR(msg) \ + ((msg)->msg_controllen >= \ + sizeof(struct l_cmsghdr) ? \ + (struct l_cmsghdr *)((msg)->msg_control) : \ + (struct l_cmsghdr *)(NULL)) +#define LINUX_CMSG_NXTHDR(msg, cmsg) \ + ((((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \ + sizeof(*(cmsg))) > \ + (((char *)(msg)->msg_control) + \ + (msg)->msg_controllen)) ? \ + (struct l_cmsghdr *) NULL : \ + (struct l_cmsghdr *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len))) + +#define CMSG_HDRSZ CMSG_LEN(0) +#define L_CMSG_HDRSZ LINUX_CMSG_LEN(0) + #endif /* _LINUX_SOCKET_H_ */ diff --git a/src/sys/i386/linux/linux.h b/src/sys/i386/linux/linux.h index 1c3627d..28655fe 100644 --- a/src/sys/i386/linux/linux.h +++ b/src/sys/i386/linux/linux.h @@ -656,6 +656,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 @@ -680,6 +681,28 @@ struct l_sockaddr { char sa_data[14]; }; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +}; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +}; + +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +}; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; -- Have fun! chd From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 04:00:12 2008 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 30821106568C for ; Thu, 18 Sep 2008 04:00:12 +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 1B2C08FC08 for ; Thu, 18 Sep 2008 04:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8I40Bov049537 for ; Thu, 18 Sep 2008 04:00:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8I40BbM049536; Thu, 18 Sep 2008 04:00:11 GMT (envelope-from gnats) Date: Thu, 18 Sep 2008 04:00:11 GMT Message-Id: <200809180400.m8I40BbM049536@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: =?koi8-r?Q?=EC=CF=D4=C3_=E1=CE=D4=CF=CE_?= =?koi8-r?Q?=F7=CC=C1=C4=C9=CD=C9=D2=CF=D7=C9=DE?= Cc: Subject: Re: kern/122794: [lagg] Kernel panic after brings lagg(8) up if NICs are not bringed up before X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: =?koi8-r?Q?=EC=CF=D4=C3_=E1=CE=D4=CF=CE_?= =?koi8-r?Q?=F7=CC=C1=C4=C9=CD=C9=D2=CF=D7=C9=DE?= List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 04:00:12 -0000 The following reply was made to PR kern/122794; it has been noted by GNATS. From: =?koi8-r?Q?=EC=CF=D4=C3_=E1=CE=D4=CF=CE_?= =?koi8-r?Q?=F7=CC=C1=C4=C9=CD=C9=D2=CF=D7=C9=DE?= To: bug-followup@FreeBSD.org, robhass@gmail.com Cc: Subject: Re: kern/122794: [lagg] Kernel panic after brings lagg(8) up if NICs are not bringed up before Date: Thu, 18 Sep 2008 09:08:56 +0600 --=-pYK/Vjp63XwXQm/bEEhQ Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello I have found similar problem: kernel panic occurs if you try to use lagg interface without any laggport configured. Is this the same problem? There are at least two way to reproduce problem: 1. Boot to single-user mode and issue commands ifconfig lagg0 create ifconfig lagg0 laggproto loadbalance # does it really need to crash? ifconfig lagg0 inet 10.10.10.10 netmask 255.255.255.0 Kernel panic follows (possible need to send a packet) Fatal trap 18: integer divide fault while in kernel mode cpuid = 0; apic id = 00 instruction pointer = 0x20:0x80441f38 stack pointer = 0x28:0xec046988 frame pointer = 0x28:0xec04699c code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 57 (ifconfig) trap number = 18 panic: integer divide fault cpuid = 0 Uptime: 3m5s Cannot dump. No dump device defined. Automatic reboot in 15 seconds - press a key on the console to abort 2. Boot to any network-enabled mode and remove all laggport from the lagg interface. Kernel panic follows (possible need to send a packet). ifconfig lagg0 -laggport bce0 ping 10.10.10.11 Fatal trap 18: integer divide fault while in kernel mode cpuid = 0; apic id = 00 instruction pointer = 0x20:0x80441f38 stack pointer = 0x28:0xec0a19ec frame pointer = 0x28:0xec0a1a00 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, def32 1, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 52383 (ping) trap number = 18 panic: integer divide fault cpuid = 0 Uptime: 13m53s Physical memory: 4086 MB Dumping 128 MB: 113 97 81 65 49 33 17 1 Dump complete Automatic reboot in 15 seconds - press a key on the console to abort Possible solution could be following: *** if_lagg.c-orig Thu Sep 18 08:29:25 2008 --- if_lagg.c Thu Sep 18 08:32:39 2008 *************** *** 1403,1408 **** --- 1403,1412 ---- uint32_t p; p = atomic_fetchadd_32(&sc->sc_seq, 1); + if (sc->sc_count == 0) { + m_freem(m); + return (ENOENT); + } p %= sc->sc_count; lp = SLIST_FIRST(&sc->sc_ports); while (p--) *************** *** 1580,1585 **** --- 1584,1593 ---- int idx; p = lagg_hashmbuf(m, lb->lb_key); + if (sc->sc_count == 0) { + m_freem(m); + return (ENOENT); + } if ((idx = p % sc->sc_count) >= LAGG_MAX_PORTS) { m_freem(m); return (EINVAL); I'm not a qualified kernel-hacker so please provide a better solution. Regards -- Anton Lotts --=-pYK/Vjp63XwXQm/bEEhQ Content-Disposition: attachment; filename=lagg.patch Content-Type: text/x-patch; name=lagg.patch; charset=utf-8 Content-Transfer-Encoding: 7bit *** if_lagg.c-orig Thu Sep 18 08:29:25 2008 --- if_lagg.c Thu Sep 18 08:32:39 2008 *************** *** 1403,1408 **** --- 1403,1412 ---- uint32_t p; p = atomic_fetchadd_32(&sc->sc_seq, 1); + if (sc->sc_count == 0) { + m_freem(m); + return (ENOENT); + } p %= sc->sc_count; lp = SLIST_FIRST(&sc->sc_ports); while (p--) *************** *** 1580,1585 **** --- 1584,1593 ---- int idx; p = lagg_hashmbuf(m, lb->lb_key); + if (sc->sc_count == 0) { + m_freem(m); + return (ENOENT); + } if ((idx = p % sc->sc_count) >= LAGG_MAX_PORTS) { m_freem(m); return (EINVAL); --=-pYK/Vjp63XwXQm/bEEhQ-- From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 04:15:52 2008 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 1EB911065676; Thu, 18 Sep 2008 04:15:52 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E95318FC22; Thu, 18 Sep 2008 04:15:51 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from freefall.freebsd.org (thompsa@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8I4Fpwt051446; Thu, 18 Sep 2008 04:15:51 GMT (envelope-from thompsa@freefall.freebsd.org) Received: (from thompsa@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8I4FpdM051442; Thu, 18 Sep 2008 04:15:51 GMT (envelope-from thompsa) Date: Thu, 18 Sep 2008 04:15:51 GMT Message-Id: <200809180415.m8I4FpdM051442@freefall.freebsd.org> To: robhass@gmail.com, thompsa@FreeBSD.org, freebsd-net@FreeBSD.org From: thompsa@FreeBSD.org Cc: Subject: Re: kern/122794: [lagg] Kernel panic after brings lagg(8) up if NICs are not bringed up before X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 04:15:52 -0000 Synopsis: [lagg] Kernel panic after brings lagg(8) up if NICs are not bringed up before State-Changed-From-To: feedback->patched State-Changed-By: thompsa State-Changed-When: Thu Sep 18 04:14:56 UTC 2008 State-Changed-Why: This has been fixed in r183135, please update. I missed this PR, sorry for the delay. http://www.freebsd.org/cgi/query-pr.cgi?pr=122794 From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 04:20:04 2008 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 3C43B106566B for ; Thu, 18 Sep 2008 04:20:04 +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 2C0818FC1A for ; Thu, 18 Sep 2008 04:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m8I4K40b051547 for ; Thu, 18 Sep 2008 04:20:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m8I4K4sZ051546; Thu, 18 Sep 2008 04:20:04 GMT (envelope-from gnats) Date: Thu, 18 Sep 2008 04:20:04 GMT Message-Id: <200809180420.m8I4K4sZ051546@freefall.freebsd.org> To: freebsd-net@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: kern/122794: 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: Thu, 18 Sep 2008 04:20:04 -0000 The following reply was made to PR kern/122794; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/122794: commit references a PR Date: Thu, 18 Sep 2008 04:14:43 +0000 (UTC) thompsa 2008-09-18 04:14:28 UTC FreeBSD src repository Modified files: sys/net if_lagg.c Log: SVN rev 183135 on 2008-09-18 04:14:28Z by thompsa Make sure there is at least one port to avoid divide by zero when choosing the tx port. PR: kern/122794 MFC after: 3 days Revision Changes Path 1.29 +2 -1 src/sys/net/if_lagg.c _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 07:56:12 2008 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 A66471065672 for ; Thu, 18 Sep 2008 07:56:12 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 592178FC16 for ; Thu, 18 Sep 2008 07:56:07 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p5DC5F32C.dip.t-dialin.net [93.197.243.44]) by redbull.bpaserver.net (Postfix) with ESMTP id 9EA322E1F9; Thu, 18 Sep 2008 09:38:34 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 101AF155369; Thu, 18 Sep 2008 09:38:32 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m8I7cVhC026284; Thu, 18 Sep 2008 09:38:31 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Thu, 18 Sep 2008 09:38:31 +0200 Message-ID: <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Thu, 18 Sep 2008 09:38:31 +0200 From: "Alexander Leidinger" To: "Chagin Dmitry" References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> <20080917190230.GA2947@dchagin.dialup.corbina.ru> In-Reply-To: <20080917190230.GA2947@dchagin.dialup.corbina.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.2) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: 9EA322E1F9.2187C X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.7, required 6, BAYES_00 -15.00, MR_NOT_ATTRIBUTED_IP 0.20, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: freebsd-net@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 07:56:12 -0000 Quoting "Chagin Dmitry" (from Wed, 17 Sep 2008 =20 23:02:30 +0400): > On Wed, Sep 17, 2008 at 10:38:01PM +0400, Chagin Dmitry wrote: >> >> Please review, any comment will be helpful. I did just a very quick look... > @@ -978,9 +1072,13 @@ linux_sendmsg(struct thread *td, struct =20 > linux_sendmsg_args *args) > =09 */ > =09if (msg.msg_control !=3D NULL && msg.msg_controllen =3D=3D 0) > =09=09msg.msg_control =3D NULL; > + > +#if defined(__amd64__) && defined(COMPAT_LINUX32) > +=09error =3D linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, > +=09 &iov, EMSGSIZE); > +#else > =09error =3D copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); > -=09if (error) > -=09=09return (error); > +#endif > =09msg.msg_iov =3D iov; > =09msg.msg_flags =3D 0; > =09error =3D linux_sendit(td, args->s, &msg, args->flags, UIO_USERSPACE); You've lost the error handling in the conditional. Bye, Alexander. --=20 BOFH excuse #266: All of the packets are empty http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 08:01:47 2008 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 90A15106567F for ; Thu, 18 Sep 2008 08:01:47 +0000 (UTC) (envelope-from debarshi.ray@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 1AD328FC27 for ; Thu, 18 Sep 2008 08:01:46 +0000 (UTC) (envelope-from debarshi.ray@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so145594fgb.35 for ; Thu, 18 Sep 2008 01:01:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=pTye+AbrLhqqH1Wfq2L6VOIROJCI4Fxp9UU6plG0o8k=; b=gVcN9GuquP4tiky8GwNdVKAWzN7YAW1ELxCEEbk4Rd5FqSKYsOAlBXcrcUh1XlVKTj cEwG5ZVceOL8x3mLIOMR2tToLZ/fHtAYk0r3RzoPugnd6LBY0eMToRZETS2JrlhMpQ3i BYTjXy6a4lNDjiDCW9qDnV1rgy5StgkZkVbjU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references; b=hAea6zQWNqTZMgWRISj7yyhuyzq76Swhr3MV86XwkAnhtX1Zv2hFz7fokC1R79BaKK fh0tUjgaM5smEY0+lgxA6fzdBMdCaeMiUQvQJ32lvr6CdR7a1J+44xBVLiun2hVRew5Y 0/F8ofYSnXwF6aZcv/IYmVX7SYVIxz54Scnsw= Received: by 10.187.212.1 with SMTP id o1mr490666faq.30.1221724905623; Thu, 18 Sep 2008 01:01:45 -0700 (PDT) Received: by 10.187.245.8 with HTTP; Thu, 18 Sep 2008 01:01:45 -0700 (PDT) Message-ID: <3170f42f0809180101w57e1d4c1m1bfcef00200e6b52@mail.gmail.com> Date: Thu, 18 Sep 2008 13:31:45 +0530 From: "Debarshi Ray" To: "FreeBSD networking and TCP/IP list" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3170f42f0809010507q6c37a9d5q19649bc261d7656d@mail.gmail.com> <48BBE7B2.4050409@FreeBSD.org> <48BCE4AA.6050807@elischer.org> <3170f42f0809020017k643180efte155a5b5701a40cf@mail.gmail.com> Cc: Robert Watson , "Bruce M. Simpson" , Julian Elischer Subject: Re: reading routing table X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: debarshi.ray@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, 18 Sep 2008 08:01:47 -0000 So I got something working for FreeBSD now: http://rishi.fedorapeople.org/gnu/inetutils-1.5.tar.gz I have been using a combination of sysctl and PF_ROUTE to retrieve the routing table, much like the approach taken by the NetBSD implementation. Support for modifying the routing table is yet to be implemented. Thanks for all your comments. By the way, would you want someone to implement 'show' support for FreeBSD's route implementation? I can give it a go now. :-) Happy hacking, Debarshi From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 13:57:45 2008 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 7DEA21065673; Thu, 18 Sep 2008 13:57:45 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 744498FC1C; Thu, 18 Sep 2008 13:57:44 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 566E91C8D7D; Thu, 18 Sep 2008 17:57:42 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1151971826; Thu, 18 Sep 2008 17:57:41 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.3/8.14.2) with ESMTP id m8IDvfcF002234; Thu, 18 Sep 2008 17:57:41 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.3/8.14.2/Submit) id m8IDvarD002233; Thu, 18 Sep 2008 17:57:36 +0400 (MSD) (envelope-from root) Date: Thu, 18 Sep 2008 17:57:36 +0400 From: Chagin Dmitry To: Alexander Leidinger Message-ID: <20080918135736.GA2218@dchagin.dialup.corbina.ru> Mail-Followup-To: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-net@freebsd.org References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> <20080917190230.GA2947@dchagin.dialup.corbina.ru> <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-net@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 13:57:45 -0000 On Thu, Sep 18, 2008 at 09:38:31AM +0200, Alexander Leidinger wrote: > Quoting "Chagin Dmitry" (from Wed, 17 Sep 2008 > 23:02:30 +0400): > > >On Wed, Sep 17, 2008 at 10:38:01PM +0400, Chagin Dmitry wrote: > >> > >>Please review, any comment will be helpful. > > I did just a very quick look... > > >@@ -978,9 +1072,13 @@ linux_sendmsg(struct thread *td, struct > >linux_sendmsg_args *args) > > */ > > if (msg.msg_control != NULL && msg.msg_controllen == 0) > > msg.msg_control = NULL; > >+ > >+#if defined(__amd64__) && defined(COMPAT_LINUX32) > >+ error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, > >+ &iov, EMSGSIZE); > >+#else > > error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); > >- if (error) > >- return (error); > >+#endif > > msg.msg_iov = iov; > > msg.msg_flags = 0; > > error = linux_sendit(td, args->s, &msg, args->flags, UIO_USERSPACE); > > You've lost the error handling in the conditional. > It's accepted, thnx! diff --git a/src/sys/amd64/linux32/linux.h b/src/sys/amd64/linux32/linux.h index 8940289..9439900 100644 --- a/src/sys/amd64/linux32/linux.h +++ b/src/sys/amd64/linux32/linux.h @@ -685,6 +685,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 @@ -709,6 +710,28 @@ struct l_sockaddr { char sa_data[14]; } __packed; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +} __packed; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +} __packed; + +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +} __packed; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; diff --git a/src/sys/amd64/linux32/linux32_io.h b/src/sys/amd64/linux32/linux32_io.h new file mode 100644 index 0000000..c1a9f1c --- /dev/null +++ b/src/sys/amd64/linux32/linux32_io.h @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2004 Tim J. Robbins + * Copyright (c) 2001 Doug Rabson + * Copyright (c) 1994-1996 Søren Schmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _AMD64_LINUX32_IO_H_ +#define _AMD64_LINUX32_IO_H_ + + +struct iovec32 { + u_int32_t iov_base; + int iov_len; +}; + +CTASSERT(sizeof(struct iovec32) == 8); + +int linux32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, + int error); + +#endif /* !_AMD64_LINUX32_IO_H_ */ diff --git a/src/sys/amd64/linux32/linux32_machdep.c b/src/sys/amd64/linux32/linux32_machdep.c index 32cbe0b..26459c9 100644 --- a/src/sys/amd64/linux32/linux32_machdep.c +++ b/src/sys/amd64/linux32/linux32_machdep.c @@ -65,6 +65,7 @@ __FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.49 2008/09/08 09 #include #include +#include #include #include #include @@ -232,13 +233,6 @@ linux_execve(struct thread *td, struct linux_execve_args *args) return (error); } -struct iovec32 { - u_int32_t iov_base; - int iov_len; -}; - -CTASSERT(sizeof(struct iovec32) == 8); - static int linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) { @@ -281,6 +275,34 @@ linux32_copyinuio(struct iovec32 *iovp, u_int iovcnt, struct uio **uiop) } int +linux32_copyiniov(struct iovec32 *iovp32, u_int iovcnt, struct iovec **iovp, + int error) +{ + struct iovec32 iov32; + struct iovec *iov; + u_int iovlen; + int i; + + *iovp = NULL; + if (iovcnt > UIO_MAXIOV) + return (error); + iovlen = iovcnt * sizeof(struct iovec); + iov = malloc(iovlen, M_IOV, M_WAITOK); + for (i = 0; i < iovcnt; i++) { + error = copyin(&iovp32[i], &iov32, sizeof(struct iovec32)); + if (error) { + free(iov, M_IOV); + return (error); + } + iov[i].iov_base = PTRIN(iov32.iov_base); + iov[i].iov_len = iov32.iov_len; + } + *iovp = iov; + return(0); + +} + +int linux_readv(struct thread *td, struct linux_readv_args *uap) { struct uio *auio; diff --git a/src/sys/compat/linux/linux_socket.c b/src/sys/compat/linux/linux_socket.c index f97aa23..634389d 100644 --- a/src/sys/compat/linux/linux_socket.c +++ b/src/sys/compat/linux/linux_socket.c @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.76 2008/09/09 13:01: #ifdef COMPAT_LINUX32 #include +#include #include #else #include @@ -294,6 +295,8 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); + case LINUX_SO_PASSCRED: + return (LOCAL_CREDS); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: @@ -414,9 +417,64 @@ linux_sa_put(struct osockaddr *osa) sa.sa_family = bdom; error = copyout(&sa, osa, sizeof(sa.sa_family)); - if (error) - return (error); + return (error); +} + +static int +linux_to_bsd_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case LINUX_SCM_RIGHTS: + return (SCM_RIGHTS); + case LINUX_SCM_CREDENTIALS: + return (SCM_CREDS); + } + return (cmsg_type); +} + +static int +bsd_to_linux_cmsg_type(int cmsg_type) +{ + + switch (cmsg_type) { + case SCM_RIGHTS: + return (LINUX_SCM_RIGHTS); + case SCM_CREDS: + return (LINUX_SCM_CREDENTIALS); + } + return (cmsg_type); +} + + + +static int +linux_to_bsd_msghdr(struct msghdr *bhdr, const struct l_msghdr *lhdr) +{ + if (lhdr->msg_controllen > INT_MAX) + return (ENOBUFS); + + bhdr->msg_name = PTRIN(lhdr->msg_name); + bhdr->msg_namelen = lhdr->msg_namelen; + bhdr->msg_iov = PTRIN(lhdr->msg_iov); + bhdr->msg_iovlen = lhdr->msg_iovlen; + bhdr->msg_control = PTRIN(lhdr->msg_control); + bhdr->msg_controllen = lhdr->msg_controllen; + bhdr->msg_flags = linux_to_bsd_msg_flags(lhdr->msg_flags); + return (0); +} + +static int +bsd_to_linux_msghdr(const struct msghdr *bhdr, struct l_msghdr *lhdr) +{ + lhdr->msg_name = PTROUT(bhdr->msg_name); + lhdr->msg_namelen = bhdr->msg_namelen; + lhdr->msg_iov = PTROUT(bhdr->msg_iov); + lhdr->msg_iovlen = bhdr->msg_iovlen; + lhdr->msg_control = PTROUT(bhdr->msg_control); + lhdr->msg_controllen = bhdr->msg_controllen; + /* msg_flags skipped */ return (0); } @@ -437,25 +495,57 @@ linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags, to = NULL; if (mp->msg_control != NULL) { + struct l_cmsghdr *ptr_cmsg; + struct l_cmsghdr linux_cmsg; struct cmsghdr *cmsg; - - if (mp->msg_controllen < sizeof(struct cmsghdr)) { - error = EINVAL; - goto bad; - } - error = sockargs(&control, mp->msg_control, - mp->msg_controllen, MT_CONTROL); - if (error) - goto bad; - - cmsg = mtod(control, struct cmsghdr *); - cmsg->cmsg_level = linux_to_bsd_sockopt_level(cmsg->cmsg_level); + void *data; + socklen_t datalen; + + cmsg = malloc(CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + control = m_get(M_WAIT, MT_CONTROL); + ptr_cmsg = LINUX_CMSG_FIRSTHDR(mp); + + do { + error = copyin(ptr_cmsg, &linux_cmsg, + sizeof(struct l_cmsghdr)); + if (error) + goto bad; + if (linux_cmsg.cmsg_len < sizeof(struct l_cmsghdr) || + linux_cmsg.cmsg_len > INT_MAX) { + error = EINVAL; + goto bad; + } + + switch (linux_cmsg.cmsg_type) { + case LINUX_SCM_RIGHTS: + cmsg->cmsg_type = + linux_to_bsd_cmsg_type(linux_cmsg.cmsg_type); + break; + default: + error = EINVAL; + goto bad; + } + cmsg->cmsg_level = + linux_to_bsd_sockopt_level(linux_cmsg.cmsg_level); + + datalen = linux_cmsg.cmsg_len - L_CMSG_HDRSZ; + cmsg->cmsg_len = CMSG_LEN(datalen); + data = LINUX_CMSG_DATA(ptr_cmsg); + + error = ENOBUFS; + if (!m_append(control, CMSG_HDRSZ, (c_caddr_t) cmsg)) + goto bad; + if (!m_append(control, datalen, (c_caddr_t) data)) + goto bad; + + } while ((ptr_cmsg = LINUX_CMSG_NXTHDR(mp, ptr_cmsg))); + + free(cmsg, M_TEMP); } else control = NULL; error = kern_sendit(td, s, mp, linux_to_bsd_msg_flags(flags), control, segflg); - bad: if (to) FREE(to, M_SONAME); @@ -960,12 +1050,14 @@ static int linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) { struct msghdr msg; + struct l_msghdr linux_msg; struct iovec *iov; int error; - /* XXXTJR sendmsg is broken on amd64 */ - - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); + error = linux_to_bsd_msghdr(&msg, &linux_msg); if (error) return (error); @@ -978,7 +1070,13 @@ linux_sendmsg(struct thread *td, struct linux_sendmsg_args *args) */ if (msg.msg_control != NULL && msg.msg_controllen == 0) msg.msg_control = NULL; + +#if defined(__amd64__) && defined(COMPAT_LINUX32) + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); +#endif if (error) return (error); msg.msg_iov = iov; @@ -997,44 +1095,168 @@ struct linux_recvmsg_args { static int linux_recvmsg(struct thread *td, struct linux_recvmsg_args *args) { - struct recvmsg_args /* { - int s; - struct msghdr *msg; - int flags; - } */ bsd_args; struct msghdr msg; - struct cmsghdr *cmsg; + struct l_msghdr linux_msg; + struct l_cmsghdr *linux_cmsg = NULL; + struct iovec *iov, *uiov; + struct mbuf *control = NULL; + struct mbuf **controlp; int error; - /* XXXTJR recvmsg is broken on amd64 */ + error = copyin(PTRIN(args->msg), &linux_msg, sizeof(linux_msg)); + if (error) + return (error); - if ((error = copyin(PTRIN(args->msg), &msg, sizeof (msg)))) + error = linux_to_bsd_msghdr(&msg, &linux_msg); + if (error) return (error); - bsd_args.s = args->s; - bsd_args.msg = PTRIN(args->msg); - bsd_args.flags = linux_to_bsd_msg_flags(args->flags); - if (msg.msg_name) { - linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, - msg.msg_namelen); - error = recvmsg(td, &bsd_args); - bsd_to_linux_sockaddr((struct sockaddr *)msg.msg_name); - } else - error = recvmsg(td, &bsd_args); +#if defined(__amd64__) && defined(COMPAT_LINUX32) + error = linux32_copyiniov(PTRIN(msg.msg_iov), msg.msg_iovlen, + &iov, EMSGSIZE); +#else + error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE); +#endif if (error) return (error); - if (bsd_args.msg->msg_control != NULL && - bsd_args.msg->msg_controllen > 0) { - cmsg = (struct cmsghdr*)bsd_args.msg->msg_control; - cmsg->cmsg_level = bsd_to_linux_sockopt_level(cmsg->cmsg_level); + if (msg.msg_name) { + error = linux_to_bsd_sockaddr((struct sockaddr *)msg.msg_name, + msg.msg_namelen); + if (error) + goto bad; } - error = copyin(PTRIN(args->msg), &msg, sizeof(msg)); + uiov = msg.msg_iov; + msg.msg_iov = iov; + controlp = (msg.msg_control != NULL) ? &control : NULL; + error = kern_recvit(td, args->s, &msg, UIO_USERSPACE, controlp); + msg.msg_iov = uiov; if (error) - return (error); - if (msg.msg_name && msg.msg_namelen > 2) - error = linux_sa_put(msg.msg_name); + goto bad; + + error = bsd_to_linux_msghdr(&msg, &linux_msg); + if (error) + goto bad; + + if (linux_msg.msg_name) { + error = bsd_to_linux_sockaddr((struct sockaddr *) + PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + if (linux_msg.msg_name && linux_msg.msg_namelen > 2) { + error = linux_sa_put(PTRIN(linux_msg.msg_name)); + if (error) + goto bad; + } + + if (control) { + caddr_t outbuf; + struct cmsghdr *cm; + socklen_t datalen, outlen; + socklen_t clen; + void *data; + struct sockcred *scred; + struct l_ucred lcred; + + linux_cmsg = malloc(L_CMSG_HDRSZ, M_TEMP, M_WAITOK | M_ZERO); + outbuf = PTRIN(linux_msg.msg_control); + cm = mtod(control, struct cmsghdr *); + outlen = 0; + clen = control->m_len; + + while (cm != NULL) { + + switch (cm->cmsg_type) { + case SCM_CREDS: + + scred = (struct sockcred *)CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - + (caddr_t)scred; + + if (outlen + LINUX_CMSG_LEN(sizeof(lcred)) > + linux_msg.msg_controllen) { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + + lcred.pid = -1; + lcred.uid = scred->sc_uid; + lcred.gid = scred->sc_gid; + + linux_cmsg->cmsg_len = + LINUX_CMSG_LEN(sizeof(lcred)); + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(&lcred, outbuf, sizeof(lcred)); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(sizeof(lcred)); + outlen += LINUX_CMSG_LEN(sizeof(lcred)); + linux_msg.msg_controllen = outlen; + break; + + default: + + data = CMSG_DATA(cm); + datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; + + if (outlen + LINUX_CMSG_LEN(datalen) > + linux_msg.msg_controllen) { + linux_msg.msg_flags |= LINUX_MSG_CTRUNC; + goto out; + } + + linux_cmsg->cmsg_len = LINUX_CMSG_LEN(datalen); + linux_cmsg->cmsg_type = + bsd_to_linux_cmsg_type(cm->cmsg_type); + linux_cmsg->cmsg_level = + bsd_to_linux_sockopt_level(cm->cmsg_level); + + error = copyout(linux_cmsg, outbuf, L_CMSG_HDRSZ); + if (error) + goto bad; + outbuf += L_CMSG_HDRSZ; + + error = copyout(data, outbuf, datalen); + if (error) + goto bad; + + outbuf += LINUX_CMSG_ALIGN(datalen); + outlen += LINUX_CMSG_LEN(datalen); + linux_msg.msg_controllen = outlen; + break; + } + + if (CMSG_SPACE(datalen) < clen) { + clen -= CMSG_SPACE(datalen); + cm = (struct cmsghdr *) + ((caddr_t)cm + CMSG_SPACE(datalen)); + } else + cm = NULL; + } + } + +out: + error = copyout(&linux_msg, PTRIN(args->msg), sizeof(linux_msg)); + +bad: + free(iov, M_IOV); + if (control != NULL) + m_freem(control); + if (linux_cmsg != NULL) + free(linux_cmsg, M_TEMP); + return (error); } @@ -1081,6 +1303,12 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + /* FreeBSD bug? socket level opts at non socket level */ + bsd_args.level = 0; + break; + } break; case IPPROTO_IP: name = linux_to_bsd_ip_sockopt(args->optname); @@ -1136,6 +1364,11 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); + switch (args->optname) { + case LINUX_SO_PASSCRED: + bsd_args.level = 0; + break; + } break; case IPPROTO_IP: name = linux_to_bsd_ip_sockopt(args->optname); diff --git a/src/sys/compat/linux/linux_socket.h b/src/sys/compat/linux/linux_socket.h index 074e8e0..e8c2ec8 100644 --- a/src/sys/compat/linux/linux_socket.h +++ b/src/sys/compat/linux/linux_socket.h @@ -49,4 +49,36 @@ #define LINUX_MSG_ERRQUEUE 0x2000 #define LINUX_MSG_NOSIGNAL 0x4000 +/* Socket-level control message types */ + +#define LINUX_SCM_RIGHTS 0x01 +#define LINUX_SCM_CREDENTIALS 0x02 + +/* Ancilliary data object information macros */ + +#define LINUX_CMSG_ALIGN(len) (((len) + sizeof(l_long)-1) & ~(sizeof(l_long)-1)) +#define LINUX_CMSG_DATA(cmsg) ((void *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)))) +#define LINUX_CMSG_SPACE(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + LINUX_CMSG_ALIGN(len)) +#define LINUX_CMSG_LEN(len) (LINUX_CMSG_ALIGN(sizeof(struct l_cmsghdr)) + \ + (len)) +#define LINUX_CMSG_FIRSTHDR(msg) \ + ((msg)->msg_controllen >= \ + sizeof(struct l_cmsghdr) ? \ + (struct l_cmsghdr *)((msg)->msg_control) : \ + (struct l_cmsghdr *)(NULL)) +#define LINUX_CMSG_NXTHDR(msg, cmsg) \ + ((((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \ + sizeof(*(cmsg))) > \ + (((char *)(msg)->msg_control) + \ + (msg)->msg_controllen)) ? \ + (struct l_cmsghdr *) NULL : \ + (struct l_cmsghdr *)((char *)(cmsg) + \ + LINUX_CMSG_ALIGN((cmsg)->cmsg_len))) + +#define CMSG_HDRSZ CMSG_LEN(0) +#define L_CMSG_HDRSZ LINUX_CMSG_LEN(0) + #endif /* _LINUX_SOCKET_H_ */ diff --git a/src/sys/i386/linux/linux.h b/src/sys/i386/linux/linux.h index 1c3627d..28655fe 100644 --- a/src/sys/i386/linux/linux.h +++ b/src/sys/i386/linux/linux.h @@ -656,6 +656,7 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 +#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 @@ -680,6 +681,28 @@ struct l_sockaddr { char sa_data[14]; }; +struct l_msghdr { + l_uintptr_t msg_name; + l_int msg_namelen; + l_uintptr_t msg_iov; + l_size_t msg_iovlen; + l_uintptr_t msg_control; + l_size_t msg_controllen; + l_uint msg_flags; +}; + +struct l_cmsghdr { + l_size_t cmsg_len; + l_int cmsg_level; + l_int cmsg_type; +}; + +struct l_ucred { + uint32_t pid; + uint32_t uid; + uint32_t gid; +}; + struct l_ifmap { l_ulong mem_start; l_ulong mem_end; -- Have fun! chd From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 14:25:08 2008 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 38C2A106566C; Thu, 18 Sep 2008 14:25:08 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id CC6908FC1B; Thu, 18 Sep 2008 14:25:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KgKRN-000FK1-Hf; Thu, 18 Sep 2008 17:25:05 +0300 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 m8IEOtwI081317 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Sep 2008 17:24:55 +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.2/8.14.2) with ESMTP id m8IEOtN1060761; Thu, 18 Sep 2008 17:24:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m8IEOsh5060760; Thu, 18 Sep 2008 17:24:54 +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: Thu, 18 Sep 2008 17:24:54 +0300 From: Kostik Belousov To: Chagin Dmitry Message-ID: <20080918142454.GK39652@deviant.kiev.zoral.com.ua> References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> <20080917190230.GA2947@dchagin.dialup.corbina.ru> <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> <20080918135736.GA2218@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="GI1PA4Sghwo1XriW" Content-Disposition: inline In-Reply-To: <20080918135736.GA2218@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KgKRN-000FK1-Hf 707a1ba57d10f4d91fd3391f30716154 X-Terabit: YES Cc: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-net@freebsd.org Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 14:25:08 -0000 --GI1PA4Sghwo1XriW Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 18, 2008 at 05:57:36PM +0400, Chagin Dmitry wrote: > diff --git a/src/sys/amd64/linux32/linux32_io.h b/src/sys/amd64/linux32/l= inux32_io.h > new file mode 100644 > index 0000000..c1a9f1c > --- /dev/null > +++ b/src/sys/amd64/linux32/linux32_io.h > @@ -0,0 +1,47 @@ > +/*- > + * Copyright (c) 2004 Tim J. Robbins > + * Copyright (c) 2001 Doug Rabson > + * Copyright (c) 1994-1996 S=F8ren Schmidt > + * All rights reserved. ^^^^^^^^^^ Is this true ? Coloring this further, do we need a new include file for one structure and one function ? P.S. Your MUA sets Mail-Followup-To: to the full list of the recipients _except_ you. Is this intentional ? --GI1PA4Sghwo1XriW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjSZLYACgkQC3+MBN1Mb4iElgCffmg0+jVngqsTCVCCjBnEwLSH nBEAoJ50iCUamcYuPGT4x3zZ6RPPXxX1 =RALa -----END PGP SIGNATURE----- --GI1PA4Sghwo1XriW-- From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 14:50:12 2008 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 6F4B21065674 for ; Thu, 18 Sep 2008 14:50:12 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id EB2638FC28 for ; Thu, 18 Sep 2008 14:50:11 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so2076505tid.3 for ; Thu, 18 Sep 2008 07:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=4K2RJnHaORuy6LDkqYbVuWJfxR5Wz13hvO0xWj3+n8w=; b=B/41ZtAfKkmrorhY+4PmyltQ+sYaFKccOfu/1Z1aVJGkjR0XSm/Y8m91rcX6YSeLwS b9o/8M5854wq/hpz7veQ2GmHaENVC6atJAnr18IDkBt9g4fs5i37RJvNCtaKC6K3ixfk k/qrtFdHraKSSov0qnDwTEAP3EXMT9eM+aDbs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=jiLec3cHoEwoBYIo15MQwt/tEelvzy+xRG/t+lzdQbyw4wErvEByvoGMfeGmAloDLj 4H0uHcJA2PNcUHG+uUPP7esfYPCYCFhV4GAo1tqq070lVOxLgWtY/UtDMKBkcYwiP+Yo deiqxhWvwPJmLqxAWix5m5VWOonkDsBggHD8g= Received: by 10.110.90.9 with SMTP id n9mr3581806tib.22.1221749410594; Thu, 18 Sep 2008 07:50:10 -0700 (PDT) Received: by 10.110.90.11 with HTTP; Thu, 18 Sep 2008 07:50:10 -0700 (PDT) Message-ID: Date: Thu, 18 Sep 2008 22:50:10 +0800 From: "Jian Qiu" To: "Kris Kennaway" In-Reply-To: <48D00899.4070908@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48CF6450.6020909@FreeBSD.org> <48D00899.4070908@FreeBSD.org> Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 14:50:12 -0000 Thanks again for the info. As you suggested, I did test on the most recent 7.0-stable-200807 kernel. The SMP throughout on the new kernel was improved to around 90MB/s. However, SMP kernel still had no advantage over UP, at least for this kind of single threaded applications. I further did the same test on Linux with both SMP and UP. I did observe the same trend. The throughput on UP (~210MB/ecs) was also much better than SMP (~170MB/sec). However, I was surprised again that the local UDP throughput on Linux was more than double of FreeBSD. Since all these tests were performed on the same machine, it must be because of the kernel that made such big differences. I'm curious what is the major performance bottleneck in FreeBSD network stack?? Is there any plan in community to address these issues? Many thanks. Jian On Wed, Sep 17, 2008 at 3:27 AM, Kris Kennaway wrote: > Jian Qiu wrote: >> >> Interesting. >> >> I did a test on local UDP throughput. >> >> I was surprised to find out the performance with a SMP kernel was >> worse than UP. (~74MB/s v.s. 96 MB/s). >> >> I had though parallel netisr might be a solution. > > Make sure you are testing with either 8.0 or 7.1 (or late 7.0-STABLE), i.e. > after the fixes to improve UDP performance on SMP systems. > > Kris > > From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 15:08:07 2008 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 7B1B51065670; Thu, 18 Sep 2008 15:08:07 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id 253408FC20; Thu, 18 Sep 2008 15:08:06 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id 58E261CA1EC; Thu, 18 Sep 2008 19:08:05 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1152420961; Thu, 18 Sep 2008 19:08:05 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.3/8.14.2) with ESMTP id m8IF85dP002981; Thu, 18 Sep 2008 19:08:05 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.3/8.14.2/Submit) id m8IF7x4a002980; Thu, 18 Sep 2008 19:07:59 +0400 (MSD) (envelope-from root) Date: Thu, 18 Sep 2008 19:07:59 +0400 From: Chagin Dmitry To: Kostik Belousov Message-ID: <20080918150759.GA2898@dchagin.dialup.corbina.ru> Mail-Followup-To: Kostik Belousov , Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-net@freebsd.org References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> <20080917190230.GA2947@dchagin.dialup.corbina.ru> <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> <20080918135736.GA2218@dchagin.dialup.corbina.ru> <20080918142454.GK39652@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080918142454.GK39652@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-net@freebsd.org Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 15:08:07 -0000 On Thu, Sep 18, 2008 at 05:24:54PM +0300, Kostik Belousov wrote: > On Thu, Sep 18, 2008 at 05:57:36PM +0400, Chagin Dmitry wrote: > > diff --git a/src/sys/amd64/linux32/linux32_io.h b/src/sys/amd64/linux32/linux32_io.h > > new file mode 100644 > > index 0000000..c1a9f1c > > --- /dev/null > > +++ b/src/sys/amd64/linux32/linux32_io.h > > @@ -0,0 +1,47 @@ > > +/*- > > + * Copyright (c) 2004 Tim J. Robbins > > + * Copyright (c) 2001 Doug Rabson > > + * Copyright (c) 1994-1996 Søren Schmidt > > + * All rights reserved. > ^^^^^^^^^^ Is this true ? > I have copied it from linux.h, can I remove it? > Coloring this further, do we need a new include file for one structure > and one function ? > You suggest to transfer it to linux.h? I can do it, but then it is necessary to insert #include into all files which include linux.h thnx! -- Have fun! chd From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 15:31:16 2008 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 E44BD106566C; Thu, 18 Sep 2008 15:31:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 83CCC8FC1D; Thu, 18 Sep 2008 15:31:16 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KgLTO-000ME4-EU; Thu, 18 Sep 2008 18:31:14 +0300 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 m8IFVB7x085611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Sep 2008 18:31:11 +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.2/8.14.2) with ESMTP id m8IFVBp2067559; Thu, 18 Sep 2008 18:31:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m8IFVBdn067558; Thu, 18 Sep 2008 18:31:11 +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: Thu, 18 Sep 2008 18:31:11 +0300 From: Kostik Belousov To: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-net@freebsd.org Message-ID: <20080918153111.GL39652@deviant.kiev.zoral.com.ua> References: <20080822112927.GZ99951@hoeg.nl> <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> <20080917190230.GA2947@dchagin.dialup.corbina.ru> <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> <20080918135736.GA2218@dchagin.dialup.corbina.ru> <20080918142454.GK39652@deviant.kiev.zoral.com.ua> <20080918150759.GA2898@dchagin.dialup.corbina.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jTQ3i/+I4dznYrD2" Content-Disposition: inline In-Reply-To: <20080918150759.GA2898@dchagin.dialup.corbina.ru> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KgLTO-000ME4-EU c47c7ed45be87fbccf88b0f79ab4ae35 X-Terabit: YES Cc: Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 15:31:17 -0000 --jTQ3i/+I4dznYrD2 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Sep 18, 2008 at 07:07:59PM +0400, Chagin Dmitry wrote: I still cannot answer to you, so be it. > On Thu, Sep 18, 2008 at 05:24:54PM +0300, Kostik Belousov wrote: > > On Thu, Sep 18, 2008 at 05:57:36PM +0400, Chagin Dmitry wrote: > > > diff --git a/src/sys/amd64/linux32/linux32_io.h b/src/sys/amd64/linux= 32/linux32_io.h > > > new file mode 100644 > > > index 0000000..c1a9f1c > > > --- /dev/null > > > +++ b/src/sys/amd64/linux32/linux32_io.h > > > @@ -0,0 +1,47 @@ > > > +/*- > > > + * Copyright (c) 2004 Tim J. Robbins > > > + * Copyright (c) 2001 Doug Rabson > > > + * Copyright (c) 1994-1996 S=F8ren Schmidt > > > + * All rights reserved. > > ^^^^^^^^^^ Is this true ? > >=20 >=20 > I have copied it from linux.h, can I remove it? No, you should specify yourself as the copyright holder. >=20 > > Coloring this further, do we need a new include file for one structure > > and one function ? > >=20 >=20 > You suggest to transfer it to linux.h? > I can do it, but then it is necessary to insert #include > into all files which include linux.h This may be a trouble. Is there any other compat/linux include that requires uio ? --jTQ3i/+I4dznYrD2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjSdD4ACgkQC3+MBN1Mb4hplQCeMKpQpCX7LYIHOB7ucxlS41Kl 8i4AoM9GSfbh0NZ87H9/iUHelz/FOTyp =GhNg -----END PGP SIGNATURE----- --jTQ3i/+I4dznYrD2-- From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 15:56:34 2008 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 290E51065675; Thu, 18 Sep 2008 15:56:34 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from contrabass.post.ru (contrabass.post.ru [85.21.78.5]) by mx1.freebsd.org (Postfix) with ESMTP id C949F8FC26; Thu, 18 Sep 2008 15:56:33 +0000 (UTC) (envelope-from root@dchagin.dialup.corbina.ru) Received: from corbina.ru (mail.post.ru [195.14.50.16]) by contrabass.post.ru (Postfix) with ESMTP id C218C1CBA28; Thu, 18 Sep 2008 19:56:32 +0400 (MSD) X-Virus-Scanned: by cgpav Uf39PSi9pFi9oFi9 Received: from dchagin.dialup.corbina.ru ([78.107.232.239] verified) by corbina.ru (CommuniGate Pro SMTP 5.1.14) with ESMTPS id 1152686052; Thu, 18 Sep 2008 19:56:32 +0400 Received: from dchagin.dialup.corbina.ru (localhost.chd.net [127.0.0.1]) by dchagin.dialup.corbina.ru (8.14.3/8.14.2) with ESMTP id m8IFuW8u003379; Thu, 18 Sep 2008 19:56:32 +0400 (MSD) (envelope-from root@dchagin.dialup.corbina.ru) Received: (from root@localhost) by dchagin.dialup.corbina.ru (8.14.3/8.14.2/Submit) id m8IFuQTJ003378; Thu, 18 Sep 2008 19:56:26 +0400 (MSD) (envelope-from root) Date: Thu, 18 Sep 2008 19:56:26 +0400 From: Chagin Dmitry To: Kostik Belousov Message-ID: <20080918155626.GA3299@dchagin.dialup.corbina.ru> References: <20080822112946.GA97526@freebsd.org> <20080831110610.GA2380@dchagin.dialup.corbina.ru> <20080902085623.GA12395@freebsd.org> <20080917183801.GA2714@dchagin.dialup.corbina.ru> <20080917190230.GA2947@dchagin.dialup.corbina.ru> <20080918093831.89545e2iu5zjgjgg@webmail.leidinger.net> <20080918135736.GA2218@dchagin.dialup.corbina.ru> <20080918142454.GK39652@deviant.kiev.zoral.com.ua> <20080918150759.GA2898@dchagin.dialup.corbina.ru> <20080918153111.GL39652@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080918153111.GL39652@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i Cc: Alexander Leidinger , freebsd-emulation@freebsd.org, freebsd-net@freebsd.org Subject: Re: [PATCH] recvmsg() sendmsg() linux emulation X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 15:56:34 -0000 On Thu, Sep 18, 2008 at 06:31:11PM +0300, Kostik Belousov wrote: > On Thu, Sep 18, 2008 at 07:07:59PM +0400, Chagin Dmitry wrote: > > I still cannot answer to you, so be it. > > > On Thu, Sep 18, 2008 at 05:24:54PM +0300, Kostik Belousov wrote: > > > On Thu, Sep 18, 2008 at 05:57:36PM +0400, Chagin Dmitry wrote: > > > > diff --git a/src/sys/amd64/linux32/linux32_io.h b/src/sys/amd64/linux32/linux32_io.h > > > > new file mode 100644 > > > > index 0000000..c1a9f1c > > > > --- /dev/null > > > > +++ b/src/sys/amd64/linux32/linux32_io.h > > > > @@ -0,0 +1,47 @@ > > > > +/*- > > > > + * Copyright (c) 2004 Tim J. Robbins > > > > + * Copyright (c) 2001 Doug Rabson > > > > + * Copyright (c) 1994-1996 Søren Schmidt > > > > + * All rights reserved. > > > ^^^^^^^^^^ Is this true ? > > > > > > > I have copied it from linux.h, can I remove it? > > No, you should specify yourself as the copyright holder. > ok > > > > > Coloring this further, do we need a new include file for one structure > > > and one function ? > > > > > > > You suggest to transfer it to linux.h? > > I can do it, but then it is necessary to insert #include > > into all files which include linux.h > > This may be a trouble. Is there any other compat/linux include that > requires uio ? yes, linux_util.h include uio now, but iovec32 stuff specific only for ia32@amd64 emulation. -- Have fun! chd From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 18:58:30 2008 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 DFAF7106564A; Thu, 18 Sep 2008 18:58:30 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal4.es.net [198.124.252.66]) by mx1.freebsd.org (Postfix) with ESMTP id 75C3A8FC15; Thu, 18 Sep 2008 18:58:30 +0000 (UTC) (envelope-from oberman@es.net) Received: from postal1.es.net (postal3.es.net [198.128.3.207]) by postal4.es.net (Postal Node 4) with ESMTP (SSL) id YBY01129; Thu, 18 Sep 2008 11:58:29 -0700 Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal3.es.net (Postal Node 3) with ESMTP (SSL) id YBY15428; Thu, 18 Sep 2008 11:58:28 -0700 Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id E05DA45047; Thu, 18 Sep 2008 11:58:27 -0700 (PDT) To: "Jian Qiu" In-Reply-To: Your message of "Thu, 18 Sep 2008 22:50:10 +0800." Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1221764307_89905P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 18 Sep 2008 11:58:27 -0700 From: "Kevin Oberman" Message-Id: <20080918185827.E05DA45047@ptavv.es.net> X-Sender-IP: 198.128.3.207 X-Sender-Domain: es.net X-Recipent: ; ; ; X-Sender: X-To_Name: Jian Qiu X-To_Domain: gmail.com X-To: "Jian Qiu" X-To_Email: swordqiu@gmail.com X-To_Alias: swordqiu Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 18:58:31 -0000 --==_Exmh_1221764307_89905P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Thu, 18 Sep 2008 22:50:10 +0800 > From: "Jian Qiu" > Sender: owner-freebsd-net@freebsd.org > > Thanks again for the info. > > As you suggested, I did test on the most recent 7.0-stable-200807 kernel. > > The SMP throughout on the new kernel was improved to around 90MB/s. > > However, SMP kernel still had no advantage over UP, at least for this > kind of single threaded applications. > > I further did the same test on Linux with both SMP and UP. > > I did observe the same trend. > > The throughput on UP (~210MB/ecs) was also much better than SMP (~170MB/sec). > > However, I was surprised again that the local UDP throughput on Linux > was more than double of FreeBSD. > > Since all these tests were performed on the same machine, it must be > because of the kernel that made such big differences. > > I'm curious what is the major performance bottleneck in FreeBSD network stack?? > > Is there any plan in community to address these issues? Did you try locking down the CPUs used with cpuset (FreeBSD) or taskset (Linux)? This can make a very substantial difference. Something like a UDP canon will run far more efficiently if locked to a single CPU and will run best if that CPU is not processing the interrupts. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1221764307_89905P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFI0qTTkn3rs5h7N1ERArElAJ9F9CZG9WHGTQv1+fFkcF8pSLkHGwCguAb0 +qXkgaxoKYLKHCL4r3WxsB8= =6VIt -----END PGP SIGNATURE----- --==_Exmh_1221764307_89905P-- From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 19:27:20 2008 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 A81ED1065685 for ; Thu, 18 Sep 2008 19:27:20 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E56478FC1D; Thu, 18 Sep 2008 19:27:19 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <48D2ABA2.8010703@FreeBSD.org> Date: Thu, 18 Sep 2008 20:27:30 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Jian Qiu References: <48CF6450.6020909@FreeBSD.org> <48D00899.4070908@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 19:27:20 -0000 Jian Qiu wrote: > Thanks again for the info. > > As you suggested, I did test on the most recent 7.0-stable-200807 kernel. > > The SMP throughout on the new kernel was improved to around 90MB/s. > > However, SMP kernel still had no advantage over UP, at least for this > kind of single threaded applications. > > I further did the same test on Linux with both SMP and UP. > > I did observe the same trend. > > The throughput on UP (~210MB/ecs) was also much better than SMP (~170MB/sec). > > However, I was surprised again that the local UDP throughput on Linux > was more than double of FreeBSD. > > Since all these tests were performed on the same machine, it must be > because of the kernel that made such big differences. > > I'm curious what is the major performance bottleneck in FreeBSD network stack?? > > Is there any plan in community to address these issues? In our application-level tests FreeBSD significantly out-performs Linux, so either you have found a different workload, or something is not configured equally. One important thing I can think of off the top of my head is that Linux has a larger socket buffer size by default, so try tuning that on FreeBSD or confirm they are equal. If that still fails, can you provide test code? Kris From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 22:00:09 2008 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 41ED7106568F for ; Thu, 18 Sep 2008 22:00:09 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id 009808FC08 for ; Thu, 18 Sep 2008 22:00:08 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 00972163CDD; Thu, 18 Sep 2008 18:00:07 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Thu, 18 Sep 2008 18:00:08 -0400 X-Sasl-enc: EDl0fyIxWDMlSxz9Gg/U51TBG+eo53CqXr6qmeL+QSeX 1221775207 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 3B22825BE8; Thu, 18 Sep 2008 18:00:07 -0400 (EDT) Message-ID: <48D2CF66.8080608@FreeBSD.org> Date: Thu, 18 Sep 2008 23:00:06 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: debarshi.ray@gmail.com References: <3170f42f0809010507q6c37a9d5q19649bc261d7656d@mail.gmail.com> <48BBE7B2.4050409@FreeBSD.org> <48BCE4AA.6050807@elischer.org> <3170f42f0809020017k643180efte155a5b5701a40cf@mail.gmail.com> <3170f42f0809180101w57e1d4c1m1bfcef00200e6b52@mail.gmail.com> In-Reply-To: <3170f42f0809180101w57e1d4c1m1bfcef00200e6b52@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD networking and TCP/IP list , Robert Watson , Julian Elischer Subject: Re: reading routing table X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 22:00:09 -0000 Debarshi Ray wrote: > ... > By the way, would you want someone to implement 'show' support for > FreeBSD's route implementation? I can give it a go now. :-) > For sure, we'd be very happy to see a patch like that. Many thanks BMS From owner-freebsd-net@FreeBSD.ORG Thu Sep 18 23:57:32 2008 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 EC4781065688 for ; Thu, 18 Sep 2008 23:57:32 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outy.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id CFFD38FC0C for ; Thu, 18 Sep 2008 23:57:32 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id A3A4E24DB; Thu, 18 Sep 2008 16:57:32 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 628392D6004; Thu, 18 Sep 2008 16:57:31 -0700 (PDT) Message-ID: <48D2EAEC.1020902@elischer.org> Date: Thu, 18 Sep 2008 16:57:32 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <3170f42f0809010507q6c37a9d5q19649bc261d7656d@mail.gmail.com> <48BBE7B2.4050409@FreeBSD.org> <48BCE4AA.6050807@elischer.org> <3170f42f0809020017k643180efte155a5b5701a40cf@mail.gmail.com> <3170f42f0809180101w57e1d4c1m1bfcef00200e6b52@mail.gmail.com> <48D2CF66.8080608@FreeBSD.org> In-Reply-To: <48D2CF66.8080608@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: debarshi.ray@gmail.com, Robert Watson , FreeBSD networking and TCP/IP list Subject: Re: reading routing table X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2008 23:57:33 -0000 Bruce M. Simpson wrote: > Debarshi Ray wrote: >> ... >> By the way, would you want someone to implement 'show' support for >> FreeBSD's route implementation? I can give it a go now. :-) >> > > For sure, we'd be very happy to see a patch like that. > > Many thanks > BMS and don't forget the same patch for netsta\t so that it doesn't need /dev/kmem for netstat -r :-) BUT, don't forget about multiple routing tables.. From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 00:15:03 2008 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 87B191065671 for ; Fri, 19 Sep 2008 00:15:03 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.227]) by mx1.freebsd.org (Postfix) with ESMTP id 3FB9F8FC0A for ; Fri, 19 Sep 2008 00:15:03 +0000 (UTC) (envelope-from kungfujesus06@gmail.com) Received: by wr-out-0506.google.com with SMTP id c8so25959wra.27 for ; Thu, 18 Sep 2008 17:15:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=f3BnD/nU18Jg9J6uxJ20eXHj+OM8cQV/oF+a1CF7T+s=; b=jryXpoA4OGFbYpPp0iZFORdjCRdxJKlnz0UZid/7NH7oP9BXjy2twJnirQJimlLHCO ND2V6lZLLdUVkVFOX4YcFt9ZJ/KzruZ4eWFc2ZXCh75i5N1j4H+AMsRYZAA3De3D0wb2 BPlTQGEcb76Y0PBxL6U9bzN/sqWGBD4Ne4RQU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=S5J9obzLFEK4k4gNohOzwoHSCnpkBjmjrS186/wDx8rjWitskgb78bBfntr/5X8A4b DP8oCKUgo+J4t9mwsCJvjTuhN3iTKHx7MJf0gIgp+4GmeVqyDLrQ25rnIPKWhYnbpkLV fsnFBRqbwfgSaJaED++e/h7cXBwoF/aiaYZCg= Received: by 10.150.228.12 with SMTP id a12mr2172012ybh.141.1221781467317; Thu, 18 Sep 2008 16:44:27 -0700 (PDT) Received: by 10.150.177.6 with HTTP; Thu, 18 Sep 2008 16:44:27 -0700 (PDT) Message-ID: <96af083b0809181644o6136af1fybf0110f227f04f3b@mail.gmail.com> Date: Thu, 18 Sep 2008 19:44:27 -0400 From: "Adam Stylinski" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Question regarding NFS X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 00:15:03 -0000 Hello, I am running an IPCop firewall for my entire network. I have a wireless network device on the blue subnet which must access a freebsd NFS server. In order to do this, I need to open a DMZ pinhole on a few select ports. It's my understanding that NFS chooses random ports and I was wondering if there was a way I could fix this. There is a good reason that the subnet for the wireless is separate from the wired and I'd rather not configure this thing over a VPN. The client connecting to the NFS server is a voyage computer (pretty much a small debian). Also, if at all possible, I'd like to keep performance reasonably high when large volumes of clients are connecting to the NFS server, I'm not sure if binding to one port may or may not make this impossible. I apologize for my stupidity and lack of understanding when it comes to NFS. Any help would be gladly appreciated, guys. From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 03:07:08 2008 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 59FF11065671 for ; Fri, 19 Sep 2008 03:07:08 +0000 (UTC) (envelope-from jbut@swin.edu.au) Received: from swin.edu.au (gpo1.cc.swin.edu.au [136.186.1.221]) by mx1.freebsd.org (Postfix) with ESMTP id E61938FC08 for ; Fri, 19 Sep 2008 03:07:07 +0000 (UTC) (envelope-from jbut@swin.edu.au) Received: from [136.186.228.20] (jbut.caia.swin.edu.au [136.186.228.20]) by swin.edu.au (8.14.1/8.13.1) with ESMTP id m8J2rWTR006571; Fri, 19 Sep 2008 12:53:32 +1000 Message-ID: <48D3142C.1060901@swin.edu.au> Date: Fri, 19 Sep 2008 12:53:32 +1000 From: Jason But User-Agent: Thunderbird 2.0.0.16 (X11/20080725) MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on gpo1.cc.swin.edu.au Cc: David Hayes , Grenville Armitage Subject: Code release of ipfw NAT support for SCTP in FreeBSD-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 03:07:08 -0000 The Centre for Advanced Internet Architectures (CAIA http://caia.swin.edu.au) is proud to announce the release of alias_sctp version 0.2, an SCTP NAT patch to FreeBSD 8.x. Alias_sctp provides SCTP NAT functionality to the ipfw/ipfw_nat/libalias suite. Alias_sctp version 0.2 is a fully functional NAT for SCTP. It is part of the CAIA SONATA project (http://caia.swin.edu.au/urp/sonata). The code has been intentionally kept as separate as possible from the base modules to aid testing and debugging, and make it easier to port to other systems. We welcome and value feedback and comments. Please forward feedback to dahayes@swin.edu.au and jbut@swin.edu.au Download patch from http://caia.swin.edu.au/urp/sonata/downloads.html Features of alias_sctp version 0.2: - Support for global multi-homing - Support for multi-homed privately addressed hosts using ASCONF modifications from the Internet Draft (R. Stewart and M. Tuexen, "Stream control transmission protocol (SCTP) network address translation", draft-stewart-behave-sctpnat-04, Jul. 2008) - Support for forwarding of T-flagged packets - Generation and delivery of AbortM/ErrorM packets upon detection of NAT collisions - Per-port forwarding rules - Dynamic configuration (via sysctl interface) of: o Logging and statistic gathering o Timer management o Hash Table sizes o Global address storage and other processing limits - Configuration via use of the "ipfw nat ... config" - Stateful SCTP association management. This project has been made possible in part by a grant from the Cisco University Research Program Fund at Community Foundation Silicon Valley. Jason -- ---------- Dr. Jason But Lecturer Telecommunications Engineering Academic Group Faculty of Information and Communication Technologies Swinburne University of Technology http://www.swinburne.edu.au/ict/telecommshome.htm From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 03:38:56 2008 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 CE4401065671 for ; Fri, 19 Sep 2008 03:38:56 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.190]) by mx1.freebsd.org (Postfix) with ESMTP id 492968FC15 for ; Fri, 19 Sep 2008 03:38:55 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so92723tid.3 for ; Thu, 18 Sep 2008 20:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:date:from :to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=he9Of9cu7+dzvoY9dXEofPUOoJoiGZdvrPALITaWKYw=; b=S5Q1Q4XfFnDq9URIEpwa6H4mZn4+PK4Hw+0CbkyxxDr96zxEaSK+CIwrv1zhG7oBUp Wl1eQ251Akw/5dSCOaL2En+919cjHhF2pVu9CK4uSP1O/oYQPOlBvHdxDEqXpdyAFmco 7Q34fW5dqvEcO99Ttyh3GZ+6+OaC22PWdUzec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=cLnz2vEIm5fe32CnL25m+2OSdDlXZOEDZSael7/1cHGmiSY5nm2Vp1PSnFBQOELIen 8/Qlh8b9rPKYJa+W7xofi+zCd2gb/NbIrumOa3GcJBGunbxjbgiKs4GCSNUirfJDwyW4 C5aPc59sGWdqXHXslERFhWmrTztIoF8p26BiQ= Received: by 10.110.50.19 with SMTP id x19mr6286906tix.36.1221795533988; Thu, 18 Sep 2008 20:38:53 -0700 (PDT) Received: from michelle.cdnetworks.co.kr ( [211.53.35.84]) by mx.google.com with ESMTPS id u8sm1291880tia.6.2008.09.18.20.38.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 18 Sep 2008 20:38:52 -0700 (PDT) Received: from michelle.cdnetworks.co.kr (localhost.cdnetworks.co.kr [127.0.0.1]) by michelle.cdnetworks.co.kr (8.13.5/8.13.5) with ESMTP id m8J3aqE3015293 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Sep 2008 12:36:52 +0900 (KST) (envelope-from pyunyh@gmail.com) Received: (from yongari@localhost) by michelle.cdnetworks.co.kr (8.13.5/8.13.5/Submit) id m8J3ap2Z015292; Fri, 19 Sep 2008 12:36:51 +0900 (KST) (envelope-from pyunyh@gmail.com) Date: Fri, 19 Sep 2008 12:36:50 +0900 From: Pyun YongHyeon To: Milan Obuch Message-ID: <20080919033650.GA14593@cdnetworks.co.kr> References: <200809050945.09276.freebsd-net@dino.sk> <200809060803.53293.freebsd-net@dino.sk> <20080908102912.GI77346@cdnetworks.co.kr> <200809081232.43213.freebsd-net@dino.sk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200809081232.43213.freebsd-net@dino.sk> User-Agent: Mutt/1.4.2.1i Cc: freebsd-net@freebsd.org Subject: Re: MSI Wind Notebook's network interfaces 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: Fri, 19 Sep 2008 03:38:56 -0000 On Mon, Sep 08, 2008 at 12:32:42PM +0200, Milan Obuch wrote: > On Monday 08 September 2008 12:29:12 Pyun YongHyeon wrote: > > On Sat, Sep 06, 2008 at 08:03:52AM +0200, Milan Obuch wrote: > > > > [snip] > > > > > It was my pleasure and I would like to express my thanks for your great > > > work. If you will need in future some more testing with this hardware, > > > just drop me a line. Just a side note, will this patch be MFS'ed into > > > 7-STABLE in short timeframe? > > > > As soon as I get re's approval I'll commit to 7-stable. > > Thanks, I can wait a bit with this one. FYI: I've MFCed the fix to 7-stable(svn r183171). -- Regards, Pyun YongHyeon From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 08:28:22 2008 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 63880106567E for ; Fri, 19 Sep 2008 08:28:22 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id B8C828FC15 for ; Fri, 19 Sep 2008 08:28:21 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 26DD9456AB; Fri, 19 Sep 2008 09:56:28 +0200 (CEST) Received: from localhost (pjdwin.wheel.pl [10.0.1.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 4629845684 for ; Fri, 19 Sep 2008 09:56:24 +0200 (CEST) Date: Fri, 19 Sep 2008 09:56:33 +0200 From: Pawel Jakub Dawidek To: freebsd-net@FreeBSD.org Message-ID: <20080919075633.GA4333@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: Subject: Firewall redirect doesn't work any more... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 08:28:22 -0000 --3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable =2E..or am I missing something? I've a box running: FreeBSD whiplash.wheel.pl 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 23 11:4= 1:31 CEST 2008 root@puppet.wheel.pl:/usr/obj/usr/src/sys/WHIPLASH i386 I'm also running PF in there with the following rule: rdr on fxp0 proto tcp from 10.0.1.9 to 10.0.0.2 port 88 -> 10.0.5.123 port = 88 When I connect from 10.0.1.9 to 10.0.0.2:88 I can see redirected packet leaving the box: IP 10.0.1.9.43210 > 10.0.0.2.88: S [...] IP 10.0.1.9.43210 > 10.0.5.123.88: S [...] Ok. Now I've a box running: FreeBSD bridge.wheel.pl 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #1: Thu Sep 1= 1 13:59:06 CEST 2008 root@bridge.wheel.pl:/usr/obj/usr/src/sys/BRIDGE i386 And the following PF rule: rdr on fxp0 proto tcp from 10.0.0.2 to 10.0.5.123 port 88 -> 10.0.1.9 port = 88 When I connect from 10.0.0.2 to 10.0.5.123:88 I no longer see redirected packet leaving the box: IP 10.0.0.2.60806 > 10.0.5.123.88: S [...] I tried to redirect packet on the second box with IPFW, but also failed (yes IPFIREWALL_FORWARD was compiled in). Does something got broken or am I missing some configuration hint? --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFI01svForvXbEpPzQRAiGfAKC4f34kz61S9Ilro/dqTTi3Klas7ACcCM9v RuezaeqC4+XgDXIHoprrvVc= =uR44 -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz-- From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 09:35:49 2008 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 0099F106564A for ; Fri, 19 Sep 2008 09:35:49 +0000 (UTC) (envelope-from freebsd-net@dino.sk) Received: from loki.netlab.sk (loki.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0CF8FC14 for ; Fri, 19 Sep 2008 09:35:48 +0000 (UTC) (envelope-from freebsd-net@dino.sk) Received: from via.dino.sk (home.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Fri, 19 Sep 2008 11:32:57 +0200 id 0002E023.48D371C9.000040DA From: Milan Obuch To: freebsd-net@freebsd.org, pyunyh@gmail.com Date: Fri, 19 Sep 2008 11:34:41 +0200 User-Agent: KMail/1.9.7 References: <200809050945.09276.freebsd-net@dino.sk> <200809081232.43213.freebsd-net@dino.sk> <20080919033650.GA14593@cdnetworks.co.kr> In-Reply-To: <20080919033650.GA14593@cdnetworks.co.kr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809191134.43531.freebsd-net@dino.sk> Cc: Subject: Re: MSI Wind Notebook's network interfaces X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 09:35:49 -0000 On Friday 19 September 2008 05:36:50 Pyun YongHyeon wrote: > On Mon, Sep 08, 2008 at 12:32:42PM +0200, Milan Obuch wrote: > > On Monday 08 September 2008 12:29:12 Pyun YongHyeon wrote: > > > On Sat, Sep 06, 2008 at 08:03:52AM +0200, Milan Obuch wrote: > > > > > > [snip] > > > > > > > It was my pleasure and I would like to express my thanks for your > > > > great work. If you will need in future some more testing with this > > > > hardware, just drop me a line. Just a side note, will this patch be > > > > MFS'ed into 7-STABLE in short timeframe? > > > > > > As soon as I get re's approval I'll commit to 7-stable. > > > > Thanks, I can wait a bit with this one. > > FYI: I've MFCed the fix to 7-stable(svn r183171). Thanks for reminder. Tried csup'ping, rebuild my 7.1-PRERELEASE and it works the expected way. As expected, I can now work with no patches with this system again. Until I find another problem/bug, possibly in totally different part of system... Regards, Milan From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 10:25:37 2008 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 C9A9D1065687 for ; Fri, 19 Sep 2008 10:25:37 +0000 (UTC) (envelope-from randall@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:203:6dff:fe1a:4ddc]) by mx1.freebsd.org (Postfix) with ESMTP id 640D18FC25 for ; Fri, 19 Sep 2008 10:25:37 +0000 (UTC) (envelope-from randall@lakerest.net) Received: from [10.1.1.54] ([10.1.1.54]) (authenticated bits=0) by lakerest.net (8.14.1/8.14.1) with ESMTP id m8JAPZCG085889 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 19 Sep 2008 06:25:35 -0400 (EDT) (envelope-from randall@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1221819936; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=0Mlhgd0TjXRgNGw5EJv4n+GvEqzj4MCAbWBO9MyNf4ypa+/qG7SWDTm m4D3gSe/nzBFqwL6X+M3Q27F7mqtUYA== Message-Id: <24300CD2-275A-42BA-930A-9D347C15435F@lakerest.net> From: Randy Stewart To: Jason But In-Reply-To: <486765C7.1010409@swin.edu.au> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Fri, 19 Sep 2008 06:25:35 -0400 References: <486765C7.1010409@swin.edu.au> X-Mailer: Apple Mail (2.929.2) Cc: freebsd-net@freebsd.org Subject: Re: Code release of ipfw NAT support for SCTP in FreeBSD-8 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 10:25:38 -0000 Jason: Do you know if anyone will shepard this in to FreeBSD? If not I will volunteer... I need to actually fix the stack to be able to generate the right things for this anyway ;-) Let me know if you have someone already out there doing this :-) Thanks R On Jun 29, 2008, at 6:36 AM, Jason But wrote: > The Centre for Advanced Internet Architectures (CAIA - http://caia.swin.edu.au > ) > is proud to announce the release of alias_sctp version 0.1, a SCTP > NAT patch to > FreeBSD 8.x. > > > Alias_sctp provides SCTP NAT functionality to the ipfw/ipfw_nat/ > libalias suite. > It is part of the CAIA SONATA project (http://caia.swin.edu.au/urp/sonata > ). > The code has been intentionally kept as separate as possible from > the base > modules to aid testing and debugging, and make it easier to port to > other > systems. > > This project has been made possible in part by a grant from the Cisco > University Research Program Fund at Community Foundation Silicon > Valley. > > > We welcome and value feedback and comments. > Please forward feedback to dahayes@swin.edu.au and jbut@swin.edu.au > > Download patch from http://caia.swin.edu.au/urp/sonata/downloads.html > > Features of alias_sctp version 0.1: > > - Basic configuration through "ipfw nat ... config" commands. > > - Forwarding of incoming SCTP associations through > "ipfw nat ... redirect_addr ..." commands. > > - A variety of log levels (currently #define, but sysctl in version > 0.2). > > - Stateful SCTP association management. > > 12345678901234567890123456789012345678901234567890123456789012345678901234567890 > - Tested on single-homed hosts, but should work when the multi-homed > host is on > the global side of the NAT (same mechanism for address translation). > > - Dynamic hash table size allocation (currently #define, but sysctl in > version 0.2). > > - Initial testing has been for up to 10000 concurrent flows arriving > and leaving > at about 2000/second. Tested for periods of up to 72 hours. > > > Features in the pipline for further releases: > > - Sysctl interface for logging, timeouts, hash table size. > Status - mostly complete. > > - Port forwarding and load sharing. > Status - mostly complete. > > - Support for, soon to be specified, enhancements of SCTP to aid > interworking > with NATs. > > - New AddIP ASCONF chunks. > Status - preliminary coding and investigation. > (Requires finalised standards to be completed) > > - AbortM and ErrorM NAT originated messages. > Status - preliminary coding, with work starting on the ipfw send > interface > > - IPv6 support. > Status - preliminary investigation. > > - Global IP address tracing. > Status - preliminary investigation. > > > Other tasks: > > - Exaustive testing of the various configurations and scenarios. > > - Stress and load testing. > > - Performance analysis. > > Jason > -- > > ---------- > Dr. Jason But > Lecturer > Telecommunications Engineering Academic Group > Faculty of Information and Communication Technologies > Swinburne University of Technology > http://www.swinburne.edu.au/ict/telecommshome.htm > > > _______________________________________________ > 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" > ----- Randall Stewart randall@lakerest.net From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 12:16:01 2008 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 30600106567B for ; Fri, 19 Sep 2008 12:16:01 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id 873518FC0A for ; Fri, 19 Sep 2008 12:16:00 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C466C456AB; Fri, 19 Sep 2008 14:15:58 +0200 (CEST) Received: from localhost (pjdwin.wheel.pl [10.0.1.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C9A1645684 for ; Fri, 19 Sep 2008 14:15:53 +0200 (CEST) Date: Fri, 19 Sep 2008 14:16:02 +0200 From: Pawel Jakub Dawidek To: freebsd-net@FreeBSD.org Message-ID: <20080919121602.GC4333@garage.freebsd.pl> References: <20080919075633.GA4333@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E13BgyNx05feLLmH" Content-Disposition: inline In-Reply-To: <20080919075633.GA4333@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: Subject: Re: Firewall redirect doesn't work any more... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 12:16:01 -0000 --E13BgyNx05feLLmH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 19, 2008 at 09:56:33AM +0200, Pawel Jakub Dawidek wrote: > ...or am I missing something? >=20 > I've a box running: >=20 > FreeBSD whiplash.wheel.pl 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 23 11= :41:31 CEST 2008 root@puppet.wheel.pl:/usr/obj/usr/src/sys/WHIPLASH i386 >=20 > I'm also running PF in there with the following rule: >=20 > rdr on fxp0 proto tcp from 10.0.1.9 to 10.0.0.2 port 88 -> 10.0.5.123 por= t 88 >=20 > When I connect from 10.0.1.9 to 10.0.0.2:88 I can see redirected packet > leaving the box: >=20 > IP 10.0.1.9.43210 > 10.0.0.2.88: S [...] > IP 10.0.1.9.43210 > 10.0.5.123.88: S [...] >=20 > Ok. Now I've a box running: >=20 > FreeBSD bridge.wheel.pl 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #1: Thu Sep= 11 13:59:06 CEST 2008 root@bridge.wheel.pl:/usr/obj/usr/src/sys/BRIDGE i3= 86 >=20 > And the following PF rule: >=20 > rdr on fxp0 proto tcp from 10.0.0.2 to 10.0.5.123 port 88 -> 10.0.1.9 por= t 88 >=20 > When I connect from 10.0.0.2 to 10.0.5.123:88 I no longer see redirected > packet leaving the box: >=20 > IP 10.0.0.2.60806 > 10.0.5.123.88: S [...] >=20 > I tried to redirect packet on the second box with IPFW, but also failed > (yes IPFIREWALL_FORWARD was compiled in). >=20 > Does something got broken or am I missing some configuration hint? I downgraded to 7.0-RELEASE and the problem was still there, but I found a work-around - one needs to set net.inet.ip.forwarding to 1, even though packet is not forwarded between interfaces (everything is related to fxp0 only). --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --E13BgyNx05feLLmH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFI05gCForvXbEpPzQRAoR7AKCgxG29/6j6HjoU/Uo84cCu2B2oVACePXN+ 7VTRS3zub2GhObMcLG7wFRc= =WUCa -----END PGP SIGNATURE----- --E13BgyNx05feLLmH-- From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 13:38:07 2008 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 C91FC106566C for ; Fri, 19 Sep 2008 13:38:07 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 24B618FC24 for ; Fri, 19 Sep 2008 13:38:07 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-021-033.pools.arcor-ip.net [88.66.21.33]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1KggBR0H8O-0000aq; Fri, 19 Sep 2008 15:38:05 +0200 Received: (qmail 8012 invoked from network); 19 Sep 2008 13:38:03 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by laiers.local with SMTP; 19 Sep 2008 13:38:03 -0000 From: Max Laier Organization: FreeBSD To: freebsd-net@freebsd.org Date: Fri, 19 Sep 2008 15:38:02 +0200 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <20080919075633.GA4333@garage.freebsd.pl> <20080919121602.GC4333@garage.freebsd.pl> In-Reply-To: <20080919121602.GC4333@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809191538.02698.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+CGISTbWtpzn2ogeollivS3HoWzfMy9NpTN9+ XCqR3ArKEVZdMjgo3D3670DcgnrzZUoS70ucAK+gnqvRuqAJNC CKsQlRo0Zlf0SMDFwKTqw== Cc: Pawel Jakub Dawidek Subject: Re: Firewall redirect doesn't work any more... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 13:38:07 -0000 On Friday 19 September 2008 14:16:02 Pawel Jakub Dawidek wrote: > On Fri, Sep 19, 2008 at 09:56:33AM +0200, Pawel Jakub Dawidek wrote: > > ...or am I missing something? > > > > I've a box running: > > > > FreeBSD whiplash.wheel.pl 7.0-STABLE FreeBSD 7.0-STABLE #0: Wed Jul 23 > > 11:41:31 CEST 2008 root@puppet.wheel.pl:/usr/obj/usr/src/sys/WHIPLASH > > i386 > > > > I'm also running PF in there with the following rule: > > > > rdr on fxp0 proto tcp from 10.0.1.9 to 10.0.0.2 port 88 -> 10.0.5.123 > > port 88 > > > > When I connect from 10.0.1.9 to 10.0.0.2:88 I can see redirected packet > > leaving the box: > > > > IP 10.0.1.9.43210 > 10.0.0.2.88: S [...] > > IP 10.0.1.9.43210 > 10.0.5.123.88: S [...] > > > > Ok. Now I've a box running: > > > > FreeBSD bridge.wheel.pl 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #1: Thu Sep > > 11 13:59:06 CEST 2008 root@bridge.wheel.pl:/usr/obj/usr/src/sys/BRIDGE > > i386 > > > > And the following PF rule: > > > > rdr on fxp0 proto tcp from 10.0.0.2 to 10.0.5.123 port 88 -> 10.0.1.9 > > port 88 > > > > When I connect from 10.0.0.2 to 10.0.5.123:88 I no longer see redirected > > packet leaving the box: > > > > IP 10.0.0.2.60806 > 10.0.5.123.88: S [...] > > > > I tried to redirect packet on the second box with IPFW, but also failed > > (yes IPFIREWALL_FORWARD was compiled in). > > > > Does something got broken or am I missing some configuration hint? > > I downgraded to 7.0-RELEASE and the problem was still there, but I found > a work-around - one needs to set net.inet.ip.forwarding to 1, even > though packet is not forwarded between interfaces (everything is related > to fxp0 only). I might be wrong, but I don't think we ever supported rdr without net.inet.ip.forwarding enabled. Maybe to a different local address, but even then you'd need net.inet.ip.check_interface=0. Looking at the code, I don't see where IPFW forwarding fails (as it has its own ip_forward() call), though. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 18:51:39 2008 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 650D5106564A for ; Fri, 19 Sep 2008 18:51:39 +0000 (UTC) (envelope-from renaud@vmware.com) Received: from smtp-outbound-2.vmware.com (smtp-outbound-2.vmware.com [65.115.85.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1F23D8FC17 for ; Fri, 19 Sep 2008 18:51:39 +0000 (UTC) (envelope-from renaud@vmware.com) Received: from mailhost1.vmware.com (mailhost1.vmware.com [10.16.67.132]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 0F66A1F00D for ; Fri, 19 Sep 2008 11:31:58 -0700 (PDT) Received: from renaud-dev1.eng.vmware.com (renaud-dev1.eng.vmware.com [10.20.118.23]) by mailhost1.vmware.com (Postfix) with ESMTP id D4BA36FC325; Fri, 19 Sep 2008 11:31:55 -0700 (PDT) Date: Fri, 19 Sep 2008 11:31:57 -0700 From: Renaud Lienhart To: freebsd-net@freebsd.org Message-ID: <20080919113157.2ac9fe9e@renaud-dev1.eng.vmware.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.9; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: stolarchuk@vmware.com Subject: Unnecessary check in mb_zinit_pack()? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 18:51:39 -0000 It seems there is a redundant check in mb_zinit_pack(): if (uma_zalloc_arg(zone_clust, m, how) == NULL || m->m_ext.ext_buf == NULL) return (ENOMEM); If uma_zalloc_arg() successfully allocates a cluster then shouldn't m->m_ext.ext_buf be guaranteed not to be NULL? I can't find any rationale for the second check; I removed it from my private tree, moved it into a KASSERT() and didn't run into any problem so far. Am I missing something? Thanks, Renaud Lienhart From owner-freebsd-net@FreeBSD.ORG Fri Sep 19 23:21:01 2008 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 B3D5A106566C; Fri, 19 Sep 2008 23:21:01 +0000 (UTC) (envelope-from wessels@life-gone-hazy.com) Received: from life-gone-hazy.com (life-gone-hazy.com [12.160.37.4]) by mx1.freebsd.org (Postfix) with ESMTP id 78EC48FC17; Fri, 19 Sep 2008 23:21:01 +0000 (UTC) (envelope-from wessels@life-gone-hazy.com) Received: from life-gone-hazy.com (localhost [127.0.0.1]) by life-gone-hazy.com (8.14.2/8.13.4) with ESMTP id m8JN2aZd021824; Fri, 19 Sep 2008 16:02:36 -0700 (PDT) (envelope-from wessels@life-gone-hazy.com) Received: (from wessels@localhost) by life-gone-hazy.com (8.14.2/8.14.2/Submit) id m8JN2a00021821; Fri, 19 Sep 2008 16:02:36 -0700 (PDT) (envelope-from wessels) Date: Fri, 19 Sep 2008 16:02:36 -0700 (PDT) From: Duane Wessels <0ac5@packet-pushers.com> X-X-Sender: wessels@life-gone-hazy.com To: freebsd-net@freebsd.org In-Reply-To: <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> Message-ID: <20080919155900.P29264@life-gone-hazy.com> References: <20080828002919.GA54169@alpha.local> <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (life-gone-hazy.com [127.0.0.1]); Fri, 19 Sep 2008 16:02:36 -0700 (PDT) Cc: freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Sep 2008 23:21:01 -0000 On Mon, 15 Sep 2008, Henri-Pierre Charles said: > I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 > > 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. For the record, the same is true for my Acer Aspire One. After updating sys/contrib/dev/ath to HEAD I now have a working ath0. hooray! Duane W. From owner-freebsd-net@FreeBSD.ORG Sat Sep 20 00:21:26 2008 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 F3948106567F; Sat, 20 Sep 2008 00:21:25 +0000 (UTC) (envelope-from frank@exit.com) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.freebsd.org (Postfix) with ESMTP id A759A8FC14; Sat, 20 Sep 2008 00:21:25 +0000 (UTC) (envelope-from frank@exit.com) Received: from jill.exit.com (jill.exit.com [IPv6:2001:470:80f4:0:2e0:81ff:fe33:7e9a]) by tinker.exit.com (8.14.2/8.14.2) with ESMTP id m8JNqUGZ012478; Fri, 19 Sep 2008 16:52:30 -0700 (PDT) (envelope-from frank@exit.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=exit.com; s=tinker; t=1221868350; bh=Fllz97wfc8ghZZigyxtVUOMEPhWL25nMv6CYHcroaEY=; h=Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:Date:Message-Id:Mime-Version; b=kiBCmOBf XuavatYnQjP9HbkTN4ScrEu8qkIlH6kb0Fj2F+wood7pPTlPL8pv0GQXO1e6bvKxiRt Gs5mD5WXPEwOHBB1+MaX3kEBmXjsn85derVvVbKC5F96AyWTcahTfA/jk787tHdEc+B ct0RkgpljHP88BYBJvZYICMi8ImJw= Received: from jill.exit.com (localhost [127.0.0.1]) by jill.exit.com (8.14.2/8.14.2) with ESMTP id m8JNqaSO063319; Fri, 19 Sep 2008 16:52:36 -0700 (PDT) (envelope-from frank@exit.com) Received: (from frank@localhost) by jill.exit.com (8.14.2/8.14.2/Submit) id m8JNqaHO063318; Fri, 19 Sep 2008 16:52:36 -0700 (PDT) (envelope-from frank@exit.com) X-Authentication-Warning: jill.exit.com: frank set sender to frank@exit.com using -f From: Frank Mayhar To: Duane Wessels <0ac5@packet-pushers.com> In-Reply-To: <20080919155900.P29264@life-gone-hazy.com> References: <20080828002919.GA54169@alpha.local> <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> <20080919155900.P29264@life-gone-hazy.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Exit Consulting Date: Fri, 19 Sep 2008 16:52:35 -0700 Message-Id: <1221868355.63110.2.camel@jill.exit.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-Virus-Scanned: ClamAV 0.93.3/8289/Fri Sep 19 13:42:07 2008 on tinker.exit.com X-Virus-Status: Clean Cc: freebsd-net@freebsd.org, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frank@exit.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2008 00:21:26 -0000 On Fri, 2008-09-19 at 16:02 -0700, Duane Wessels wrote: > > On Mon, 15 Sep 2008, Henri-Pierre Charles said: > > > I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 > > > > 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. > > For the record, the same is true for my Acer Aspire One. After > updating sys/contrib/dev/ath to HEAD I now have a working ath0. > hooray! On the other hand, mine doesn't. I have a brand new Lifebook E8420 and I believe the Atheros wireless chipset is an a/g/n chipset. It lists as: none0@pci0:32:0:0: class=0x028000 card=0x147c10cf chip=0x002a168c rev=0x01 hdr=0x00 I read somewhere that this chipset is supported by the new ath9k Linux driver but, of course, I run FreeBSD. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/ http://www.zazzle.com/fmayhar* From owner-freebsd-net@FreeBSD.ORG Sat Sep 20 00:57:35 2008 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 DB05E106567F; Sat, 20 Sep 2008 00:57:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id ADCCC8FC0C; Sat, 20 Sep 2008 00:57:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m8K0vJ8q040725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Sep 2008 17:57:21 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <48D44A6F.1020408@freebsd.org> Date: Fri, 19 Sep 2008 17:57:19 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: frank@exit.com References: <20080828002919.GA54169@alpha.local> <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> <20080919155900.P29264@life-gone-hazy.com> <1221868355.63110.2.camel@jill.exit.com> In-Reply-To: <1221868355.63110.2.camel@jill.exit.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: freebsd-net@freebsd.org, Duane Wessels <0ac5@packet-pushers.com>, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2008 00:57:36 -0000 Frank Mayhar wrote: > On Fri, 2008-09-19 at 16:02 -0700, Duane Wessels wrote: > >> On Mon, 15 Sep 2008, Henri-Pierre Charles said: >> >> >>> I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 >>> >>> 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. >>> >> For the record, the same is true for my Acer Aspire One. After >> updating sys/contrib/dev/ath to HEAD I now have a working ath0. >> hooray! >> > > On the other hand, mine doesn't. I have a brand new Lifebook E8420 and > I believe the Atheros wireless chipset is an a/g/n chipset. It lists > as: > > none0@pci0:32:0:0: class=0x028000 card=0x147c10cf chip=0x002a168c rev=0x01 hdr=0x00 > > I read somewhere that this chipset is supported by the new ath9k Linux > driver but, of course, I run FreeBSD. > That's a merlin part (aka 9280); I've got untested changes to support it. Unfortunately I don't have a card so it may take a while to get something out. Unfortunately it's not feasible for me to send out test code to try until I can actually work w/ a card. Sam From owner-freebsd-net@FreeBSD.ORG Sat Sep 20 05:12:13 2008 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 D94EC106566C; Sat, 20 Sep 2008 05:12:13 +0000 (UTC) (envelope-from frank@exit.com) Received: from tinker.exit.com (tinker.exit.com [206.223.0.1]) by mx1.freebsd.org (Postfix) with ESMTP id 79E578FC08; Sat, 20 Sep 2008 05:12:13 +0000 (UTC) (envelope-from frank@exit.com) Received: from jill.exit.com (jill.exit.com [IPv6:2001:470:80f4:0:2e0:81ff:fe33:7e9a]) by tinker.exit.com (8.14.2/8.14.2) with ESMTP id m8K5BUWm016210; Fri, 19 Sep 2008 22:11:30 -0700 (PDT) (envelope-from frank@exit.com) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=exit.com; s=tinker; t=1221887491; bh=XwVgMcLjYaJKgmpOVuKojVUPQOKUcHFtVWNa3QXMWVw=; h=Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type: Content-Transfer-Encoding:Date:Message-Id:Mime-Version; b=ePKitSUQ 0jiO7m5AttimKrFlFic13gyNkIhKHhXEU3aAlipvc/L8qp05T7xK497GL7Cc2BYR04m wrGKrmngQLJeC/YThqN1bOLrncbAmcO7XJNZtyPb69WkOdhMqEjvoSbq2201jh5zaz3 zhVxgD/ZLFPgVnj0OTsmVXfLHmiq0= Received: from jill.exit.com (localhost [127.0.0.1]) by jill.exit.com (8.14.2/8.14.2) with ESMTP id m8K5BfnV064542; Fri, 19 Sep 2008 22:11:41 -0700 (PDT) (envelope-from frank@exit.com) Received: (from frank@localhost) by jill.exit.com (8.14.2/8.14.2/Submit) id m8K5BeDM064541; Fri, 19 Sep 2008 22:11:40 -0700 (PDT) (envelope-from frank@exit.com) X-Authentication-Warning: jill.exit.com: frank set sender to frank@exit.com using -f From: Frank Mayhar To: Sam Leffler In-Reply-To: <48D44A6F.1020408@freebsd.org> References: <20080828002919.GA54169@alpha.local> <4734a3ed0809150659n438a5b20r59278908f4032a45@mail.gmail.com> <20080919155900.P29264@life-gone-hazy.com> <1221868355.63110.2.camel@jill.exit.com> <48D44A6F.1020408@freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: Exit Consulting Date: Fri, 19 Sep 2008 22:11:39 -0700 Message-Id: <1221887499.64423.1.camel@jill.exit.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-Virus-Scanned: ClamAV 0.93.3/8290/Fri Sep 19 18:23:09 2008 on tinker.exit.com X-Virus-Status: Clean Cc: freebsd-net@freebsd.org, Duane Wessels <0ac5@packet-pushers.com>, freebsd-current@freebsd.org, freebsd-mobile@freebsd.org Subject: Re: HEADS UP: ath_hal updated to 0.10.5.10 -- PLEASE TEST X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: frank@exit.com List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2008 05:12:14 -0000 On Fri, 2008-09-19 at 17:57 -0700, Sam Leffler wrote: > Frank Mayhar wrote: > > On Fri, 2008-09-19 at 16:02 -0700, Duane Wessels wrote: > > > >> On Mon, 15 Sep 2008, Henri-Pierre Charles said: > >> > >> > >>> I've tried 7.1-BETA and 8.0-CURRENT-200809 on my eeepc model 701 > >>> > >>> 7.1 does not recognize ath0, as expected, but 8.0-CURRENT does. > >>> > >> For the record, the same is true for my Acer Aspire One. After > >> updating sys/contrib/dev/ath to HEAD I now have a working ath0. > >> hooray! > >> > > > > On the other hand, mine doesn't. I have a brand new Lifebook E8420 and > > I believe the Atheros wireless chipset is an a/g/n chipset. It lists > > as: > > > > none0@pci0:32:0:0: class=0x028000 card=0x147c10cf chip=0x002a168c rev=0x01 hdr=0x00 > > > > I read somewhere that this chipset is supported by the new ath9k Linux > > driver but, of course, I run FreeBSD. > > > That's a merlin part (aka 9280); I've got untested changes to support > it. Unfortunately I don't have a card so it may take a while to get > something out. Unfortunately it's not feasible for me to send out test > code to try until I can actually work w/ a card. I would happily pay for a card if that would help. Just pick out the one you want and let me know. -- Frank Mayhar frank@exit.com http://www.exit.com/ Exit Consulting http://www.gpsclock.com/ http://www.exit.com/blog/frank/ http://www.zazzle.com/fmayhar* From owner-freebsd-net@FreeBSD.ORG Sat Sep 20 15:36:42 2008 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 3947A1065675 for ; Sat, 20 Sep 2008 15:36:42 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.184]) by mx1.freebsd.org (Postfix) with ESMTP id B42508FC0C for ; Sat, 20 Sep 2008 15:36:41 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so473435tid.3 for ; Sat, 20 Sep 2008 08:36:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=73rJ9NNVExpg2AGE3NjnJhIDak0v7y1WTHYVTRgldLg=; b=vu+kL2pTZv/IoF9bRuwj3eBuh1g/43FqE6VbnA1zw/h6Nb8QpCOhV1jk1YC5nrAxHk ish/Ph9HvhJu4KgYRa6M159WXHWSxx7HsbVCjFfSAmpFx/2X8pS4cvA1NQ0yyBgTqhFf b4UnCRdp/71pMT8CQiHU6WHvC0mmF+ihNCCW4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=tcR9y62wQIeUsXkdDcIKJyENj9RlraUSUgsyPHvX92ZpJvOJzIIj97MI8jL93gpvrC Z4EV+IpbMXzHcT4RVqFvlxd6huciSgmGi8E3fT08AiQvzxdzIoyJbtXHDDc/jkbzDQMD ZbgOp2ocnYLY1QX8HFTPLsXhp7HX+OZgIzO74= Received: by 10.110.95.15 with SMTP id s15mr2348393tib.40.1221925000212; Sat, 20 Sep 2008 08:36:40 -0700 (PDT) Received: by 10.110.90.11 with HTTP; Sat, 20 Sep 2008 08:36:40 -0700 (PDT) Message-ID: Date: Sat, 20 Sep 2008 23:36:40 +0800 From: "Jian Qiu" To: "Kevin Oberman" In-Reply-To: <20080918185827.E05DA45047@ptavv.es.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080918185827.E05DA45047@ptavv.es.net> Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2008 15:36:42 -0000 Hi, Kevin, > > Did you try locking down the CPUs used with cpuset (FreeBSD) or taskset > (Linux)? This can make a very substantial difference. Something like a > UDP canon will run far more efficiently if locked to a single CPU and > will run best if that CPU is not processing the interrupts. As far as I know, on the sending path, a UDP packet will be directly put on the sending queue of the relevant NIC. The UDP stack codes are executed on the CPU where the sending application is running. On the receiving path, iIf the packet is received from a loopback interface, the UDP stack codes are executed in the context of netisr softirq. Did you mean I should bind the sending application to one CPU and netsir softirq to another CPU? Thanks. Jian From owner-freebsd-net@FreeBSD.ORG Sat Sep 20 16:04:02 2008 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 3BFBE1065674 for ; Sat, 20 Sep 2008 16:04:02 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by mx1.freebsd.org (Postfix) with ESMTP id B59748FC17 for ; Sat, 20 Sep 2008 16:04:01 +0000 (UTC) (envelope-from swordqiu@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so476504tid.3 for ; Sat, 20 Sep 2008 09:04:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=9NiPCR3evonJOau6F6VSKrA7uKlxHrfWSyR9OumYwMQ=; b=nz8G6s1iHCNT2R9dO4IRMgcCa5rdq30NBU+LoG44VnPlHFqU4tswzAqrw0GfZMzSHX y7TePxbdxYr71r1O1QhBFclJqFODrui//AhNjCusR00F4sEPwgSPjEco5FwrCUkzl6uD 3za5vkq5lKyeTrZd6a1cy6Q7Q1HJ1PvPdHigc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=J9zXMkOs2BO3i23UPq7AcL9NAAjJIOoAxz2p5sP9Lf5TT7XolGxKhqM/VzmMwHMVhW J0EEjEKerXSgXiLXKxKnpsfN3Mo42qaWw8Kuy+nbcftL46evLPjjY37HXfw4lbSjZwc5 e9KXeLal0EF9s6TT394autziyNyPPaomZWyuE= Received: by 10.110.109.19 with SMTP id h19mr2335686tic.58.1221926640411; Sat, 20 Sep 2008 09:04:00 -0700 (PDT) Received: by 10.110.90.11 with HTTP; Sat, 20 Sep 2008 09:04:00 -0700 (PDT) Message-ID: Date: Sun, 21 Sep 2008 00:04:00 +0800 From: "Jian Qiu" To: "Kris Kennaway" In-Reply-To: <48D2ABA2.8010703@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48CF6450.6020909@FreeBSD.org> <48D00899.4070908@FreeBSD.org> <48D2ABA2.8010703@FreeBSD.org> Cc: freebsd-net@freebsd.org Subject: Re: What's the status of parallel netisr? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2008 16:04:02 -0000 Hi, Kris, > In our application-level tests FreeBSD significantly out-performs Linux, so > either you have found a different workload, or something is not configured > equally. One important thing I can think of off the top of my head is that > Linux has a larger socket buffer size by default, so try tuning that on > FreeBSD or confirm they are equal. > > If that still fails, can you provide test code? > > Kris > I tried but larger socket buffer seem not helpful. I also tried netperf and iperf. Both applications achieve better throughput on Linux. So I feel the result is not specific to my test code. My code is very simple. Basically, a client process called sendto in a loop while a server called recvfrom in a loop. Besides these, some additional lines get the throughput statistics. If necessary, I will post the code here. BTW, I did the tests on Linux 2.26.5. Which linux kernel did you use? Could you please provide some more information on your test. Many thanks. Jian From owner-freebsd-net@FreeBSD.ORG Sat Sep 20 21:56:01 2008 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 77FF91065E38 for ; Sat, 20 Sep 2008 21:56:01 +0000 (UTC) (envelope-from wahjava@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.188]) by mx1.freebsd.org (Postfix) with ESMTP id D90C88FC1B for ; Sat, 20 Sep 2008 21:56:00 +0000 (UTC) (envelope-from wahjava@gmail.com) Received: by ti-out-0910.google.com with SMTP id d27so504794tid.3 for ; Sat, 20 Sep 2008 14:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:to:cc:subject:x-face:x-uptime :x-url:x-openpgp-id:x-openpgp-fingerprint:x-os:x-mailer:x-mail-morse :x-attribution:organization:from:user-agent:face:date:message-id :mime-version:content-type; bh=ADfPKJ3CzsLXsAORrvbd/0BZzc/jXCmL99rHUNKFWqo=; b=HeWeBKhzfvGD+INDUPFho/R+p/SKOEvpk/IGpq9oBqOb57UQMKy+R6sAveiGjE2g5q 1w/gGEOXvoMdcVpQvwMcx6+cuzYzqnqqDfH7pTa3A1lrsW1Ry/xZ+q+JX2BcTjZqUN9e DoUG1FVPDUl31Sh46swAl5xOqjD8ENx+JvsTA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=to:cc:subject:x-face:x-uptime:x-url:x-openpgp-id :x-openpgp-fingerprint:x-os:x-mailer:x-mail-morse:x-attribution :organization:from:user-agent:face:date:message-id:mime-version :content-type; b=xA/YgWKpa9c0dD8wMs/WFLnU3gJsSdGRnmCP1Mib2ZeEcYCJhHjC3TP/ZH3XdEssGl mrGZ75Y3ybeOi7T2hQPOxlXjxJQLfAvwPFB+krAuCiXdNH9TIxNKXJR7sB6kBqj6sHiM cfOzb4Yr2uNcs58LBmmTuQIICy2aT/oUMHkxg= Received: by 10.110.84.2 with SMTP id h2mr2687540tib.44.1221947759514; Sat, 20 Sep 2008 14:55:59 -0700 (PDT) Received: from chateau.d.lf ( [122.162.55.126]) by mx.google.com with ESMTPS id i9sm7528834tid.15.2008.09.20.14.55.56 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 20 Sep 2008 14:55:58 -0700 (PDT) To: freebsd-gnome@freebsd.org X-Face: )vGQ9yK7Y$Flebu1C>(B\gYBm)[$zfKM+p&TT[[JWl6:]S>cc$%-z7-`46Zf0B*syL.C]oCq[upTG~zuS0.$"_%)|Q@$hA=9{3l{%u^h3jJ^Zl; t7 X-Uptime: 03:23:07 up 3:17, 1 user, load average: 0.50, 0.48, 0.34 X-URL: http://wahjava.wordpress.com/ X-OpenPGP-ID: 762E5E74 X-OpenPGP-Fingerprint: 1E00 4679 77E4 F8EE 2E4B 56F2 1F2F 8410 762E 5E74 X-OS: GNU/Linux on Linux 2.6.25-gentoo-r7 kernel on x86_64 architecture X-Mailer: Gnus/5.11 (Oort 5.11) Emacs/22.3.1 (x86_64-pc-linux-gnu) X-Mail-Morse: .-- .- .... .--- .- ...- .- .--.-. --. -- .- .. .-.. .-.-.- -.-. --- -- X-Attribution: =?utf-8?B?4KSG4KS24KWA4KS3?= Organization: alt.religion.emacs From: wahjava@gmail.com (Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IOCktg==?= =?utf-8?B?4KWB4KSV4KWN4KSy?=) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJ1BMVEWpqal/f39tbW1jY2Md HR2goKCenp6UlJROTk7////9/f35+fnT09ORJdieAAACVklEQVQ4jXXUP2vbQBQA8AvUTkgz5OzY Z0iGWhpS6BSrkECn0mvx0MEJ6AjtYrfoBCVDlD8naJYmNlRfwZq8+mkKlIZaGpJSYmP7Q/XkJDrJ Td8i/H68u3vHPaPufwLdf32AMA4A6GcAgvAamY1pOJiDIFqicTwLswDhfr3uxfFtkAY/GFHPMwzD 8zpnACmIOnE6js7rQb+v4NJrG9od0C+QgpHMy5jBewV+UDSMWiw1Y4fWfyV7+NGFzDsYa3pth9LJ Q4XvXxFHcJRvHOmygn5NAEabnDcQQguarnfoiwSCJ99jmKKcphsZONmWsDK9Ro7cvZOCtQdg8nje egLhc2LNlkLmsezzTFUUy5w18ocox/f0LaLgJy0zO75zk+9pp85GAj36xjqhdI0y3tq2m4dqqcWX zQWBTz8L1irvolXV4J+3q7eCDgVnttjNq6X8H+9KOZsuNk1uCzx8pSp+E9HImfJOTLdcGqo+YKnG EIovizkEn48V7BO+ch2DXcD4ENSpWiU+q8hjjbgTBZCXnZtyj0Ws4Q1Q0B2WXFtYZo65Bbyeeldw RS6qFueM80LlLA29YlVwGRYvFD+kwI/0O+A2PlpOP9GwslUVciHuYGechuBTp922YiDZCrghTknm XSyOM+D3aoRZlo0Jb42zY7DN4p2x4AeZ+QAYutx1sHwTHzMT5cMNduQ9yW3GczN4KZ86kb0c9O8T yXDeFqpl2fryPEAYGXIlezAPXYh2NgVr/gvdoHIuDwuPwOhcWE8f8mmICq41eATkn8x0kuRTIKcB wE9+/QUtiiAnYcaN7wAAAABJRU5ErkJggg== Date: Sun, 21 Sep 2008 03:26:04 +0530 Message-ID: <87ej3e32iz.fsf@chateau.d.lf> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Cc: freebsd-net@freebsd.org Subject: [X-POST] Anyone porting NetworkManager to FreeBSD ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Sep 2008 21:56:01 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Hi all, Is there anyone, who is porting NetworkManager[1] to FreeBSD ? If yes, I would like to be a tester or contributor to the effort. References: [1] - http://www.gnome.org/projects/NetworkManager/ Thanks Ashish Shukla -- ·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- -- () ascii ribbon campaign - against HTML e-mail /\ www.asciiribbon.org - against proprietary attachments --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAkjVcXgACgkQHy+EEHYuXnRAswCg1O96oLb795QwVIb6IVJjFPsA UjoAn1SUre7TzRQefip12jpT8EkN474H =Nb33 -----END PGP SIGNATURE----- --=-=-=--