From owner-freebsd-pf@FreeBSD.ORG Tue Nov 27 23:02:36 2007 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D52416A468 for ; Tue, 27 Nov 2007 23:02:36 +0000 (UTC) (envelope-from flo@kasimir.com) Received: from kasimir.com (kasimir.com [85.214.51.166]) by mx1.freebsd.org (Postfix) with ESMTP id DAC3113C448 for ; Tue, 27 Nov 2007 23:02:35 +0000 (UTC) (envelope-from flo@kasimir.com) Received: (qmail 11735 invoked from network); 28 Nov 2007 00:02:34 +0100 Received: from unknown (HELO nibbler-osx.local) (89.244.126.115) by solomo.org with SMTP; 28 Nov 2007 00:02:33 +0100 Message-ID: <474CA1EB.3020601@kasimir.com> Date: Wed, 28 Nov 2007 00:02:03 +0100 From: Florian Smeets User-Agent: Thunderbird 2.0.0.10pre (Macintosh/20071127) MIME-Version: 1.0 To: Max Laier References: <474B5BD0.6040004@kasimir.com> <200711270130.01165.max@love2party.net> <474BE383.6050905@kasimir.com> <200711272144.52511.max@love2party.net> In-Reply-To: <200711272144.52511.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-pf@freebsd.org Subject: Re: ALTQ for dynamic interfaces [Re: 7-STABLE panic: mtx_lock() of spin mutex %s @ %s:%d] X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Nov 2007 23:02:36 -0000 Max Laier wrote: > > Okay ... try this. Not final yet, but should be functional. With this > you should be able to: > > 1) Safely remove an interface with active queues > 2) Re-add the interface and *magically* get the queues back > 3) Write queue rules for non-existing interfaces > - Note that we will assume an MTU of 1500 and you have to specify a > fixed bandwidth as we don't know the interface's native speed > - Obviously these queues will be activated as soon as a matching > interface is created. > > BUGS: Doesn't print queues on removed interfaces at all. Should be > changed to something like "queue foo on bar0 (N/A) ...", but it seems I > was too strict with the local_flags. The error handling might need some > work in order to avoid panic if something goes wrong while we de-activate > queues. > > I'd like to hear back from you in order to see if I at least got the basic > workings right enough so you can survive the mpd interface destroy. Ok, it survives 20 consecutive restarts now without problems. I didn't test more as i'm not 100% sure what my provider will do otherwise... N.B. This is 8-CURRENT but it had the same problem as the 7-STABLE box. > Could you - in addition to you current setup w/ if-up script - also test > the magic part? i.e. load the ruleset before loading mpd. This should > now be possible as long as you don't put "set loginterface" or fixed > interface-to-address src/dst in it \o/ > Yes, the *magic* seems to work (without up-script): root@fw-pri:~ > pfctl -sq queue std_out on ng0 qlimit 250 priq( default ) queue tcp_ack_out on ng0 priority 6 qlimit 250 root@fw-pri:~ > /usr/local/etc/rc.d/mpd4 stop Stopping mpd4. Waiting for PIDS: 1824. root@fw-pri:~ > pfctl -sq root@fw-pri:~ > /usr/local/etc/rc.d/mpd4 start Starting mpd4. root@fw-pri:~ > pfctl -sq queue std_out on ng0 qlimit 250 priq( default ) queue tcp_ack_out on ng0 priority 6 qlimit 250 Max, thanks a lot! Keep up the great work you are doing on pf4freebsd. Cheers Florian