Skip to content

Commit 4786fe2

Browse files
brettcreeleyPaolo Abeni
authored andcommitted
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. Cc: stable@vger.kernel.org Fixes: 4ded136 ("ionic: add work item for missed-doorbell check") Signed-off-by: Brett Creeley <brett.creeley@amd.com> Reviewed-by: Shannon Nelson <shannon.nelson@amd.com> Link: https://patch.msgid.link/20240822192557.9089-1-brett.creeley@amd.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent e846be0 commit 4786fe2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/pensando/ionic/ionic_dev.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#define IONIC_ADMIN_DOORBELL_DEADLINE (HZ / 2) /* 500ms */
3333
#define IONIC_TX_DOORBELL_DEADLINE (HZ / 100) /* 10ms */
3434
#define IONIC_RX_MIN_DOORBELL_DEADLINE (HZ / 100) /* 10ms */
35-
#define IONIC_RX_MAX_DOORBELL_DEADLINE (HZ * 5) /* 5s */
35+
#define IONIC_RX_MAX_DOORBELL_DEADLINE (HZ * 4) /* 4s */
3636

3737
struct ionic_dev_bar {
3838
void __iomem *vaddr;

drivers/net/ethernet/pensando/ionic/ionic_lif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3220,7 +3220,7 @@ int ionic_lif_alloc(struct ionic *ionic)
32203220
netdev->netdev_ops = &ionic_netdev_ops;
32213221
ionic_ethtool_set_ops(netdev);
32223222

3223-
netdev->watchdog_timeo = 2 * HZ;
3223+
netdev->watchdog_timeo = 5 * HZ;
32243224
netif_carrier_off(netdev);
32253225

32263226
lif->identity = lid;

0 commit comments

Comments
 (0)