eth: ionic: delete the incorrect link_down_count reporting
Subsystems (3)
Jakub Kicinski
maintainerPATCH 1/1 eth: ionic: delete the incorrect link_down_count reporting
The definition of the statistic is quite clear,
struct ethtool_link_ext_stats says:
This statistic counts when PHY _actually_ went down, or lost link.
Reportedly this is not how the device-counted stat on ionic behaves. The goal is to detect flapping links, due to bad cabling. ionic reportedly uses this for some firmware stat of how many times the traffic was stopped. This is _not_ what should be reported here.
---
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0 -10
@@ -111,15 +111,6 @@ static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs,memcpy_fromio (p + offset, idev->dev_cmd_regs->words, size); } -static void ionic_get_link_ext_stats (struct net_device *netdev, -struct ethtool_link_ext_stats *stats) -{ -struct ionic_lif *lif =netdev_priv (netdev); - -if (lif->ionic->pdev->is_physfn) - stats->link_down_events = lif->link_down_count; -} -static int ionic_get_link_ksettings (struct net_device *netdev,struct ethtool_link_ksettings *ks) {
@@ -1132,7 +1123,6 @@ static const struct ethtool_ops ionic_ethtool_ops = { .get_regs_len = ionic_get_regs_len, .get_regs = ionic_get_regs, .get_link = ethtool_op_get_link, - .get_link_ext_stats = ionic_get_link_ext_stats, .get_link_ksettings = ionic_get_link_ksettings, .set_link_ksettings = ionic_set_link_ksettings, .get_coalesce = ionic_get_coalesce,
Signature · 1 line
2.54.0
Quoted 5 lines · Jakub Kicinski
The definition of the statistic is quite clear,
structethtool_link_ext_statssays:This statistic counts when PHY _actually_ went down, or lost link.
Quoted 7 lines
Reportedly this is not how the device-counted stat on ionic behaves. The goal is to detect flapping links, due to bad cabling. ionic reportedly uses this for some firmware stat of how many times the traffic was stopped. This is _not_ what should be reported here.
Quoted 11 lines
--- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0
-0
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs, · line 120
Quoted 10 lines
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0
-7@@ -111,15 +111,6 @@ static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs,memcpy_fromio (p + offset, idev->dev_cmd_regs->words, size); } -static void ionic_get_link_ext_stats (struct net_device *netdev, -struct ethtool_link_ext_stats *stats) -{ -struct ionic_lif *lif =netdev_priv (netdev); - -if (lif->ionic->pdev->is_physfn) - stats->link_down_events = lif->link_down_count;
It seems this is the only place where link_down_count is read. Maybe you want to kill it as well?
Quoted 33 lines · Breno Leitao
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
Quoted 5 lines · Jakub Kicinski
The definition of the statistic is quite clear,
structethtool_link_ext_statssays:This statistic counts when PHY _actually_ went down, or lost link.
Quoted 7 lines
Reportedly this is not how the device-counted stat on ionic behaves. The goal is to detect flapping links, due to bad cabling. ionic reportedly uses this for some firmware stat of how many times the traffic was stopped. This is _not_ what should be reported here.
Acked-by Breno Leitao <[email protected]>Quoted 14 lines
--- drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0
-0@@ -111,15 +111,6 @@ static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs,memcpy_fromio (p + offset, idev->dev_cmd_regs->words, size); }
Quoted 9 lines
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs, · line 120
Quoted 7 lines
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0
-7-static void ionic_get_link_ext_stats (struct net_device *netdev, -struct ethtool_link_ext_stats *stats) -{ -struct ionic_lif *lif =netdev_priv (netdev); - -if (lif->ionic->pdev->is_physfn) - stats->link_down_events = lif->link_down_count;It seems this is the only place where
link_down_countis read. Maybe you want to kill it as well?
It still shows in debugfs, but we'd be fine with it being removed completely in favor of the correct implementation from Eric at: https://lore.kernel.org/netdev/[email protected]/.
Thanks,
Brett
Jakub Kicinski
maintainerQuoted 13 lines · Brett
Quoted 12 lines
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c static void ionic_get_regs(struct net_device *netdev, struct ethtool_regs *regs, · line 120
Quoted 10 lines
memcpy_fromio(p + offset, idev->dev_cmd_regs->words, size);}
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c +0
-7-static void ionic_get_link_ext_stats (struct net_device *netdev, -struct ethtool_link_ext_stats *stats) -{ -struct ionic_lif *lif =netdev_priv (netdev); - -if (lif->ionic->pdev->is_physfn) - stats->link_down_events = lif->link_down_count;It seems this is the only place where
link_down_countis read. Maybe you want to kill it as well?
Quoted 3 lines
It still shows in debugfs, but we'd be fine with it being removed completely in favor of the correct implementation from Eric at:
https://lore.kernel.org/netdev/[email protected]/.
TBH I missed that Eric posted v5 already and assumed he won't make it before net-next is closed. Sorry for the noise...
Signature · 1 line
pw-bot: reject