MCPcopy Create free account
hub / github.com/F-Stack/f-stack / iflib_pseudo_deregister

Function iflib_pseudo_deregister

freebsd/net/iflib.c:5154–5181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5152}
5153
5154int
5155iflib_pseudo_deregister(if_ctx_t ctx)
5156{
5157 if_t ifp = ctx->ifc_ifp;
5158 if_shared_ctx_t sctx = ctx->ifc_sctx;
5159
5160 /* Unregister VLAN event handlers early */
5161 iflib_unregister_vlan_handlers(ctx);
5162
5163 if ((sctx->isc_flags & IFLIB_PSEUDO) &&
5164 (sctx->isc_flags & IFLIB_PSEUDO_ETHER) == 0) {
5165 bpfdetach(ifp);
5166 if_detach(ifp);
5167 } else {
5168 ether_ifdetach(ifp);
5169 }
5170
5171 iflib_tqg_detach(ctx);
5172 iflib_tx_structures_free(ctx);
5173 iflib_rx_structures_free(ctx);
5174
5175 iflib_deregister(ctx);
5176
5177 if (ctx->ifc_flags & IFC_SC_ALLOCATED)
5178 free(ctx->ifc_softc, M_IFLIB);
5179 free(ctx, M_IFLIB);
5180 return (0);
5181}
5182
5183int
5184iflib_device_attach(device_t dev)

Callers 1

iflib_clone_destroyFunction · 0.85

Calls 9

bpfdetachFunction · 0.85
if_detachFunction · 0.85
ether_ifdetachFunction · 0.85
iflib_tqg_detachFunction · 0.85
iflib_tx_structures_freeFunction · 0.85
iflib_rx_structures_freeFunction · 0.85
iflib_deregisterFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected