> 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).
Indee -- and more than that, I added mac_txloop() in order to allow aggregations to be snooped both at the aggregation level and at the individual-link level. Of course, this issue you're looking to solve wasn't on my radar. > Unfortunately, a mac_tx_t in section 3 and 3.16 is "driver interface > public"; whereas, the mac_txloop_t is private. Actually, neither is public at this point -- though in time the MAC driver interfaces will indeed become public, and the MAC client interfaces will remain consolidation-private. All that said, anyone contributing changes to OpenSolaris is welcome to modify either public or private interfaces, assuming they go through the right channels (e.g., ARC review and the other things that Jim Carlson mentioned). FWIW, it's generally much easier to change private interfaces, since the impact to other parts of the system is much lower. > 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. This was no accident; the goal was to allow interposing with zero overhead in the common case where the promiscuous behavior was not needed. > The mac_txloop function needs the caller's dls_impl_t* ; the driver's > impl does not. The fact that mac_txloop() needs that is in itself an architectural issue with the proposed solution. DLS is just one consumer of the mac; hardcoding the mac layer to be aware of it is not appropriate. As I understand Dong-Hai's solution (which hopefully he will discuss shortly), the DLS layer has its own loopback layer, in addition to the loopback done at the mac layer. With the DLS loopback layer, it is straightforward to filter out the sender-side duplicates. -- meem _______________________________________________ networking-discuss mailing list [email protected]
