From owner-freebsd-net@freebsd.org Mon Apr 11 22:09:31 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 C8B80B0C9A1 for ; Mon, 11 Apr 2016 22:09:31 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) (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 8FF3815DA; Mon, 11 Apr 2016 22:09:31 +0000 (UTC) (envelope-from matt.joras@gmail.com) Received: by mail-ob0-x230.google.com with SMTP id j9so119937138obd.3; Mon, 11 Apr 2016 15:09:31 -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=QKCPV3kx/k4uyI7SQ4kzcKlaJ0X1PB/mQQ/ni7W8KHw=; b=Yek70WzLFgwLUyP9SG/aW/9I4CbI+8msoaTFuFg5Q+z07dfRJEhR87NM9lthCGZw3G Rnwphlg/QUKDFvKXOYW1XB5tiosBx+XFq+vwBPdwmeJKhWm/qSNLGF3XpEvFQO+pFQpM cc8c64xQS6bh0hixvz7QsXyyuBQyzNNnzf4ZDz47i7xHiyWcebuOq3F3LuoFN8ygVFIk TgJtL9He8UGpJW14TcraSxmD5cq/ePyuIX11AhobueyKO0y2TLN/vQXXIQEZ7tHy9A1K 16PD5kNW64EPhT83fAQnElLDiLhbIbQ114ZnLwsdMoJEuF0s4d4ZfVMF/F7tMM76ZxPY KXWg== 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=QKCPV3kx/k4uyI7SQ4kzcKlaJ0X1PB/mQQ/ni7W8KHw=; b=Bkinass9Nu9j6xmxy5H+2UUzQr1jhViuOVgteg1lEGziWxRW7lKIsC6raUc1IUHJrD HAPVoL3B/HjqE2wGh2b5/7XbR5MOcUGhv03BYLLqVFDQ1qdyQHfMtd4JkZPX11YjH3eg mf9DBCIsf/e6FDrIMBpaqeh2KEnLXoytrc4vmY+cy0yxLgHufd333SxscW7FxCX0Qm7L e5wOPKDEUPnSbw9EVKYaDYyirfbs9i/n3HTryCsXS8JvJ9PNU4izzvrGkjI8UVKNZjPO IodDGBWgfh9IkE4eG7+UO+hN5f6PcvNeap7HTt2n1Az7xXGPKfUq/qB1d8wRjG5x8xoV jFhQ== X-Gm-Message-State: AOPr4FW4fsulYu94/NE+MSGfLetXfecMNHjVuF1bA4Lpt8x83fBqXmhUa9qh4RcHYURArttYSH/J4fYB53yFag== MIME-Version: 1.0 X-Received: by 10.182.248.199 with SMTP id yo7mr220082obc.73.1460412570790; Mon, 11 Apr 2016 15:09:30 -0700 (PDT) Received: by 10.202.170.20 with HTTP; Mon, 11 Apr 2016 15:09:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:09:30 -0700 Message-ID: Subject: Re: Question on sysctl tree handling From: Matt Joras To: "K. Macy" Cc: Jack Vogel , FreeBSD Net Content-Type: text/plain; charset=UTF-8 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:09:31 -0000 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"