summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8f5e39c)
The driver was using a value expressed in 2us increments
for the divisor to figure out our bytes/usec values.
Fix the usecs variable to contain a value in microseconds.
Change-ID: I5c20493103c295d6f201947bb908add7040b7c41
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
enum i40e_latency_range new_latency_range = rc->latency_range;
u32 new_itr = rc->itr;
int bytes_per_int;
enum i40e_latency_range new_latency_range = rc->latency_range;
u32 new_itr = rc->itr;
int bytes_per_int;
if (rc->total_packets == 0 || !rc->itr)
return false;
if (rc->total_packets == 0 || !rc->itr)
return false;
* 0-10MB/s lowest (100000 ints/s)
* 10-20MB/s low (20000 ints/s)
* 20-1249MB/s bulk (8000 ints/s)
* 0-10MB/s lowest (100000 ints/s)
* 10-20MB/s low (20000 ints/s)
* 20-1249MB/s bulk (8000 ints/s)
+ *
+ * The math works out because the divisor is in 10^(-6) which
+ * turns the bytes/us input value into MB/s values, but
+ * make sure to use usecs, as the register values written
+ * are in 2 usec increments in the ITR registers.
- bytes_per_int = rc->total_bytes / rc->itr;
+ usecs = (rc->itr << 1);
+ bytes_per_int = rc->total_bytes / usecs;
switch (new_latency_range) {
case I40E_LOWEST_LATENCY:
if (bytes_per_int > 10)
switch (new_latency_range) {
case I40E_LOWEST_LATENCY:
if (bytes_per_int > 10)
enum i40e_latency_range new_latency_range = rc->latency_range;
u32 new_itr = rc->itr;
int bytes_per_int;
enum i40e_latency_range new_latency_range = rc->latency_range;
u32 new_itr = rc->itr;
int bytes_per_int;
if (rc->total_packets == 0 || !rc->itr)
return false;
if (rc->total_packets == 0 || !rc->itr)
return false;
* 0-10MB/s lowest (100000 ints/s)
* 10-20MB/s low (20000 ints/s)
* 20-1249MB/s bulk (8000 ints/s)
* 0-10MB/s lowest (100000 ints/s)
* 10-20MB/s low (20000 ints/s)
* 20-1249MB/s bulk (8000 ints/s)
+ *
+ * The math works out because the divisor is in 10^(-6) which
+ * turns the bytes/us input value into MB/s values, but
+ * make sure to use usecs, as the register values written
+ * are in 2 usec increments in the ITR registers.
- bytes_per_int = rc->total_bytes / rc->itr;
+ usecs = (rc->itr << 1);
+ bytes_per_int = rc->total_bytes / usecs;
switch (new_latency_range) {
case I40E_LOWEST_LATENCY:
if (bytes_per_int > 10)
switch (new_latency_range) {
case I40E_LOWEST_LATENCY:
if (bytes_per_int > 10)