| 5557 | } |
| 5558 | |
| 5559 | static void |
| 5560 | iflib_deregister(if_ctx_t ctx) |
| 5561 | { |
| 5562 | if_t ifp = ctx->ifc_ifp; |
| 5563 | |
| 5564 | /* Remove all media */ |
| 5565 | ifmedia_removeall(&ctx->ifc_media); |
| 5566 | |
| 5567 | /* Ensure that VLAN event handlers are unregistered */ |
| 5568 | iflib_unregister_vlan_handlers(ctx); |
| 5569 | |
| 5570 | /* Release kobject reference */ |
| 5571 | kobj_delete((kobj_t) ctx, NULL); |
| 5572 | |
| 5573 | /* Free the ifnet structure */ |
| 5574 | if_free(ifp); |
| 5575 | |
| 5576 | STATE_LOCK_DESTROY(ctx); |
| 5577 | |
| 5578 | /* ether_ifdetach calls if_qflush - lock must be destroy afterwards*/ |
| 5579 | CTX_LOCK_DESTROY(ctx); |
| 5580 | } |
| 5581 | |
| 5582 | static int |
| 5583 | iflib_queues_alloc(if_ctx_t ctx) |
no test coverage detected