On Sat, Apr 27, 2019 at 06:28:12AM +, Igor Russkikh wrote:
>
>
> On 27.04.2019 0:36, Andrew Lunn wrote:
> >> + self->curr_stats.dma_pkt_rc =
> >> hw_atl_stats_rx_dma_good_pkt_counterlsw_get(self) +
> >> +
> >> ((u64)hw_atl_stats_rx_dma_good_pkt_countermsw_get
On 27.04.2019 0:36, Andrew Lunn wrote:
>> +self->curr_stats.dma_pkt_rc =
>> hw_atl_stats_rx_dma_good_pkt_counterlsw_get(self) +
>> +
>> ((u64)hw_atl_stats_rx_dma_good_pkt_countermsw_get(self) << 32);
>
> Don't you need to do something to avoid issue with ov
> + self->curr_stats.dma_pkt_rc =
> hw_atl_stats_rx_dma_good_pkt_counterlsw_get(self) +
> +
> ((u64)hw_atl_stats_rx_dma_good_pkt_countermsw_get(self) << 32);
Don't you need to do something to avoid issue with overflow from lsw
into msw? I've often seen code
From: Dmitry Bogdanov
DMA counters are 64 bit and we can fetch that to reduce
counter overflow, espesially on byte counters.
Tested-by: Nikita Danilov
Signed-off-by: Igor Russkikh
Signed-off-by: Dmitry Bogdanov
---
.../ethernet/aquantia/atlantic/hw_atl/hw_atl_llh.c | 5 -
.../ethernet/a