]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ionic: Prevent tx_timeout due to frequent doorbell ringing
authorBrett Creeley <brett.creeley@amd.com>
Thu, 22 Aug 2024 19:25:57 +0000 (12:25 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 27 Aug 2024 11:22:42 +0000 (13:22 +0200)
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: 4ded136c78f8 ("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>
drivers/net/ethernet/pensando/ionic/ionic_dev.h
drivers/net/ethernet/pensando/ionic/ionic_lif.c

index c647033f3ad2960185fe2992a6a30f6dc2e9721b..f2f07bf885456001546dece4c9823f66e6d1fd9c 100644 (file)
@@ -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;
index aa0cc31dfe6e6f20a9d14b819c28e1a0e4fd5f50..86774d9922d84dedefeb0b2cbe666efe690e98e4 100644 (file)
@@ -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;