* [PATCH iwl-next] ixgbe: remove ixgbe_ping_all_vfs() from link state change handlers
@ 2026-09-15 12:55 Aleksandr Loktionov
2026-09-17 7:30 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Aleksandr Loktionov @ 2026-09-15 12:55 UTC (permalink / raw)
To: intel-wired-lan, anthony.l.nguyen, aleksandr.loktionov; +Cc: netdev
When multiple VFs are brought up simultaneously, a VF can receive a CTS
(Clear To Send) mailbox message instead of the expected RESET | (N)ACK
response, because the watchdog fires a gratuitous ping right as the VF
mailbox transaction is in progress.
Remove the ixgbe_ping_all_vfs() call from both ixgbe_watchdog_link_is_up()
and ixgbe_watchdog_link_is_down(). Both paths contain an identical call
with the same race window during VF initialization: link-state changes
(up or down) can arrive while VFs are mid-initialization, and the
gratuitous ping from either direction collides with the VF mailbox state
machine for the same reason.
Link-state changes are already communicated to VFs through the normal
mailbox protocol; these extra pings are redundant on both paths.
This removes the last two callers of ixgbe_ping_all_vfs(), so remove
the now-unused function and its declaration as well.
Suggested-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 ------
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 14 --------------
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h | 1 -
3 files changed, 21 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index 8d3627c..d816aa1 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -8195,9 +8195,6 @@ static void ixgbe_watchdog_link_is_up(struct ixgbe_adapter *adapter)
/* update the default user priority for VFs */
ixgbe_update_default_up(adapter);
-
- /* ping all the active vfs to let them know link has changed */
- ixgbe_ping_all_vfs(adapter);
}
/**
@@ -8228,9 +8225,6 @@ static void ixgbe_watchdog_link_is_down(struct ixgbe_adapter *adapter)
e_info(drv, "NIC Link is Down\n");
netif_carrier_off(netdev);
-
- /* ping all the active vfs to let them know link has changed */
- ixgbe_ping_all_vfs(adapter);
}
static bool ixgbe_ring_tx_pending(struct ixgbe_adapter *adapter)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 431d77d..da641e9 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -1515,20 +1515,6 @@ static inline void ixgbe_ping_vf(struct ixgbe_adapter *adapter, int vf)
ixgbe_write_mbx(hw, &ping, 1, vf);
}
-void ixgbe_ping_all_vfs(struct ixgbe_adapter *adapter)
-{
- struct ixgbe_hw *hw = &adapter->hw;
- u32 ping;
- int i;
-
- for (i = 0 ; i < adapter->num_vfs; i++) {
- ping = IXGBE_PF_CONTROL_MSG;
- if (adapter->vfinfo[i].clear_to_send)
- ping |= IXGBE_VT_MSGTYPE_CTS;
- ixgbe_write_mbx(hw, &ping, 1, i);
- }
-}
-
/**
* ixgbe_set_all_vfs - update vfs queues
* @adapter: Pointer to adapter struct
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
index bc4cab9..f755bfd 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h
@@ -18,7 +18,6 @@ void ixgbe_restore_vf_multicasts(struct ixgbe_adapter *adapter);
bool ixgbe_check_mdd_event(struct ixgbe_adapter *adapter);
void ixgbe_msg_task(struct ixgbe_adapter *adapter);
int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask);
-void ixgbe_ping_all_vfs(struct ixgbe_adapter *adapter);
void ixgbe_set_all_vfs(struct ixgbe_adapter *adapter);
int ixgbe_ndo_set_vf_mac(struct net_device *netdev, int queue, u8 *mac);
int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int queue, u16 vlan,
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH iwl-next] ixgbe: remove ixgbe_ping_all_vfs() from link state change handlers
2026-09-15 12:55 [PATCH iwl-next] ixgbe: remove ixgbe_ping_all_vfs() from link state change handlers Aleksandr Loktionov
@ 2026-09-17 7:30 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2026-09-17 7:30 UTC (permalink / raw)
To: Aleksandr Loktionov; +Cc: intel-wired-lan, anthony.l.nguyen, netdev
On Tue, Sep 15, 2026 at 02:55:47PM +0200, Aleksandr Loktionov wrote:
> When multiple VFs are brought up simultaneously, a VF can receive a CTS
> (Clear To Send) mailbox message instead of the expected RESET | (N)ACK
> response, because the watchdog fires a gratuitous ping right as the VF
> mailbox transaction is in progress.
>
> Remove the ixgbe_ping_all_vfs() call from both ixgbe_watchdog_link_is_up()
> and ixgbe_watchdog_link_is_down(). Both paths contain an identical call
> with the same race window during VF initialization: link-state changes
> (up or down) can arrive while VFs are mid-initialization, and the
> gratuitous ping from either direction collides with the VF mailbox state
> machine for the same reason.
>
> Link-state changes are already communicated to VFs through the normal
> mailbox protocol; these extra pings are redundant on both paths.
Thanks for including the paragraph above. It was very helpful.
>
> This removes the last two callers of ixgbe_ping_all_vfs(), so remove
> the now-unused function and its declaration as well.
>
> Suggested-by: Sebastian Basierski <sebastianx.basierski@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-17 7:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 12:55 [PATCH iwl-next] ixgbe: remove ixgbe_ping_all_vfs() from link state change handlers Aleksandr Loktionov
2026-09-17 7:30 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox