Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jul 2000 11:18:36 -0700 (PDT)
From:      Archie Cobbs <archie@whistle.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        "Yevmenkin, Maksim N, CSCIO" <myevmenkin@att.com>, "'freebsd-current@freebsd.org'" <freebsd-current@FreeBSD.ORG>
Subject:   Re: possible NETGRAPH/NG_ETHER bug
Message-ID:  <200007141818.LAA11381@bubba.whistle.com>
In-Reply-To: <396DE3A5.167EB0E7@elischer.org> from Julian Elischer at "Jul 13, 2000 08:43:33 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Julian Elischer writes:
> > i was working on integration of Ethernet TAP driver and NETGRAPH
> > and found strange thing. the problem is that NG_ETHER nodes do not
> > detach correctly when interface is gone. i was taking a very quick
> > look at it, and, it seems to me that we are missing one reference
> > to a node. i think it is ng_name_node/ng_unname pair.
> 
> This is quite possible because until recently interfaces could never
> be removed. Therefore the act of removing a node was really
> just a case of RESETTING the node. It was not removed.

Here's some more info that may be helpful.

First of all, until yesterday, if you detach an ethernet interface
that was using netgraph you'd get a kernel panic (or somesuch) --
it was simply broken. This change will be MFC'd soon but it hasn't
yet so we're talking -current only at this point.

Now, it all should work as designed... where "as designed" means:

  1.  Ethernet nodes appear for each Ethernet interface at the first moment
      when the following conditions *both* become true:

       (a) ng_ether.ko KLD is loaded (or kernel has options NETGRAPH_ETHER)
       (b) The interface is attached (e.g., at boot time, or when the
	   PCCARD or USB device is connected).

  2.  Ethernet nodes disappear when/if the interface is detached
      (e.g., you pop out your Ethernet PCCARD).

  3.  Telling an Ethernet node to shutdown (e.g., "ngctl kill fxp0:")
      simply *resets* the node, i.e., breaks all connections to other
      nodes. The node does NOT go away until #2 happens.

  4.  You cannot kldunload ng_ether.ko until all Ethernet nodes
      are detached (for obvious reasons, considering #1 and #2).

If you are seeing other behavior that this using -current sources,
please let me know, as there is a BUG.

OTOH, if you think the behavior "as designed" is incorrect, let's discuss.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007141818.LAA11381>