Re: shutdown node VS disconnect all hooks

From: Gleb Smirnoff (glebius_at_cell.sick.ru)
Date: 05/28/04

  • Next message: Harti Brandt: "Re: shutdown node VS disconnect all hooks"
    Date: Fri, 28 May 2004 12:25:25 +0400
    To: Julian Elischer <julian@elischer.org>
    
    

    On Fri, May 28, 2004 at 01:15:06AM -0700, Julian Elischer wrote:
    J> > JE>> So, what about adding one more netgraph method into struct ng_type, say
    J> > JE>> ng_preshutdown_t? This method is called first in ng_rmnode(), and then
    J> > JE>> current shutdown sequence is followed. We will set it to NULL in all existing
    J> > JE>> nodes, and create a method in ng_tee, which calls ng_bypass(). Future
    J> > JE>> implementations may use this method to send "goodbye" messages down hooks when
    J> > JE>> shutting down.
    J> > JE>
    J> > JE>That sounds like a much better solution. Node shutdown is done in 2
    J> > JE>parts just as node connection is done in 2 parts.
    J> > JE>
    J> > JE>> And this will be a POLA-friendly solution - we will not lose functionality
    J> > JE>> of RELENG_4 (which mpd relies on), and we will not break nodes which
    J> > JE>> rely on current shutdown sequence.
    J> > JE>>
    J> > JE>> What's your opinion? If it is positive - I'll send patches.
    J> > JE>>
    J> > JE>
    J> > JE>That is a very workable solution.
    J> >
    J> > If you do that, I suppose you need to edit all the nodes, right?. In that
    J> > case could you please convert the initialisation of the typestructs
    J> > to use C99 sparse initialisation? In that case future changes will be a good
    J> > deal easier.
    J>
    J> actually I don't know if you do need to edit the nodes
    J> types.. At one time it was true that unassigned elements on
    J> the end will be NULL.

    I like idea of sparse initialization. We already have this in ng_hub.c. Julian,
    if you don't mind, I'll create diff moving all initializations to C99 sparse type.

    -- 
    Totus tuus, Glebius.
    GLEBIUS-RIPN GLEB-RIPE
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
    

  • Next message: Harti Brandt: "Re: shutdown node VS disconnect all hooks"