Page MenuHomeFreeBSD

remove references to CONTIGMALLOC_WORKS in iflib

Authored by on Feb 14 2019, 6:20 PM.
Referenced Files
Unknown Object (File)
Fri, Dec 1, 10:21 AM
Unknown Object (File)
Wed, Nov 15, 11:05 AM
Unknown Object (File)
Sun, Nov 12, 6:41 AM
Unknown Object (File)
Fri, Nov 10, 6:18 AM
Unknown Object (File)
Fri, Nov 10, 12:48 AM
Unknown Object (File)
Tue, Nov 7, 1:47 AM
Unknown Object (File)
Oct 14 2023, 10:05 AM
Unknown Object (File)
Oct 13 2023, 3:53 PM



The iflib_fl_setup() function tries to pick various buffer sizes based
on the max_frame_size value defined by the parent driver. However, this
code was wrapped under CONTIGMALLOC_WORKS, which was never actually
defined anywhere.

This same code pattern was used in the if_em.c, likely trying to match
what iflib uses.

Since COTIGMALLOC_WORKS is not defined, remove this dead code from
iflib_fl_setup and if_em.c

Given that various iflib drivers appear to be using a similar
calculation, it might be worth making this buffer size a value that the
driver can peek at in the future.

Signed-off-by: Jacob Keller <>

Diff Detail

Lint Passed
No Test Coverage
Build Status
Buildable 22505
Build 21653: arc lint + arc unit

Event Timeline

I think it would be useful to actually expose the ifl_buf_size calculation somehow, since hardware needs this information. Currently, most drivers just calculate the value in the same way that iflib does, but that seems error prone if we ever do change this in the future.

TBH, that might actually be why no one ever saw a real increase here, because unless you program hardware to use a larger buffer size, increasing it would just waste memory...

This revision is now accepted and ready to land.Feb 14 2019, 7:33 PM
This revision was automatically updated to reflect the committed changes.