netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: mv643xx_eth: Be drop monitor friendly
@ 2017-08-24 23:04 Florian Fainelli
  2017-08-25  1:27 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2017-08-24 23:04 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, andrew, Florian Fainelli, Sebastian Hesselbarth,
	open list

txq_reclaim() does the normal transmit queue reclamation and
rxq_deinit() does the RX ring cleanup, none of these are packet drops,
so use dev_consume_skb() for both locations.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/marvell/mv643xx_eth.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 9c94ea9b2b80..7655616bffef 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -1123,7 +1123,7 @@ static int txq_reclaim(struct tx_queue *txq, int budget, int force)
 			struct sk_buff *skb = __skb_dequeue(&txq->tx_skb);
 
 			if (!WARN_ON(!skb))
-				dev_kfree_skb(skb);
+				dev_consume_skb(skb);
 		}
 
 		if (cmd_sts & ERROR_SUMMARY) {
@@ -2026,7 +2026,7 @@ static void rxq_deinit(struct rx_queue *rxq)
 
 	for (i = 0; i < rxq->rx_ring_size; i++) {
 		if (rxq->rx_skb[i]) {
-			dev_kfree_skb(rxq->rx_skb[i]);
+			dev_consume_skb(rxq->rx_skb[i]);
 			rxq->rx_desc_count--;
 		}
 	}
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: mv643xx_eth: Be drop monitor friendly
  2017-08-24 23:04 [PATCH net-next] net: mv643xx_eth: Be drop monitor friendly Florian Fainelli
@ 2017-08-25  1:27 ` David Miller
  2017-08-25  1:52   ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2017-08-25  1:27 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, edumazet, andrew, sebastian.hesselbarth, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 24 Aug 2017 16:04:25 -0700

> txq_reclaim() does the normal transmit queue reclamation and
> rxq_deinit() does the RX ring cleanup, none of these are packet drops,
> so use dev_consume_skb() for both locations.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: mv643xx_eth: Be drop monitor friendly
  2017-08-25  1:27 ` David Miller
@ 2017-08-25  1:52   ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2017-08-25  1:52 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, edumazet, andrew, sebastian.hesselbarth, linux-kernel

From: David Miller <davem@davemloft.net>
Date: Thu, 24 Aug 2017 18:27:56 -0700 (PDT)

> From: Florian Fainelli <f.fainelli@gmail.com>
> Date: Thu, 24 Aug 2017 16:04:25 -0700
> 
>> txq_reclaim() does the normal transmit queue reclamation and
>> rxq_deinit() does the RX ring cleanup, none of these are packet drops,
>> so use dev_consume_skb() for both locations.
>> 
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> 
> Applied.

-ENOCOMPILE?

drivers/net/ethernet/marvell/mv643xx_eth.c: In function ‘txq_reclaim’:
drivers/net/ethernet/marvell/mv643xx_eth.c:1124:5: error: implicit declaration of function ‘dev_consume_skb’; did you mean ‘dev_consume_skb_any’? [-Werror=implicit-function-declaration]
     dev_consume_skb(skb);
     ^~~~~~~~~~~~~~~
     dev_consume_skb_any

Reverted.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-25  1:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 23:04 [PATCH net-next] net: mv643xx_eth: Be drop monitor friendly Florian Fainelli
2017-08-25  1:27 ` David Miller
2017-08-25  1:52   ` David Miller

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).