From owner-freebsd-net@freebsd.org Mon Apr 11 22:29:50 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 EC54EB0C967 for ; Mon, 11 Apr 2016 22:29:50 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-ig0-x244.google.com (mail-ig0-x244.google.com [IPv6:2607:f8b0:4001:c05::244]) (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 B6C1E1A78 for ; Mon, 11 Apr 2016 22:29:50 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-ig0-x244.google.com with SMTP id fn8so414864igb.2 for ; Mon, 11 Apr 2016 15:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=b+47kTwfjxjahQphyll1JZodo82Fq/m2Ovxm5vorzUA=; b=BmkhPqgoKsks24tCX1r9Jrrq8BHiJB6qGe1XW9yOwJ0cve3qinvbtNd+enQNhbJaQ5 DYLCl8RIiWJtddv9IrIO12l51L4Y3EA5er4x6pvQdK1gRAFaF4SWDzDFs/XUvu5/lemw MSr3yONby4wbzp9tP7Jo/Bz/u8NCt4CH3xJ2sq7tBOoUuCjhgm+SLo/J6drWFD0aeioP kZsj7gz2kRh5iZtA2GyJwIHxUk+9FhqQFXgd5m/Acta2h0FZ13Amnk8/XcDVnidLH1Gl HN4JW1jhP6xoZwMT20/++QUAj5zHCljBy7QCS9wf0VoJFm9EOVVOAkP9HwE4ZE846mSb oXjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=b+47kTwfjxjahQphyll1JZodo82Fq/m2Ovxm5vorzUA=; b=IkdTy9k51DavttSybyDC/A/pqX0QBuwe+IjgK0m0W1ox+fXWKD7I1y+S6Jonc88EjI WgsicxpR0r788m8zJIjq4pIgwKHqO3I30wMwAJUC9y9J5ww9khopdLnFLxcZ754lMeHA kCSShYdc+LZ95Ds1n8MAXcU3dv/gkLb9djm74I3iT+dy5VTHYvEKlabq4RagVllBKtg1 b/dmZ9cePVW3y9zSqtsbxCnCC/0iFDQQbanv/XxjlzzXmZzRC3AKoxq+UasZ1jXS5j0U jP5DA8X4JW4ZqhBBg/17CUGOYXbnK14+qMszOeMkBXEp+xB8uNBMQLUntqNfuDIR42qn LoJQ== X-Gm-Message-State: AD7BkJKrOxlcrNjKuy1CVgtTUMfgv6INsNipUueR/8JXjLrWUw/XdvoRQ9dl+IPBy/URPsw3PRhHUCthmlziSw== MIME-Version: 1.0 X-Received: by 10.50.111.163 with SMTP id ij3mr21276206igb.76.1460413790203; Mon, 11 Apr 2016 15:29:50 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.107.6.166 with HTTP; Mon, 11 Apr 2016 15:29:50 -0700 (PDT) In-Reply-To: References: Date: Mon, 11 Apr 2016 15:29:50 -0700 X-Google-Sender-Auth: 6I1A8YryN3i09tKinApqp86AT-U Message-ID: Subject: Re: Question on sysctl tree handling From: "K. Macy" To: Jack Vogel Cc: 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:29:51 -0000 On Mon, Apr 11, 2016 at 3:01 PM, Jack Vogel wrote: > Why should init have to be rerun just because TSO or CSUM is turned off or > on, > its a flag that is checked in the TX routines? I actually haven't looked in to it yet. But it does annoy the heck out of me. Nonetheless, it is the current state of affairs. > If its a long running system that means its unlikely be go undergoing a > config > change, yes? Well, it just as easily means that it's undergoing some flag change. Except for the exceptional case where you're allocating more or fewer queues we don't want to do any more work there than we have to. > BTW, the sysctl stuff is still giving me trouble. I create a new node, and > add > stats oids to that, if a reinit happens, they can be removed, but then I get > a > warning message when the driver goes thru detach complaining that an oid > cannot be unregistered... It's proving to be frustrating :( I'm only familiar with how to add things to a device's sysctl tree. It obviously gets torn down at detach, so you can probably look at subr_bus.c to see what it does. > I appreciate the comments Kip. You're welcome. Good luck. -M > > 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" > >