domain_add(xxx) after domainfinalize...
onwahe at gmail.com
Sat Aug 2 13:20:50 UTC 2014
Well, I did not look at network stack for long time, so the following
things could be obsolete now, but at least:
(1) There is some room left in mbuf header on its allocation, so protocols
(link) headers can be added in the front of data without need of
reallocation or data copying. The size of the room is evaluated from all
domains at boot time.
(2) All network address masks are shared among domains and protocols in
mask radix tree. The tree is created with particular key size, which is
again evaluated from all domains as maximal size of all known addresses.
So, if new domain added after these evaluations does not break both them
and some other things, there is no problem. Otherwise, some warnings are
always nice if things go bad.
Maybe some function which examine new domain and say there is no risk to
add it would be nice.
On Sat, Aug 2, 2014 at 12:21 AM, John-Mark Gurney <jmg at funkthat.com> wrote:
> Svatopluk Kraus wrote this message on Sat, Aug 02, 2014 at 00:05 +0200:
> > Just what I've got in January 2011:
> Sadly, after three (or six+) years, it is clear that these bugs will
> not be fixed, and this warning message is not useful, since no one has
> stepped up to fix them..
> btw, you might want to create a bug w/ the information you tracked down
> to hopefully help the person that decides to finally fix them, though
> I doubt they will ever be fixed as people apparently don't see bad
> Unless someone fixes the bugs in the next few days, I will commit the
> following patch:
> Index: uipc_domain.c
> --- uipc_domain.c (revision 266964)
> +++ uipc_domain.c (working copy)
> @@ -227,15 +227,10 @@
> printf("WARNING: attempt to domain_add(%s) before "
> "domaininit()\n", dp->dom_name);
> -#ifdef notyet
> - KASSERT(domain_init_status < 2,
> - ("attempt to domain_add(%s) after domainfinalize()",
> - dp->dom_name));
> - if (domain_init_status >= 2)
> - printf("WARNING: attempt to domain_add(%s) after "
> - "domainfinalize()\n", dp->dom_name);
> + /*
> + * XXX - there are bugs WRT to adding domain after domain_finalize
> + * called
> + */
> > On Fri, Aug 1, 2014 at 9:34 PM, John-Mark Gurney <jmg at funkthat.com>
> > > So, I have a laptop that devd loads the bluetooth module every time..
> > >
> > > This means I get the following error on every boot:
> > > WARNING: attempt to domain_add(bluetooth) after domainfinalize()
> > > WARNING: attempt to domain_add(netgraph) after domainfinalize()
> > >
> > > Is there any real benefit to this warning? I just looked at the code,
> > > and the domain gets added despite the warning...
> > >
> > > Also, it looks like the pervious warning, we should just make that an
> > > if/panic since it's clearly a programming bug, or kill the ifndef
> > > INVARIANTS...
> John-Mark Gurney Voice: +1 415 225 5579
> "All that I will do, has been done, All that I have, has not."
More information about the freebsd-current