Page MenuHomeFreeBSD

remove references to CONTIGMALLOC_WORKS in iflib

Authored by on Feb 14 2019, 6:20 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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

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.