]> git.dujemihanovic.xyz Git - linux.git/commitdiff
ionic: debug line for Tx completion errors
authorShannon Nelson <shannon.nelson@amd.com>
Fri, 6 Sep 2024 23:26:17 +0000 (16:26 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 10 Sep 2024 02:18:14 +0000 (19:18 -0700)
Here's a little debugging aid in case the device starts throwing
Tx completion errors.

Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Link: https://patch.msgid.link/20240906232623.39651-2-brett.creeley@amd.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/pensando/ionic/ionic_txrx.c

index fc79baad45614994fd775e94c10eea7af37cec28..ccdc0eefabe40bea5bd6260ef791cb5ab8de7415 100644 (file)
@@ -648,7 +648,14 @@ static void ionic_rx_clean(struct ionic_queue *q,
 
        stats = q_to_rx_stats(q);
 
-       if (comp->status) {
+       if (unlikely(comp->status)) {
+               /* Most likely status==2 and the pkt received was bigger
+                * than the buffer available: comp->len will show the
+                * pkt size received that didn't fit the advertised desc.len
+                */
+               dev_dbg(q->dev, "q%d drop comp->status %d comp->len %d desc->len %d\n",
+                       q->index, comp->status, comp->len, q->rxq[q->head_idx].len);
+
                stats->dropped++;
                return;
        }