net: dsa: use consume_skb()
authorEric Dumazet <edumazet@google.com>
Thu, 24 Aug 2017 04:40:32 +0000 (21:40 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Aug 2017 05:13:34 +0000 (22:13 -0700)
Two kfree_skb() should be consume_skb(), to be friend with drop monitor
(perf record ... -e skb:kfree_skb)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/tag_ksz.c
net/dsa/tag_trailer.c

index 3bd6e2a83125ed4751067fa13c8476bf5e39fc35..fcd90f79458e20fefd76661fe7bc7e07d42ed1a3 100644 (file)
@@ -67,7 +67,7 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
                if (skb_put_padto(nskb, nskb->len + padlen))
                        return NULL;
 
-               kfree_skb(skb);
+               consume_skb(skb);
        }
 
        tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
index b09e56214005c7cf9e257eb777882b234a2d6f18..9c7b1d74a5c6cc6a80e51a259ef6645060390d31 100644 (file)
@@ -40,7 +40,7 @@ static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev)
        skb_set_network_header(nskb, skb_network_header(skb) - skb->head);
        skb_set_transport_header(nskb, skb_transport_header(skb) - skb->head);
        skb_copy_and_csum_dev(skb, skb_put(nskb, skb->len));
-       kfree_skb(skb);
+       consume_skb(skb);
 
        if (padlen) {
                skb_put_zero(nskb, padlen);