Commit 4786fe29 authored by Brett Creeley's avatar Brett Creeley Committed by Paolo Abeni

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: 4ded136c ("ionic: add work item for missed-doorbell check")
Signed-off-by: default avatarBrett Creeley <brett.creeley@amd.com>
Reviewed-by: default avatarShannon Nelson <shannon.nelson@amd.com>
Link: https://patch.msgid.link/20240822192557.9089-1-brett.creeley@amd.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent e846be0f
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#define IONIC_ADMIN_DOORBELL_DEADLINE (HZ / 2) /* 500ms */ #define IONIC_ADMIN_DOORBELL_DEADLINE (HZ / 2) /* 500ms */
#define IONIC_TX_DOORBELL_DEADLINE (HZ / 100) /* 10ms */ #define IONIC_TX_DOORBELL_DEADLINE (HZ / 100) /* 10ms */
#define IONIC_RX_MIN_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 { struct ionic_dev_bar {
void __iomem *vaddr; void __iomem *vaddr;
......
...@@ -3220,7 +3220,7 @@ int ionic_lif_alloc(struct ionic *ionic) ...@@ -3220,7 +3220,7 @@ int ionic_lif_alloc(struct ionic *ionic)
netdev->netdev_ops = &ionic_netdev_ops; netdev->netdev_ops = &ionic_netdev_ops;
ionic_ethtool_set_ops(netdev); ionic_ethtool_set_ops(netdev);
netdev->watchdog_timeo = 2 * HZ; netdev->watchdog_timeo = 5 * HZ;
netif_carrier_off(netdev); netif_carrier_off(netdev);
lif->identity = lid; lif->identity = lid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment