To be more robust since the checking is performed where the interface
is referenced.
While here, remove a redundant check from if_vmove_loan().
MFC after: 2 weeks
Differential D55875
ifnet: Add some sanity checks Authored by zlei on Mon, Mar 16, 8:23 AM. Tags None Referenced Files
Details
To be more robust since the checking is performed where the interface While here, remove a redundant check from if_vmove_loan(). MFC after: 2 weeks
Diff Detail
Event TimelineComment Actions I'm not sure how these assertions will be beneficial if we have to add them to every function of the ifp [un]linking.
Comment Actions For example assertions in if_unlink_ifnet(), there're multiple places, if_detach() / if_vmove_loan() / if_vmove_reclaim() / vnet_if_return() want them. You do not want to repeat everywhere.
For assertions in ifunit() / ifunit_ref(), they guarantee the ifp is in good shape when being used, also they serve a document to developers. The net stack evolves, but the document lags. | ||||||||||||||||||||||||||||||||||||||||||||||||