提交 2b33bc8a 编写于 作者: E Eric Dumazet 提交者: David S. Miller

net: dsa: use consume_skb()

Two kfree_skb() should be consume_skb(), to be friend with drop monitor
(perf record ... -e skb:kfree_skb)
Signed-off-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 40e607cb
无相关合并请求
...@@ -67,7 +67,7 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -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)) if (skb_put_padto(nskb, nskb->len + padlen))
return NULL; return NULL;
kfree_skb(skb); consume_skb(skb);
} }
tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN); tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
......
...@@ -40,7 +40,7 @@ static struct sk_buff *trailer_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -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_network_header(nskb, skb_network_header(skb) - skb->head);
skb_set_transport_header(nskb, skb_transport_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)); skb_copy_and_csum_dev(skb, skb_put(nskb, skb->len));
kfree_skb(skb); consume_skb(skb);
if (padlen) { if (padlen) {
skb_put_zero(nskb, padlen); skb_put_zero(nskb, padlen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部