From owner-freebsd-net@freebsd.org Mon Apr 11 22:16:23 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86B9BB0CD85 for ; Mon, 11 Apr 2016 22:16:23 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vk0-x232.google.com (mail-vk0-x232.google.com [IPv6:2607:f8b0:400c:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8D91C22; Mon, 11 Apr 2016 22:16:23 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: by mail-vk0-x232.google.com with SMTP id k1so244149vkb.0; Mon, 11 Apr 2016 15:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=DF6U6i8bucy87e1walC/7z8OuKllmIUoMQth+3EDVuw=; b=nddRDm94jWZPQPFHQZBRUDMNEzKBsc4T+I66pdCNC74x6YGcX91UuwCscw+911khFI H/aFYbmXO9j3NHfC+Jtfxq5Aj04gO1LNrQzX3WP8TZyaxnUZwOc4pfxoecnq6/u4ASq5 cd6EywFJesh8XtdFVZFrNxpHcVUMWaFklW0BQlJeWLiuia4vSWJTCUquw+AEqOrByYim N9rYED39G1s+EDdMANt/R/tkGakjkTEhoisW88uONolO84mV81Z8T/uPLczora8Z99c0 1zBnVtyghhdHK7WJ2lz4dBAjANjQwH9qM290t7siZP1USlD9Cc1Awe7esq2Kw/2YG0Ex nC3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=DF6U6i8bucy87e1walC/7z8OuKllmIUoMQth+3EDVuw=; b=hAUZysuXzmKaP6QRYyluQ9ksMy0ie7HB9NMpWPwoQzVDtTO2tnfSjJOzPam2OYJvsz /v+h1CGEu/s7s1RvGnkHE0VF0UxoLwdfQnW1ejDiyN1UFsxIggjS4UJq+2QT4vvm50OJ U9de4x6CeQMPKDh7eoEqSuFyhWgQf+5zNMl4l+8oSnzzRfEE0aFpneTGN4UkE1/IptoR CfJk66VRAKDXTsFfzFnM98wP3mAUhHV04vEg0HU56H6L6YHWlD6LNHneHTpQPGv2mdxs q1CecHg+pIGizNp0nhIGAusbDc9DobkE270GM9Wuc3oKJcwWRI2pmpXjJ3pqR1yZ5QTC 65YQ== X-Gm-Message-State: AD7BkJIYTU3vptEmSVClWkk9PubC01cHw7Q/K8FytJUmSbBVY5mRP26FQ8GfFhi99Gi8ncD+w7dKQMYRru8dIg== MIME-Version: 1.0 X-Received: by 10.31.165.76 with SMTP id o73mr11122590vke.67.1460412982291; Mon, 11 Apr 2016 15:16:22 -0700 (PDT) Received: by 10.31.171.206 with HTTP; Mon, 11 Apr 2016 15:16:22 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:16:22 -0700 Message-ID: Subject: Re: Question on sysctl tree handling From: Jack Vogel To: Matt Joras Cc: "K. Macy" , FreeBSD Net Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.21 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, 11 Apr 2016 22:16:23 -0000 Hmmm, after so many years of unloading and reloading drivers, it just seemed like such a convenience :) But, instability isn't fun either, I've looked at bxe a little, such a monstrous driver :) I'll give it some thought, and maybe discuss it with David. Thanks. Cheers, Jack On Mon, Apr 11, 2016 at 3:09 PM, Matt Joras wrote: > Expanding on what mmacy said... I don't think the benefits of "easy > reconfiguration" are worth the headaches you're going to potentially > run into in production. > > bxe(4) used to do this, and it caused us a lot of problems (i.e. panics) > at $DAY_JOB. For example, if a lagg was on top of bxe and then you > downed bxe you could very easily hit a use-after-free since bxe free'd > its rings while if_lagg is trying to transmit a packet. > > Matt Joras > > On Mon, Apr 11, 2016 at 2:03 PM, K. Macy wrote: > > You do understand that init needs to be run every time interface > > settings are changed (TSO / PROMISC / CSUM/ etc)? Reallocating queues > > and interrupts every time is fragile (long running systems can run low > > on contiguous memory) and, in the common case that you're not actually > > changing the number, gratuitous. > > > > Cheers. > > -M > > > > On Fri, Apr 8, 2016 at 2:56 PM, Jack Vogel wrote: > >> LOL, why does it seem that as soon as I ask the answer hits me in the > nose > >> :) > >> > >> I found the sysctl_ctx_free call, sorry for the noise.... > >> > >> Jack > >> > >> > >> On Fri, Apr 8, 2016 at 2:51 PM, Jack Vogel wrote: > >> > >>> > >>> I have a driver design where the queue/ring/irq layout is done in init > >>> rather > >>> than in attach, allowing easy reconfiguration. What I'm not sure about > is > >>> how to handle the sysctl tree during a reinit, I don't see a procedure > to > >>> free up things so I can restructure :( > >>> > >>> Am I missing something, any pointers or suggestions appreciated. > >>> > >>> Thanks, > >>> > >>> Jack > >>> > >>> > >> _______________________________________________ > >> freebsd-net@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-net > >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > _______________________________________________ > > freebsd-net@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-net > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >