This ensures other threads see the correct counter routine once the interface has been attached.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/net/iflib.c | ||
---|---|---|
5363 | This was changed in 23ac9029f96b2 , but without a clue why that is required. |
Comment Actions
@zlei do you know if all the consumer ifdi_get_counter implementations will still have been initialized correctly, for instance not making invalid references? It seems fine as long as there are no implicit initialization issues that relied on the current behavior.
Comment Actions
The ifdi_get_counter will only be invoked after the interface been attached. At that point the ifdi_get_counter implementations should see already initialized softc and ifnet. So I believe there is no initialization issues right now.
Comment Actions
PS: This fix is part of my overhauling of the interface attaching / detaching process. But I think I can be a standalone fixed.