Now that if_alloc_domain() never fails and actually doesn't
expose ifnet to outside we can eliminate IFNET_HOLD and two
step index allocation.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Apart from the suggestion this looks fine.
sys/net/if.c | ||
---|---|---|
636 | idx here could right away be ifp->ifindex like it is done in if_vmove() further down and then the new "assignment" in ifnet_setbyindex() doesn't have to be there either as it is not related to that function (it is the reverse). |
sys/net/if.c | ||
---|---|---|
636 | That's what next revisions do. Collapse ifindex_alloc, ifnet_setbyindex and if_grow. |