drivers/net/ethernet/stmicro/stmmac/common.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
All references to tx_underflow_irq are misspelled as 'undeflow'. Fix them.
Signed-off-by: Jakub Raczynski <j.raczynski@samsung.com>
---
drivers/net/ethernet/stmicro/stmmac/common.h | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h
index d26e8a063022..e7da9964854d 100644
--- a/drivers/net/ethernet/stmicro/stmmac/common.h
+++ b/drivers/net/ethernet/stmicro/stmmac/common.h
@@ -147,7 +147,7 @@ struct stmmac_extra_stats {
unsigned long rx_vlan;
unsigned long rx_split_hdr_pkt_n;
/* Tx/Rx IRQ error info */
- unsigned long tx_undeflow_irq;
+ unsigned long tx_underflow_irq;
unsigned long tx_process_stopped_irq;
unsigned long tx_jabber_irq;
unsigned long rx_overflow_irq;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
index 815213223583..068c21f37c29 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
@@ -247,7 +247,7 @@ static int loongson_dwmac_dma_interrupt(struct stmmac_priv *priv,
if (unlikely(abnor_intr_status)) {
if (unlikely(intr_status & DMA_STATUS_UNF)) {
ret = tx_hard_error_bump_tc;
- x->tx_undeflow_irq++;
+ x->tx_underflow_irq++;
}
if (unlikely(intr_status & DMA_STATUS_TJT))
x->tx_jabber_irq++;
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index c01b86fd64da..a73720811791 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -459,7 +459,7 @@ static int sun8i_dwmac_dma_interrupt(struct stmmac_priv *priv,
if (v & EMAC_TX_UNDERFLOW_INT) {
ret |= tx_hard_error;
- x->tx_undeflow_irq++;
+ x->tx_underflow_irq++;
}
if (v & EMAC_TX_EARLY_INT)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
index a0383f9486c2..79fe50ad33d1 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_lib.c
@@ -182,7 +182,7 @@ int dwmac_dma_interrupt(struct stmmac_priv *priv, void __iomem *ioaddr,
if (unlikely(intr_status & DMA_STATUS_AIS)) {
if (unlikely(intr_status & DMA_STATUS_UNF)) {
ret = tx_hard_error_bump_tc;
- x->tx_undeflow_irq++;
+ x->tx_underflow_irq++;
}
if (unlikely(intr_status & DMA_STATUS_TJT))
x->tx_jabber_irq++;
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index c1e26965d9b5..df092fb354ed 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -78,7 +78,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
STMMAC_STAT(rx_vlan),
STMMAC_STAT(rx_split_hdr_pkt_n),
/* Tx/Rx IRQ error info */
- STMMAC_STAT(tx_undeflow_irq),
+ STMMAC_STAT(tx_underflow_irq),
STMMAC_STAT(tx_process_stopped_irq),
STMMAC_STAT(tx_jabber_irq),
STMMAC_STAT(rx_overflow_irq),
--
2.34.1
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> @@ -78,7 +78,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
> STMMAC_STAT(rx_vlan),
> STMMAC_STAT(rx_split_hdr_pkt_n),
> /* Tx/Rx IRQ error info */
> - STMMAC_STAT(tx_undeflow_irq),
> + STMMAC_STAT(tx_underflow_irq),
Please take another look at this one and think about it.
Andrew
---
pw-bot: cr
On Tue, Apr 21, 2026 at 02:39:15PM +0200, Andrew Lunn wrote:
> > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
> > @@ -78,7 +78,7 @@ static const struct stmmac_stats stmmac_gstrings_stats[] = {
> > STMMAC_STAT(rx_vlan),
> > STMMAC_STAT(rx_split_hdr_pkt_n),
> > /* Tx/Rx IRQ error info */
> > - STMMAC_STAT(tx_undeflow_irq),
> > + STMMAC_STAT(tx_underflow_irq),
>
> Please take another look at this one and think about it.
>
> Andrew
>
> ---
> pw-bot: cr
>
I don't see anything wrong with it?
- naming is correct, same as stmmac_extra_stats from common.h, as it
wouldn't compile otherwise
- string length is ok, as max name length is ETH_GSTRING_LEN=32 and it is
not close
- ethtool just polls data from driver and in my tests it is ok
- all instances of 'undeflow' are changed
- 'underflow' semantic is ok, 'undeflow' is just not correct
Please correct me if I am wrong, but imo no issues with this patch.
Regards
Jakub Raczynski
> I don't see anything wrong with it?
> - naming is correct, same as stmmac_extra_stats from common.h, as it
> wouldn't compile otherwise
> - string length is ok, as max name length is ETH_GSTRING_LEN=32 and it is
> not close
> - ethtool just polls data from driver and in my tests it is ok
> - all instances of 'undeflow' are changed
> - 'underflow' semantic is ok, 'undeflow' is just not correct
>
> Please correct me if I am wrong, but imo no issues with this patch.
ABI
This name is published as part of the kAPI. You are changing its
name. User space could be looking for this name, even thought it has a
typo in it.
Andrew
On Wed, Apr 22, 2026 at 02:47:38PM +0200, Andrew Lunn wrote: > > I don't see anything wrong with it? > > - naming is correct, same as stmmac_extra_stats from common.h, as it > > wouldn't compile otherwise > > - string length is ok, as max name length is ETH_GSTRING_LEN=32 and it is > > not close > > - ethtool just polls data from driver and in my tests it is ok > > - all instances of 'undeflow' are changed > > - 'underflow' semantic is ok, 'undeflow' is just not correct > > > > Please correct me if I am wrong, but imo no issues with this patch. > > ABI > > This name is published as part of the kAPI. You are changing its > name. User space could be looking for this name, even thought it has a > typo in it. > > Andrew > I don't think it is? This part of extra stats (struct stmmac_extra_stats) and is not part of standard ABI from Documentation/ABI/testing/sysfs-class-net-statistics nor is mentioned in Documentation/networking/device_drivers/ethernet/stmicro/stmmac.rst These extra stats are specific to stmmac driver and most of these are more than standard https://www.kernel.org/doc/html/v7.0/networking/statistics.html#c.rtnl_link_stats64 This name does not exist outside stmmac driver, so while some application may expect this (stmmac specific app), question is should this typo stick? This type of typo is even mentioned in scripts/spelling.txt. Regards Jakub Raczynski
On Wed, Apr 22, 2026 at 04:15:37PM +0200, Jakub Raczynski wrote:
> On Wed, Apr 22, 2026 at 02:47:38PM +0200, Andrew Lunn wrote:
> > > I don't see anything wrong with it?
> > > - naming is correct, same as stmmac_extra_stats from common.h, as it
> > > wouldn't compile otherwise
> > > - string length is ok, as max name length is ETH_GSTRING_LEN=32 and it is
> > > not close
> > > - ethtool just polls data from driver and in my tests it is ok
> > > - all instances of 'undeflow' are changed
> > > - 'underflow' semantic is ok, 'undeflow' is just not correct
> > >
> > > Please correct me if I am wrong, but imo no issues with this patch.
> >
> > ABI
> >
> > This name is published as part of the kAPI. You are changing its
> > name. User space could be looking for this name, even thought it has a
> > typo in it.
> >
> > Andrew
> >
> I don't think it is? This part of extra stats (struct stmmac_extra_stats) and
> is not part of standard ABI from
> Documentation/ABI/testing/sysfs-class-net-statistics
> nor is mentioned in
> Documentation/networking/device_drivers/ethernet/stmicro/stmmac.rst
>
> These extra stats are specific to stmmac driver and most of these are more
> than standard
> https://www.kernel.org/doc/html/v7.0/networking/statistics.html#c.rtnl_link_stats64
> This name does not exist outside stmmac driver, so while some application may
> expect this (stmmac specific app), question is should this typo stick?
47dd7a540b8a0 drivers/net/stmmac/stmmac_ethtool.c (Giuseppe Cavallaro 2009-10-14 15:13:45 -0700 81) STMMAC_STAT(tx_undeflow_irq),
It has been exposed to user space for 17 years. In that time, there
could well be stmmac specific apps using it.
Just because it is not documented as ABI does not make it not ABI.
Andrew
On Wed, Apr 22, 2026 at 06:15:20PM +0200, Andrew Lunn wrote: > On Wed, Apr 22, 2026 at 04:15:37PM +0200, Jakub Raczynski wrote: > > On Wed, Apr 22, 2026 at 02:47:38PM +0200, Andrew Lunn wrote: > > > > I don't see anything wrong with it? > > > > - naming is correct, same as stmmac_extra_stats from common.h, as it > > > > wouldn't compile otherwise > > > > - string length is ok, as max name length is ETH_GSTRING_LEN=32 and it is > > > > not close > > > > - ethtool just polls data from driver and in my tests it is ok > > > > - all instances of 'undeflow' are changed > > > > - 'underflow' semantic is ok, 'undeflow' is just not correct > > > > > > > > Please correct me if I am wrong, but imo no issues with this patch. > > > > > > ABI > > > > > > This name is published as part of the kAPI. You are changing its > > > name. User space could be looking for this name, even thought it has a > > > typo in it. > > > > > > Andrew > > > > > I don't think it is? This part of extra stats (struct stmmac_extra_stats) and > > is not part of standard ABI from > > Documentation/ABI/testing/sysfs-class-net-statistics > > nor is mentioned in > > Documentation/networking/device_drivers/ethernet/stmicro/stmmac.rst > > > > These extra stats are specific to stmmac driver and most of these are more > > than standard > > https://www.kernel.org/doc/html/v7.0/networking/statistics.html#c.rtnl_link_stats64 > > This name does not exist outside stmmac driver, so while some application may > > expect this (stmmac specific app), question is should this typo stick? > > 47dd7a540b8a0 drivers/net/stmmac/stmmac_ethtool.c (Giuseppe Cavallaro 2009-10-14 15:13:45 -0700 81) STMMAC_STAT(tx_undeflow_irq), > > It has been exposed to user space for 17 years. In that time, there > could well be stmmac specific apps using it. > > Just because it is not documented as ABI does not make it not ABI. > > Andrew > Sure, up to you whether NAK or ACK this change. IMO this name is specific to stmmac and should not be part of any app, as monitoring tools should be more universal. When monitoring interface this field will show some other way, via dropped packets and then you would use driver specific fields for debugging. Problem is, quick search on github shows this change propagated through hundreds of Linux forks or different RTOS. But no public app using this found, at least C app (but well, I didn't browse everything for obvious reasons). Funny how typo will live everywhere and not be fixed. So this change would make it differ from all the forks/RTOS'es that will probably never fix this. So thats the downside. Question is whether this should then remain that way forever? And was it really part of some ABI if no one noticed? Regards Jakub Raczynski
> Question is whether this should then remain that way forever?
> And was it really part of some ABI if no one noticed?
Hard to say. I could also be that people did notice, but after it got
released in a kernel, which makes it ABI. It can be very hard to fix
these issues, if you don't catch them in -rcX kernels.
The other patches in this series look O.K, please drop this one and
repost once net-next is open.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew
© 2016 - 2026 Red Hat, Inc.