hv_netvsc: use consume_skb
authorStephen Hemminger <sthemmin@microsoft.com>
Thu, 22 Sep 2016 23:56:29 +0000 (16:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2016 12:39:48 +0000 (08:39 -0400)
Packets that are transmitted in normal path should use consume_skb
instead of kfree_skb. This allows for better tracing of packet drops.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc.c

index ff05b9b0837fcd42f16d07f7c5b34222341ddf1f..720b5fa9e6254463ce0dde094d6b71afd7e7684d 100644 (file)
@@ -635,7 +635,7 @@ static void netvsc_send_tx_complete(struct netvsc_device *net_device,
                q_idx = nvsc_packet->q_idx;
                channel = incoming_channel;
 
-               dev_kfree_skb_any(skb);
+               dev_consume_skb_any(skb);
        }
 
        num_outstanding_sends =
@@ -944,7 +944,7 @@ int netvsc_send(struct hv_device *device,
                }
 
                if (msdp->skb)
-                       dev_kfree_skb_any(msdp->skb);
+                       dev_consume_skb_any(msdp->skb);
 
                if (xmit_more && !packet->cp_partial) {
                        msdp->skb = skb;