Skip to content

Commit 4a0ec34

Browse files
emuslnkuba-moo
authored andcommitted
ionic: debug line for Tx completion errors
Here's a little debugging aid in case the device starts throwing Tx completion errors. Signed-off-by: Shannon Nelson <[email protected]> Signed-off-by: Brett Creeley <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 760664b commit 4a0ec34

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,14 @@ static void ionic_rx_clean(struct ionic_queue *q,
648648

649649
stats = q_to_rx_stats(q);
650650

651-
if (comp->status) {
651+
if (unlikely(comp->status)) {
652+
/* Most likely status==2 and the pkt received was bigger
653+
* than the buffer available: comp->len will show the
654+
* pkt size received that didn't fit the advertised desc.len
655+
*/
656+
dev_dbg(q->dev, "q%d drop comp->status %d comp->len %d desc->len %d\n",
657+
q->index, comp->status, comp->len, q->rxq[q->head_idx].len);
658+
652659
stats->dropped++;
653660
return;
654661
}

0 commit comments

Comments
 (0)