CVSROOT:        /cvs
Module name:    src
Changes by:     d...@cvs.openbsd.org    2015/09/09 10:01:10

Modified files:
        sys/net        : if.c if.h if_var.h 

Log message:
introduce reference counts for interfaces (ie, struct ifnet *ifp).

if_get can get a reference to an ifp, but it never releases that
reference. this provides an if_put function that can be used to
decrement the refcount.

we cannot come up with a scheme for letting the network stack run on
one (or many) cpus while ioctls are pulling interfaces down on another
cpu without refcounts for the interfaces.

if_put is going in now so we can go through the stack and put the
necessary calls to it in, and then we'll backfill this implementation
to actually check the refcounts when the interface detaches.

ok mpi@ mikeb@ claudio@

Reply via email to