2023-06-14 17:18:22

by Jisheng Zhang

[permalink] [raw]
Subject: [PATCH 0/3] net: stmmac: fix & improve driver statistics

patch1 and patch2 fix two issues in net driver statistics:
1. network driver statistics are cleared in .ndo_close() and
.ndo_open() cycle
2. some network driver statistics overflow on 32 bit platforms

patch3 use pcpu statistics where necessary to remove frequent
cacheline ping pongs.

Jisheng Zhang (3):
net: stmmac: don't clear network statistics in .ndo_open()
net: stmmac: fix overflow of some network statistics
net: stmmac: use pcpu statistics where necessary

drivers/net/ethernet/stmicro/stmmac/common.h | 54 +++--
.../net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 15 +-
.../ethernet/stmicro/stmmac/dwmac100_dma.c | 7 +-
.../ethernet/stmicro/stmmac/dwmac4_descs.c | 13 +-
.../net/ethernet/stmicro/stmmac/dwmac4_lib.c | 17 +-
.../net/ethernet/stmicro/stmmac/dwmac_lib.c | 10 +-
.../ethernet/stmicro/stmmac/dwxgmac2_descs.c | 6 +-
.../ethernet/stmicro/stmmac/dwxgmac2_dma.c | 9 +-
.../net/ethernet/stmicro/stmmac/enh_desc.c | 20 +-
drivers/net/ethernet/stmicro/stmmac/hwif.h | 12 +-
.../net/ethernet/stmicro/stmmac/norm_desc.c | 15 +-
.../ethernet/stmicro/stmmac/stmmac_ethtool.c | 100 ++++++---
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 190 +++++++++++++-----
13 files changed, 304 insertions(+), 164 deletions(-)

--
2.40.1



2023-06-14 19:52:44

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH 0/3] net: stmmac: fix & improve driver statistics

On Thu, Jun 15, 2023 at 12:18:44AM +0800, Jisheng Zhang wrote:
> patch1 and patch2 fix two issues in net driver statistics:
> 1. network driver statistics are cleared in .ndo_close() and
> .ndo_open() cycle
> 2. some network driver statistics overflow on 32 bit platforms

I would encourage you to describe these as enhancements or similar,
but not fixes. Because fix implies a bug, such as a crash. And
bugs for fixes are handled by a slightly different process which
often includes backporting.

> patch3 use pcpu statistics where necessary to remove frequent
> cacheline ping pongs.

Assuming these are three enhancements, then they should be
targeted at the net-next tree. And that should be noted in the subject:

Subject: [PATCH net-next v2] ...

Unfortunately the series does not seem to apply to net-next
in its current form. So it probably needs to be rebased and reposted.

If you do post an updated series, please observe a 24h grace
period between postings, to give reviewers time to do their thing.

Link: https://docs.kernel.org/process/maintainer-netdev.html

2023-06-15 15:43:03

by Jisheng Zhang

[permalink] [raw]
Subject: Re: [PATCH 0/3] net: stmmac: fix & improve driver statistics

On Wed, Jun 14, 2023 at 09:39:17PM +0200, Simon Horman wrote:
> On Thu, Jun 15, 2023 at 12:18:44AM +0800, Jisheng Zhang wrote:
> > patch1 and patch2 fix two issues in net driver statistics:
> > 1. network driver statistics are cleared in .ndo_close() and
> > .ndo_open() cycle
> > 2. some network driver statistics overflow on 32 bit platforms
>
> I would encourage you to describe these as enhancements or similar,
> but not fixes. Because fix implies a bug, such as a crash. And
> bugs for fixes are handled by a slightly different process which
> often includes backporting.

So it seems I need to fold patch2 and patch3 into one patch. Previously
I thought the counters overflow on 32 bit platforms was a bug, thus
I split the 64bit stats patch into patch2 and patch3 so that patch2
can be backported to stable tree.

I will fold patch2 and patch3 into one patch in v2.

Thanks for your review.
>
> > patch3 use pcpu statistics where necessary to remove frequent
> > cacheline ping pongs.
>
> Assuming these are three enhancements, then they should be
> targeted at the net-next tree. And that should be noted in the subject:
>
> Subject: [PATCH net-next v2] ...
>
> Unfortunately the series does not seem to apply to net-next
> in its current form. So it probably needs to be rebased and reposted.
>
> If you do post an updated series, please observe a 24h grace
> period between postings, to give reviewers time to do their thing.
>
> Link: https://docs.kernel.org/process/maintainer-netdev.html