On Apr 4, 2008, at 9:17 AM, James Carlson wrote:
> In the current ON gate, the vnic_notify_walker() function updates
> va_txinfo under the global vnic_mac_lock mutex.
>
> However, the users of va_txinfo (such as vnic_active_tx) appear to
> reference va_txinfo without holding any locks, as best I can tell.
>
> 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.

> 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

Nicolas.

>
>
> -- 
> 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]

-- 
Nicolas Droux - Solaris Networking - Sun Microsystems, Inc.
[EMAIL PROTECTED] - http://blogs.sun.com/droux

_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to