On Fri, 11 Mar 2005, Pawel Jakub Dawidek wrote: > On Fri, Mar 11, 2005 at 01:14:38PM -0800, Julian Elischer wrote: > +> >P> There is still an unresolved problem (in your and our patch as well) of > +> >P> using ifnet structure fields without synchronization, as we don't have > +> >P> access tointerface's internal mutex, which protects those fields. > +> > +> you need to add an interface method that has access to it.. > > I was thinking more about moving interface mutex into ifnet structure, > but Robert has some objections IIRC.
My specific concern was to make sure that we don't lock device driver writers into a locking model that forces them to protect the device driver with a single mutex. There are changes floating around to protect the if_em receive and transmit components separately, since the're basically independent hardware units and can be accessed from multiple CPUs in parallel. This is also, I believe, what several Linux device drivers do. So I'm OK with a multi-layer mutex in ifnet protecting ifnet and device driver data, but only if we don't preclude the parallelism benefits that can be attained as suggested above. Robert N M Watson _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"