* [PATCH iwl-next 0/3] igb: Align the flow-control behaviour with ethtool's specs
@ 2026-11-21 10:36 Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 1/3] igb: don't change the pause config when changing the link ksettings Maxime Chevallier
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Maxime Chevallier @ 2026-11-21 10:36 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, matttbe,
intel-wired-lan, netdev, thomas.petazzoni
Hi,
This series makes a few changes in IGB's ethtool flow-control
configuration to align it with the ethtool expectations.
This was found while upgrading the board farm that runs the stmmac netdev
CI tests. I've upgraded the HW and I'm now using a bunch of I350-T4 PCIe
cards (running igb) as peers for my tests. Since then, the flow-control
tests have started failing:
https://netdevci.bootlin.com/stmmac/outputs/920328-bootlin-stmmac-sun7i-a20/test-outputs/18-pause-py/stdout
This shows 2 things. First, the Pause test is weak to the test peer not
behaving as expected, but we can't do much but assume that kselftest
peers can be trusted.
Second, the igb driver doesn't behave as we expect w.r.t pause:
- It overrides the pause configuration when we toggle link autoneg
- It doesn't take the FC user intent (rx on/off tx on/off) into account
when pause aneg in on,
- It advertises Pause + Asym when we have "rx on tx on", where it
should be just Pause (it's not an asym config).
This series addresses that in igb. I think e100e and igc have the same
class of issues, but I don't have any HW to test that on.
Also, this behaviour has been in igb for quite a while (2008 it seems
?) and this is a user-visible change so it may just be too late for
these patches to land, I'll let the Intel folks decide on that, anyways
I'll have these 3 patches running locally in the stmmac farm.
Thanks,
Maxime
Maxime Chevallier (3):
igb: don't change the pause config when changing the link ksettings
igb: take the user intent into account when pause autoneg is on
igb: advertise symmetric pause only for full flow control
drivers/net/ethernet/intel/igb/e1000_phy.c | 3 ++-
drivers/net/ethernet/intel/igb/igb_ethtool.c | 21 +++++++++-----------
2 files changed, 11 insertions(+), 13 deletions(-)
--
2.56.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH iwl-next 1/3] igb: don't change the pause config when changing the link ksettings
2026-11-21 10:36 [PATCH iwl-next 0/3] igb: Align the flow-control behaviour with ethtool's specs Maxime Chevallier
@ 2026-11-21 10:36 ` Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 2/3] igb: take the user intent into account when pause autoneg is on Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 3/3] igb: advertise symmetric pause only for full flow control Maxime Chevallier
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Chevallier @ 2026-11-21 10:36 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, matttbe,
intel-wired-lan, netdev, thomas.petazzoni
When enabling link autoneg, or changing any setting while link autoneg
is on, the flow control configuration is reset to the e1000_fc_default
mode.
Flow-control config should be changed through the .set_pauseparams()
ops, let the configuration as-is in the .set_ksettings() path.
Tested on i350-T4 cards.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index ccc7302dc7bd..cfa36eab8b0a 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -322,8 +322,6 @@ static int igb_set_link_ksettings(struct net_device *netdev,
ADVERTISED_Autoneg;
}
advertising = hw->phy.autoneg_advertised;
- if (adapter->fc_autoneg)
- hw->fc.requested_mode = e1000_fc_default;
} else {
u32 speed = cmd->base.speed;
/* calling this overrides forced MDI setting */
--
2.56.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH iwl-next 2/3] igb: take the user intent into account when pause autoneg is on
2026-11-21 10:36 [PATCH iwl-next 0/3] igb: Align the flow-control behaviour with ethtool's specs Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 1/3] igb: don't change the pause config when changing the link ksettings Maxime Chevallier
@ 2026-11-21 10:36 ` Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 3/3] igb: advertise symmetric pause only for full flow control Maxime Chevallier
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Chevallier @ 2026-11-21 10:36 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, matttbe,
intel-wired-lan, netdev, thomas.petazzoni
Currently, the pause parameters on igb are set to the default value when
pause autoneg is enabled, regardless of the parameters supplied by the
user (i.e. it ignores the "rx on/off tx on/off" params when pause aneg
is on).
Let's take the user intent into account when enabling pause autoneg.
While at it, simplify the tests on tx/rx values.
Tested on i350-T4 cards.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/intel/igb/igb_ethtool.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index cfa36eab8b0a..03c69409a6f4 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -406,8 +406,16 @@ static int igb_set_pauseparam(struct net_device *netdev,
while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
usleep_range(1000, 2000);
+ if (pause->rx_pause && pause->tx_pause)
+ hw->fc.requested_mode = e1000_fc_full;
+ else if (pause->rx_pause)
+ hw->fc.requested_mode = e1000_fc_rx_pause;
+ else if (pause->tx_pause)
+ hw->fc.requested_mode = e1000_fc_tx_pause;
+ else
+ hw->fc.requested_mode = e1000_fc_none;
+
if (adapter->fc_autoneg == AUTONEG_ENABLE) {
- hw->fc.requested_mode = e1000_fc_default;
if (netif_running(adapter->netdev)) {
igb_down(adapter);
igb_up(adapter);
@@ -415,15 +423,6 @@ static int igb_set_pauseparam(struct net_device *netdev,
igb_reset(adapter);
}
} else {
- if (pause->rx_pause && pause->tx_pause)
- hw->fc.requested_mode = e1000_fc_full;
- else if (pause->rx_pause && !pause->tx_pause)
- hw->fc.requested_mode = e1000_fc_rx_pause;
- else if (!pause->rx_pause && pause->tx_pause)
- hw->fc.requested_mode = e1000_fc_tx_pause;
- else if (!pause->rx_pause && !pause->tx_pause)
- hw->fc.requested_mode = e1000_fc_none;
-
hw->fc.current_mode = hw->fc.requested_mode;
retval = ((hw->phy.media_type == e1000_media_type_copper) ?
--
2.56.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH iwl-next 3/3] igb: advertise symmetric pause only for full flow control
2026-11-21 10:36 [PATCH iwl-next 0/3] igb: Align the flow-control behaviour with ethtool's specs Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 1/3] igb: don't change the pause config when changing the link ksettings Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 2/3] igb: take the user intent into account when pause autoneg is on Maxime Chevallier
@ 2026-11-21 10:36 ` Maxime Chevallier
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Chevallier @ 2026-11-21 10:36 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel
Cc: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Willem de Bruijn, matttbe,
intel-wired-lan, netdev, thomas.petazzoni
When flow-control is "rx on, tx on", the "Pause" bit alone should be
advertised, as per te linkmode_set_pause() implementation, which follows
the 802.3 specs.
The Asym bit is for asymetric configs, such as "rx on tx off" or
"rx off tx on". Let's align with the specs and not advertise ASYM for
full flow control.
Tested on I350-T4 PCIe cards.
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
drivers/net/ethernet/intel/igb/e1000_phy.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c
index cd65008c7ef5..98dda73d507b 100644
--- a/drivers/net/ethernet/intel/igb/e1000_phy.c
+++ b/drivers/net/ethernet/intel/igb/e1000_phy.c
@@ -1043,7 +1043,8 @@ static s32 igb_phy_setup_autoneg(struct e1000_hw *hw)
/* Flow control (both RX and TX) is enabled by a software
* over-ride.
*/
- mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE);
+ mii_autoneg_adv_reg |= NWAY_AR_PAUSE;
+ mii_autoneg_adv_reg &= ~NWAY_AR_ASM_DIR;
break;
default:
hw_dbg("Flow control param set incorrectly\n");
--
2.56.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-21 10:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 10:36 [PATCH iwl-next 0/3] igb: Align the flow-control behaviour with ethtool's specs Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 1/3] igb: don't change the pause config when changing the link ksettings Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 2/3] igb: take the user intent into account when pause autoneg is on Maxime Chevallier
2026-11-21 10:36 ` [PATCH iwl-next 3/3] igb: advertise symmetric pause only for full flow control Maxime Chevallier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox