Re: [PATCH v3 net-next 14/15] net: aquantia: fixups on 64bit dma counters

2019-04-27 Thread Andrew Lunn
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

Re: [PATCH v3 net-next 14/15] net: aquantia: fixups on 64bit dma counters

2019-04-26 Thread Igor Russkikh
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

Re: [PATCH v3 net-next 14/15] net: aquantia: fixups on 64bit dma counters

2019-04-26 Thread Andrew Lunn
> + 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

[PATCH v3 net-next 14/15] net: aquantia: fixups on 64bit dma counters

2019-04-26 Thread Igor Russkikh
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