* [PATCH net-next] eth: ionic: delete the incorrect link_down_count reporting
@ 2026-06-15 17:01 Jakub Kicinski
2026-06-15 17:14 ` Breno Leitao
0 siblings, 1 reply; 3+ messages in thread
From: Jakub Kicinski @ 2026-06-15 17:01 UTC (permalink / raw)
To: davem
Cc: netdev, edumazet, pabeni, andrew+netdev, horms, Jakub Kicinski,
brett.creeley, eric.joyner, leitao
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.
Link: https://lore.kernel.org/20260610061830.51037-1-eric.joyner@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: brett.creeley@amd.com
CC: eric.joyner@amd.com
CC: leitao@debian.org
---
drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
index 78a802eb159f..f7dcfe3d032d 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
@@ -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,
--
2.54.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] eth: ionic: delete the incorrect link_down_count reporting
2026-06-15 17:01 [PATCH net-next] eth: ionic: delete the incorrect link_down_count reporting Jakub Kicinski
@ 2026-06-15 17:14 ` Breno Leitao
2026-06-15 17:29 ` Creeley, Brett
0 siblings, 1 reply; 3+ messages in thread
From: Breno Leitao @ 2026-06-15 17:14 UTC (permalink / raw)
To: Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
brett.creeley, eric.joyner
On Mon, Jun 15, 2026 at 10:01:53AM -0700, Jakub Kicinski wrote:
> 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.
>
> Link: https://lore.kernel.org/20260610061830.51037-1-eric.joyner@amd.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Acked-by: Breno Leitao <leitao@debian.org>
CC: brett.creeley@amd.com
> CC: eric.joyner@amd.com
> CC: leitao@debian.org
> ---
> drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 10 ----------
> 1 file changed, 10 deletions(-)
>
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> index 78a802eb159f..f7dcfe3d032d 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
> @@ -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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] eth: ionic: delete the incorrect link_down_count reporting
2026-06-15 17:14 ` Breno Leitao
@ 2026-06-15 17:29 ` Creeley, Brett
0 siblings, 0 replies; 3+ messages in thread
From: Creeley, Brett @ 2026-06-15 17:29 UTC (permalink / raw)
To: Breno Leitao, Jakub Kicinski
Cc: davem, netdev, edumazet, pabeni, andrew+netdev, horms,
brett.creeley, eric.joyner
On 6/15/2026 10:14 AM, Breno Leitao wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> On Mon, Jun 15, 2026 at 10:01:53AM -0700, Jakub Kicinski wrote:
>> 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.
>>
>> Link: https://lore.kernel.org/20260610061830.51037-1-eric.joyner@amd.com
>> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Acked-by: Breno Leitao <leitao@debian.org>
>
> CC: brett.creeley@amd.com
>> CC: eric.joyner@amd.com
>> CC: leitao@debian.org
>> ---
>> drivers/net/ethernet/pensando/ionic/ionic_ethtool.c | 10 ----------
>> 1 file changed, 10 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
>> index 78a802eb159f..f7dcfe3d032d 100644
>> --- a/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
>> +++ b/drivers/net/ethernet/pensando/ionic/ionic_ethtool.c
>> @@ -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?
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/20260614205303.48088-5-eric.joyner@amd.com/.
Thanks,
Brett
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-15 17:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-15 17:01 [PATCH net-next] eth: ionic: delete the incorrect link_down_count reporting Jakub Kicinski
2026-06-15 17:14 ` Breno Leitao
2026-06-15 17:29 ` Creeley, Brett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox