ionic: Prevent tx_timeout due to frequent doorbell ringing
Subsystems (4)
Brett Creeley
maintainerPATCH v2 1/1 ionic: Prevent tx_timeout due to frequent doorbell ringing
With recent work to the doorbell workaround code a small hole was introduced that could cause a tx_timeout. This happens if the rx dbell_deadline goes beyond the netdev watchdog timeout set by the driver (i.e. 2 seconds). Fix this by changing the netdev watchdog timeout to 5 seconds and reduce the max rx dbell_deadline to 4 seconds.
The test that can reproduce the issue being fixed is a multi-queue send test via pktgen with the "burst" setting to 1. This causes the queue's doorbell to be rung on every packet sent to the driver, which may result in the device missing doorbells due to the high doorbell rate.
---
v2:
- Drop budget == 0 patch to expedite getting this patch merged due to the budget == 0 patch being more complicated than we originally thought.
v1:
- https://lore.kernel.org/netdev/[email protected]/
drivers/net/ethernet/pensando/ionic/ionic_dev.h | 2 +- drivers/net/ethernet/pensando/ionic/ionic_lif.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/pensando/ionic/ionic_dev.h +1 -1
@@ -32,7 +32,7 @@#define IONIC_ADMIN_DOORBELL_DEADLINE (HZ / 2)/* 500ms */ #define IONIC_TX_DOORBELL_DEADLINE (HZ / 100)/* 10ms */ #define IONIC_RX_MIN_DOORBELL_DEADLINE (HZ / 100)/* 10ms */ -#define IONIC_RX_MAX_DOORBELL_DEADLINE (HZ * 5)/* 5s */ +#define IONIC_RX_MAX_DOORBELL_DEADLINE (HZ * 4)/* 4s */ struct ionic_dev_bar {void __iomem *vaddr;
drivers/net/ethernet/pensando/ionic/ionic_lif.c +1 -1
@@ -3220,7 +3220,7 @@ int ionic_lif_alloc(struct ionic *ionic) netdev->netdev_ops = &ionic_netdev_ops;ionic_ethtool_set_ops (netdev); - netdev->watchdog_timeo =2 *HZ ; + netdev->watchdog_timeo =5 *HZ ;netif_carrier_off (netdev); lif->identity = lid;
Signature · 1 line
2.17.1
This patch was applied to netdev/net.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <[email protected]>:
Quoted 6 lines · On Thu, 22 Aug 2024 12:25:57 -0700 you wrote:
With recent work to the doorbell workaround code a small hole was introduced that could cause a
tx_timeout. This happens if the rxdbell_deadlinegoes beyond the netdev watchdog timeout set by the driver (i.e. 2 seconds). Fix this by changing the netdev watchdog timeout to 5 seconds and reduce the max rxdbell_deadlineto 4 seconds.
Quoted 6 lines
The test that can reproduce the issue being fixed is a multi-queue send test via pktgen with the "burst" setting to 1. This causes the queue's doorbell to be rung on every packet sent to the driver, which may result in the device missing doorbells due to the high doorbell rate.
[...]
Here is the summary with links:
- [net,v2] ionic: Prevent tx_timeout due to frequent doorbell ringing
https://git.kernel.org/netdev/net/c/4786fe29f5a0
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html