Nicolas Droux writes: > > If the readers aren't synchronized with the writers, then what makes > > sure that va_txinfo isn't written in the middle of transmitting a > > packet? Am I missing some other synchronization mechanism? > > It's the same mechanism that is used by consumers of mac_tx_get() > (mac_vnic_tx_get() and mac_tx_get() are both wrappers of > mac_do_tx_get()). That function returns a pointer to one of the > mac_txinfo_t's of the mac_impl_t which do not change during the life > of the underlying MAC.
I'm confused because it's using vnic_mac_lock, which appears to have a different purpose. > > What happens if the underlying NIC is (say) switching between > > promiscuous and non-promiscuous mode frequently? > > > > (Is there a design document that covers how this is supposed to work? > > I searched, but didn't find anything.) > > PSARC/2005/358 Nemo Transmit Pointers I saw that (of course), but I was asking about vnic_mac_lock. It looks like that's used in lieu of a writer equivalent for VNIC_MAC_REFHOLD, but I'm still not sure how it works. Holding the lock stops new reference holds and releases -- is that intentional, or is the only use for this lock to make sure that the mac_vnic_tx_get() call and the assignment to va_txinfo are atomic with respect to other callers of vnic_notify_walker()? (I'm beginning to suspect that the latter is the only purpose ...) -- James Carlson, Solaris Networking <[EMAIL PROTECTED]> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ networking-discuss mailing list [email protected]
