Page MenuHomeFreeBSD

remove references to CONTIGMALLOC_WORKS in iflib
ClosedPublic

Authored by jacob.e.keller_intel.com on Feb 14 2019, 6:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 8:16 PM
Unknown Object (File)
Wed, Apr 17, 7:12 PM
Unknown Object (File)
Wed, Apr 17, 8:51 AM
Unknown Object (File)
Thu, Mar 28, 12:05 AM
Unknown Object (File)
Feb 27 2024, 6:37 AM
Unknown Object (File)
Feb 26 2024, 10:31 PM
Unknown Object (File)
Feb 18 2024, 8:19 AM
Unknown Object (File)
Jan 13 2024, 8:44 AM
Subscribers

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

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
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.