Page MenuHomeFreeBSD

ifnet: initial if_grow() shall always succeed
ClosedPublic

Authored by glebius on Dec 4 2021, 9:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 3, 10:47 AM
Unknown Object (File)
Sat, Nov 2, 7:27 PM
Unknown Object (File)
Sat, Nov 2, 12:39 AM
Unknown Object (File)
Wed, Oct 30, 6:19 PM
Unknown Object (File)
Mon, Oct 14, 12:03 AM
Unknown Object (File)
Sep 30 2024, 10:52 PM
Unknown Object (File)
Sep 28 2024, 2:08 PM
Unknown Object (File)
Sep 17 2024, 8:11 PM
Subscribers

Details

Summary

So let's just call malloc() directly. This also avoids hidden
doubling of default V_if_indexlim.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.Dec 4 2021, 10:51 PM

I think your description may be misleading and that it was initially done simply to have a single point of malloc.
That indeed does not make sense anymore with the current code.

Do you want to also bump V_if_indexlim to 16 now to make it explicit and not reduce the number of initial array size?

In D33261#752134, @bz wrote:

I think your description may be misleading and that it was initially done simply to have a single point of malloc.
That indeed does not make sense anymore with the current code.

Do you want to also bump V_if_indexlim to 16 now to make it explicit and not reduce the number of initial array size?

I'd like to leave it 8. First, this number seems more sane default to me. Second, the doubling was not documented as intentional in f9132cebdc924.