Skip to content
Snippets Groups Projects
Commit 8497303e authored by Aastha Mehta's avatar Aastha Mehta
Browse files

debug prints to track bnx2x_tx_free_pkts panic

parent 0b31cd13
No related branches found
No related tags found
No related merge requests found
......@@ -218,6 +218,11 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
int nbd;
u16 split_bd_len = 0;
#if CONFIG_XEN_SME
int orig_nbd;
u16 orig_first_bd_idx;
#endif
/* prefetch skb end pointer to speedup dev_kfree_skb() */
prefetch(&skb->end);
......@@ -227,6 +232,10 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
tx_start_bd = &txdata->tx_desc_ring[bd_idx].start_bd;
nbd = le16_to_cpu(tx_start_bd->nbd) - 1;
#if CONFIG_XEN_SME
orig_nbd = nbd;
orig_first_bd_idx = bd_idx;
#endif
#ifdef BNX2X_STOP_ON_ERROR
if ((nbd - 1) > (MAX_SKB_FRAGS + 2)) {
BNX2X_ERR("BAD nbd!\n");
......@@ -272,6 +281,16 @@ static u16 bnx2x_free_tx_pkt(struct bnx2x *bp, struct bnx2x_fp_txdata *txdata,
}
/* release skb */
#if CONFIG_XEN_SME
if (!skb) {
BNX2X_ERR("NULL SKB TXQ[%d] idx %d nbd %d => %d bd_idx %d => %d\n"
"bd_prod %u pkt_prod %u bd_cons %u pkt_cons %u hw_cons %u"
, txdata->txq_index, idx, orig_nbd, nbd, orig_first_bd_idx, bd_idx
, txdata->tx_bd_prod, txdata->tx_pkt_prod, txdata->tx_bd_cons
, txdata->tx_pkt_cons, le16_to_cpu(*txdata->tx_cons_sb)
);
}
#endif
WARN_ON(!skb);
if (likely(skb)) {
(*pkts_compl)++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment