Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719682 > unrolled thread

[PATCH net-next v2] tg3: Be drop monitor friendly

Started byFlorian Fainelli <f.fainelli@gmail.com>
First post2017-08-25 02:50 +0200
Last post2017-08-25 03:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH net-next v2] tg3: Be drop monitor friendly Florian Fainelli <f.fainelli@gmail.com> - 2017-08-25 02:50 +0200
    Re: [PATCH net-next v2] tg3: Be drop monitor friendly Michael Chan <michael.chan@broadcom.com> - 2017-08-25 03:00 +0200
    Re: [PATCH net-next v2] tg3: Be drop monitor friendly David Miller <davem@davemloft.net> - 2017-08-25 03:30 +0200

#1719682 — [PATCH net-next v2] tg3: Be drop monitor friendly

FromFlorian Fainelli <f.fainelli@gmail.com>
Date2017-08-25 02:50 +0200
Subject[PATCH net-next v2] tg3: Be drop monitor friendly
Message-ID<uiaYV-5od-11@gated-at.bofh.it>
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: Florian Fainelli <f.fainelli@gmail.com>
---
Changes in v2:

- also included tg3_tso_bug() as indicated by Michael

 drivers/net/ethernet/broadcom/tg3.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index d600c41fb1dc..af33dc15c55f 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;
 }
@@ -7882,7 +7882,7 @@ static int tg3_tso_bug(struct tg3 *tp, struct tg3_napi *tnapi,
 	} while (segs);
 
 tg3_tso_bug_end:
-	dev_kfree_skb_any(skb);
+	dev_consume_skb_any(skb);
 
 	return NETDEV_TX_OK;
 }
@@ -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

[toc] | [next] | [standalone]


#1719689

FromMichael Chan <michael.chan@broadcom.com>
Date2017-08-25 03:00 +0200
Message-ID<uib8C-5ry-5@gated-at.bofh.it>
In reply to#1719682
On Thu, Aug 24, 2017 at 5:47 PM, Florian Fainelli <f.fainelli@gmail.com> wrote:
> 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: Florian Fainelli <f.fainelli@gmail.com>

Acked-by: Michael Chan <michael.chan@broadcom.com>

> ---
> Changes in v2:
>
> - also included tg3_tso_bug() as indicated by Michael
>

[toc] | [prev] | [next] | [standalone]


#1719702

FromDavid Miller <davem@davemloft.net>
Date2017-08-25 03:30 +0200
Message-ID<uibBD-5Ur-9@gated-at.bofh.it>
In reply to#1719682
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 24 Aug 2017 17:47:11 -0700

> 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: Florian Fainelli <f.fainelli@gmail.com>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web