Peter,

Could not agree with you more on the ugliness of casting a function pointer to 
a different signature.  My issue with alternatives was what is declared 
"public" vs "private" in the rev 7 Nemo design document dtd 3/13/06 (wherein 
you are one of 4 authors).

Unfortunately, a mac_tx_t in section 3 and 3.16 is "driver interface public"; 
whereas, the mac_txloop_t is private.  To get to the mac_txloop_t interface, 
the current design requires traversing the mac_tx_t interface.  The bad news is 
the mac_tx_t interface inappropriately considers the driver's mac_t.m_tx 
function and the mac module's mac_txloop function as polymorphic 
implementations of itself.  The mac_txloop function needs the caller's 
dls_impl_t* ; the driver's impl does not.

Hence my comment above in the thread wrt "programming to an implementation, not 
to an interface"; IMHO, the interface as it stands is broken ... and my 
proposal is a workaround at best (effective, I hope; and current testing is 
positive).  That being said, we want to deliver product on S10; and broken-ness 
in the esoterica of design is much better than the broken-ness of an app seeing 
it's own transmited packets!  See the behavior of Linux sockets of type 
PF_PACKET for comparison.

Sometimes getting something working _now_ with humility; is better than not 
delivering product because "architects" have not passed.

Mark Deric, Director and Chief Software Architect (I'm cringing), DeepNines, 
Inc.
 
 
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to