2022-06-28 09:12:25

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH net-next v2 0/4] net: dsa: add pause stats support

changes v2:
- add Reviewed-by: Vladimir Oltean <[email protected]>
- remove packet calculation fix from ar9331 patch. It needs more fixes.
- add packet calculation fix for microchip

Oleksij Rempel (4):
net: dsa: add get_pause_stats support
net: dsa: ar9331: add support for pause stats
net: dsa: microchip: add pause stats support
net: dsa: microchip: count pause packets together will all other
packets

drivers/net/dsa/microchip/ksz_common.c | 25 +++++++++++++++++++++++--
drivers/net/dsa/microchip/ksz_common.h | 1 +
drivers/net/dsa/qca/ar9331.c | 17 +++++++++++++++++
include/net/dsa.h | 2 ++
net/dsa/slave.c | 11 +++++++++++
5 files changed, 54 insertions(+), 2 deletions(-)

--
2.30.2


2022-06-28 09:13:59

by Oleksij Rempel

[permalink] [raw]
Subject: [PATCH net-next v2 1/4] net: dsa: add get_pause_stats support

Add support for pause stats

Signed-off-by: Oleksij Rempel <[email protected]>
Reviewed-by: Vladimir Oltean <[email protected]>
---
include/net/dsa.h | 2 ++
net/dsa/slave.c | 11 +++++++++++
2 files changed, 13 insertions(+)

diff --git a/include/net/dsa.h b/include/net/dsa.h
index 33283eeda697..ea7bf007f34f 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -895,6 +895,8 @@ struct dsa_switch_ops {
const struct ethtool_rmon_hist_range **ranges);
void (*get_stats64)(struct dsa_switch *ds, int port,
struct rtnl_link_stats64 *s);
+ void (*get_pause_stats)(struct dsa_switch *ds, int port,
+ struct ethtool_pause_stats *pause_stats);
void (*self_test)(struct dsa_switch *ds, int port,
struct ethtool_test *etest, u64 *data);

diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 760ca58307a3..ad6a6663feeb 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1109,6 +1109,16 @@ static int dsa_slave_set_link_ksettings(struct net_device *dev,
return phylink_ethtool_ksettings_set(dp->pl, cmd);
}

+static void dsa_slave_get_pause_stats(struct net_device *dev,
+ struct ethtool_pause_stats *pause_stats)
+{
+ struct dsa_port *dp = dsa_slave_to_port(dev);
+ struct dsa_switch *ds = dp->ds;
+
+ if (ds->ops->get_pause_stats)
+ ds->ops->get_pause_stats(ds, dp->index, pause_stats);
+}
+
static void dsa_slave_get_pauseparam(struct net_device *dev,
struct ethtool_pauseparam *pause)
{
@@ -2100,6 +2110,7 @@ static const struct ethtool_ops dsa_slave_ethtool_ops = {
.get_eee = dsa_slave_get_eee,
.get_link_ksettings = dsa_slave_get_link_ksettings,
.set_link_ksettings = dsa_slave_set_link_ksettings,
+ .get_pause_stats = dsa_slave_get_pause_stats,
.get_pauseparam = dsa_slave_get_pauseparam,
.set_pauseparam = dsa_slave_set_pauseparam,
.get_rxnfc = dsa_slave_get_rxnfc,
--
2.30.2

2022-06-28 15:12:29

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH net-next v2 1/4] net: dsa: add get_pause_stats support



On 6/28/2022 1:51 AM, Oleksij Rempel wrote:
> Add support for pause stats
>
> Signed-off-by: Oleksij Rempel <[email protected]>
> Reviewed-by: Vladimir Oltean <[email protected]>

Reviewed-by: Florian Fainelli <[email protected]>
--
Florian

2022-06-30 04:11:00

by patchwork-bot+netdevbpf

[permalink] [raw]
Subject: Re: [PATCH net-next v2 0/4] net: dsa: add pause stats support

Hello:

This series was applied to netdev/net-next.git (master)
by Jakub Kicinski <[email protected]>:

On Tue, 28 Jun 2022 10:51:51 +0200 you wrote:
> changes v2:
> - add Reviewed-by: Vladimir Oltean <[email protected]>
> - remove packet calculation fix from ar9331 patch. It needs more fixes.
> - add packet calculation fix for microchip
>
> Oleksij Rempel (4):
> net: dsa: add get_pause_stats support
> net: dsa: ar9331: add support for pause stats
> net: dsa: microchip: add pause stats support
> net: dsa: microchip: count pause packets together will all other
> packets
>
> [...]

Here is the summary with links:
- [net-next,v2,1/4] net: dsa: add get_pause_stats support
https://git.kernel.org/netdev/net-next/c/3d410403a572
- [net-next,v2,2/4] net: dsa: ar9331: add support for pause stats
https://git.kernel.org/netdev/net-next/c/ea294f39b438
- [net-next,v2,3/4] net: dsa: microchip: add pause stats support
https://git.kernel.org/netdev/net-next/c/c4748ff6566b
- [net-next,v2,4/4] net: dsa: microchip: count pause packets together will all other packets
https://git.kernel.org/netdev/net-next/c/961d6c70d886

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html