netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] virtio_net: be drop monitor friend
@ 2017-08-24 16:02 Eric Dumazet
  2017-08-24 18:50 ` David Miller
  2017-08-24 21:42 ` Michael S. Tsirkin
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2017-08-24 16:02 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Michael S. Tsirkin, Jason Wang

From: Eric Dumazet <edumazet@google.com>

This change is needed to not fool drop monitor.
(perf record ... -e skb:kfree_skb )

Packets were properly sent and are consumed after TX completion.

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 drivers/net/virtio_net.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 98f17b05c68b..b06169ea60dc 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1058,7 +1058,7 @@ static void free_old_xmit_skbs(struct send_queue *sq)
 		bytes += skb->len;
 		packets++;
 
-		dev_kfree_skb_any(skb);
+		dev_consume_skb_any(skb);
 	}
 
 	/* Avoid overhead when no packets have been processed

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

* Re: [PATCH net] virtio_net: be drop monitor friend
  2017-08-24 16:02 [PATCH net] virtio_net: be drop monitor friend Eric Dumazet
@ 2017-08-24 18:50 ` David Miller
  2017-08-24 19:34   ` Eric Dumazet
  2017-08-24 21:42 ` Michael S. Tsirkin
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2017-08-24 18:50 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, mst, jasowang

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 24 Aug 2017 09:02:49 -0700

> From: Eric Dumazet <edumazet@google.com>
> 
> This change is needed to not fool drop monitor.
> (perf record ... -e skb:kfree_skb )
> 
> Packets were properly sent and are consumed after TX completion.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

I'm pretty sure you meant "friendly" in the Subject line so I fixed
it up to say that :-)

Applied, thanks.

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

* Re: [PATCH net] virtio_net: be drop monitor friend
  2017-08-24 18:50 ` David Miller
@ 2017-08-24 19:34   ` Eric Dumazet
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2017-08-24 19:34 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, mst, jasowang

On Thu, 2017-08-24 at 11:50 -0700, David Miller wrote:
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Thu, 24 Aug 2017 09:02:49 -0700
> 
> > From: Eric Dumazet <edumazet@google.com>
> > 
> > This change is needed to not fool drop monitor.
> > (perf record ... -e skb:kfree_skb )
> > 
> > Packets were properly sent and are consumed after TX completion.
> > 
> > Signed-off-by: Eric Dumazet <edumazet@google.com>
> 
> I'm pretty sure you meant "friendly" in the Subject line so I fixed
> it up to say that :-)
> 
> Applied, thanks.

Ah, great, thanks for fixing this ;)

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

* Re: [PATCH net] virtio_net: be drop monitor friend
  2017-08-24 16:02 [PATCH net] virtio_net: be drop monitor friend Eric Dumazet
  2017-08-24 18:50 ` David Miller
@ 2017-08-24 21:42 ` Michael S. Tsirkin
  1 sibling, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2017-08-24 21:42 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev, Jason Wang

On Thu, Aug 24, 2017 at 09:02:49AM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> This change is needed to not fool drop monitor.
> (perf record ... -e skb:kfree_skb )
> 
> Packets were properly sent and are consumed after TX completion.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  drivers/net/virtio_net.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index 98f17b05c68b..b06169ea60dc 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -1058,7 +1058,7 @@ static void free_old_xmit_skbs(struct send_queue *sq)
>  		bytes += skb->len;
>  		packets++;
>  
> -		dev_kfree_skb_any(skb);
> +		dev_consume_skb_any(skb);
>  	}
>  
>  	/* Avoid overhead when no packets have been processed
> 

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

end of thread, other threads:[~2017-08-24 21:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-24 16:02 [PATCH net] virtio_net: be drop monitor friend Eric Dumazet
2017-08-24 18:50 ` David Miller
2017-08-24 19:34   ` Eric Dumazet
2017-08-24 21:42 ` Michael S. Tsirkin

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