sfc: Fix internal indices of ethtool stats for EF10
The indices in nic_data->stats need to match the EF10_STAT_whatever enum values. In efx_nic_update_stats, only mask; gaps are removed in efx_ef10_update_stats. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
This commit is contained in:
committed by
Ben Hutchings
parent
d546a89362
commit
87648cc925
@@ -469,8 +469,7 @@ size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count,
|
|||||||
* @count: Length of the @desc array
|
* @count: Length of the @desc array
|
||||||
* @mask: Bitmask of which elements of @desc are enabled
|
* @mask: Bitmask of which elements of @desc are enabled
|
||||||
* @stats: Buffer to update with the converted statistics. The length
|
* @stats: Buffer to update with the converted statistics. The length
|
||||||
* of this array must be at least the number of set bits in the
|
* of this array must be at least @count.
|
||||||
* first @count bits of @mask.
|
|
||||||
* @dma_buf: DMA buffer containing hardware statistics
|
* @dma_buf: DMA buffer containing hardware statistics
|
||||||
* @accumulate: If set, the converted values will be added rather than
|
* @accumulate: If set, the converted values will be added rather than
|
||||||
* directly stored to the corresponding elements of @stats
|
* directly stored to the corresponding elements of @stats
|
||||||
@@ -503,11 +502,9 @@ void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (accumulate)
|
if (accumulate)
|
||||||
*stats += val;
|
stats[index] += val;
|
||||||
else
|
else
|
||||||
*stats = val;
|
stats[index] = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
++stats;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user