Home
last modified time | relevance | path

Searched hist:afb7737237bc08596389e4352f66e3031316563c (Results 1 – 1 of 1) sorted by relevance

/freebsd/sys/net/
H A Diflib.cdiff afb7737237bc08596389e4352f66e3031316563c Fri May 10 02:41:42 CEST 2019 Eric Joyner <erj@FreeBSD.org> iflib: use default ntxd and nrxd when user value is not power of 2

From Jake:
A user may set a sysctl to override the default number of Tx or Rx
descriptors. However, certain calculations in the iflib core expect the
number of descriptors to be a power of 2.

Update _iflib_assert to verify that all of the shared context parameters
for the number of descriptors are powers of 2.

Modify iflib_reset_qvalues to check that the provided isc_nrxd value is
a power of 2. If it's not, print a warning message and then use the
default value.

An alternative might be to try rounding the number down instead.
However, this creates problems in case the rounded down value is below
the minimum value that the driver would support.

Submitted by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed by: marius@
MFC after: 1 week
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D19880