Commit 1e9d8e7a authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

tg3: Be drop monitor friendly

tg3_tx() does the normal packet TX completion,
tigon3_dma_hwbug_workaround() and tg3_tso_bug() both need to allocate a
new SKB that is suitable to workaround HW bugs, and finally
tg3_free_rings() is doing ring cleanup. Use dev_consume_skb_any() for
these 3 locations to be SKB drop monitor friendly.
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Acked-by: default avatarMichael Chan <michael.chan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 45c7ec9d
...@@ -6587,7 +6587,7 @@ static void tg3_tx(struct tg3_napi *tnapi) ...@@ -6587,7 +6587,7 @@ static void tg3_tx(struct tg3_napi *tnapi)
pkts_compl++; pkts_compl++;
bytes_compl += skb->len; bytes_compl += skb->len;
dev_kfree_skb_any(skb); dev_consume_skb_any(skb);
if (unlikely(tx_bug)) { if (unlikely(tx_bug)) {
tg3_tx_recover(tp); tg3_tx_recover(tp);
...@@ -7829,7 +7829,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi, ...@@ -7829,7 +7829,7 @@ static int tigon3_dma_hwbug_workaround(struct tg3_napi *tnapi,
} }
} }
dev_kfree_skb_any(skb); dev_consume_skb_any(skb);
*pskb = new_skb; *pskb = new_skb;
return ret; return ret;
} }
...@@ -7882,7 +7882,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi, ...@@ -7882,7 +7882,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
} while (segs); } while (segs);
tg3_tso_bug_end: tg3_tso_bug_end:
dev_kfree_skb_any(skb); dev_consume_skb_any(skb);
return NETDEV_TX_OK; return NETDEV_TX_OK;
} }
...@@ -8543,7 +8543,7 @@ static void tg3_free_rings(struct tg3 *tp) ...@@ -8543,7 +8543,7 @@ static void tg3_free_rings(struct tg3 *tp)
tg3_tx_skb_unmap(tnapi, i, tg3_tx_skb_unmap(tnapi, i,
skb_shinfo(skb)->nr_frags - 1); skb_shinfo(skb)->nr_frags - 1);
dev_kfree_skb_any(skb); dev_consume_skb_any(skb);
} }
netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j)); netdev_tx_reset_queue(netdev_get_tx_queue(tp->dev, j));
} }
......
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