Page MenuHomeFreeBSD

remove references to CONTIGMALLOC_WORKS in iflib
ClosedPublic

Authored by jacob.e.keller_intel.com on Feb 14 2019, 6:20 PM.

Details

Summary

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 <jacob.e.keller@intel.com>

Diff Detail

Lint
Lint OK
Unit
No Unit 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...

shurd accepted this revision.Feb 14 2019, 7:33 PM

Looks good to me.

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.