Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Apr 2016 15:29:50 -0700
From:      "K. Macy" <kmacy@freebsd.org>
To:        Jack Vogel <jfvogel@gmail.com>
Cc:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   Re: Question on sysctl tree handling
Message-ID:  <CAHM0Q_Mf9_oPztp4xBocCD-kZfYkTHvaS==UkKcMddDv_SFTEw@mail.gmail.com>
In-Reply-To: <CAFOYbckNiwSA78J-g_7hcfMTHC=aZ96vDp3SCCa7asD6GasPfQ@mail.gmail.com>
References:  <CAFOYbcnufB18%2B94RYW2e7cE_uaEOvGW=pNgOVxyPdhgZoksSyg@mail.gmail.com> <CAFOYbcmgEt7jYvDSxCJ-ZPcdN8n6n2GdSGXGzMpHaQ2szskwmg@mail.gmail.com> <CAHM0Q_NNAb6K499p-mhThOdW4u68VywRAsJCwd2_HL_46D8g7w@mail.gmail.com> <CAFOYbckNiwSA78J-g_7hcfMTHC=aZ96vDp3SCCa7asD6GasPfQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Apr 11, 2016 at 3:01 PM, Jack Vogel <jfvogel@gmail.com> 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 <kmacy@freebsd.org> 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 <jfvogel@gmail.com> 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 <jfvogel@gmail.com> 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"
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHM0Q_Mf9_oPztp4xBocCD-kZfYkTHvaS==UkKcMddDv_SFTEw>