* [PATCH net-next] tg3: Be drop monitor friendly
@ 2017-08-24 23:25 Florian Fainelli
[not found] ` <CACKFLi=a0KaETnnObmWesxyaqt2DrvbsaKPAGXrE-NawcQyB_A@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2017-08-24 23:25 UTC (permalink / raw)
To: netdev
Cc: edumazet, davem, Florian Fainelli, Siva Reddy Kallam,
Prashant Sreedharan, Michael Chan, open list
tg3_tx() does the normal packet TX completion,
tigon3_dma_hwbug_workaround() needs to allocate a new SKB that is
suitable for the DMA hardware bug, 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: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/tg3.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index d600c41fb1dc..8b8da7e32e24 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -6587,7 +6587,7 @@ static void tg3_tx(struct tg3_napi *tnapi)
pkts_compl++;
bytes_compl += skb->len;
- dev_kfree_skb_any(skb);
+ dev_consume_skb_any(skb);
if (unlikely(tx_bug)) {
tg3_tx_recover(tp);
@@ -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;
return ret;
}
@@ -8543,7 +8543,7 @@ static void tg3_free_rings(struct tg3 *tp)
tg3_tx_skb_unmap(tnapi, i,
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));
}
--
2.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] tg3: Be drop monitor friendly
[not found] ` <CACKFLi=a0KaETnnObmWesxyaqt2DrvbsaKPAGXrE-NawcQyB_A@mail.gmail.com>
@ 2017-08-25 0:42 ` Florian Fainelli
0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2017-08-25 0:42 UTC (permalink / raw)
To: Michael Chan
Cc: Netdev, edumazet, David Miller, Siva Reddy Kallam,
Prashant Sreedharan, Michael Chan, open list
On 08/24/2017 05:04 PM, Michael Chan wrote:
> On Thu, Aug 24, 2017 at 4:25 PM, Florian Fainelli <f.fainelli@gmail.com
> <mailto:f.fainelli@gmail.com>> wrote:
>>
>> tg3_tx() does the normal packet TX completion,
>> tigon3_dma_hwbug_workaround() needs to allocate a new SKB that is
>> suitable for the DMA hardware bug, 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: Florian Fainelli <f.fainelli@gmail.com
> <mailto:f.fainelli@gmail.com>>
>
> Florian, the one at the end of tg3_tso_bug() should also be converted to
> dev_consume_skb_any(). tg3_tso_bug() is similar to
> tigon3_dma_hwbug_workaround(). Thanks.
Indeed, thanks, will resubmit.
--
Florian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-25 0:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 23:25 [PATCH net-next] tg3: Be drop monitor friendly Florian Fainelli
[not found] ` <CACKFLi=a0KaETnnObmWesxyaqt2DrvbsaKPAGXrE-NawcQyB_A@mail.gmail.com>
2017-08-25 0:42 ` Florian Fainelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).