Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211811
b: refs/heads/master
c: 07dc22e
h: refs/heads/master
i:
  211809: 3347567
  211807: d82fb09
v: v3
  • Loading branch information
Koki Sanagi authored and Frederic Weisbecker committed Sep 7, 2010
1 parent ce02997 commit 1d5cafe
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf66ba58b5cb8b1526e9dd2fb96ff8db048d4d44
refs/heads/master: 07dc22e7295f25526f110d704655ff0ea7687420
17 changes: 17 additions & 0 deletions trunk/include/trace/events/skb.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@ TRACE_EVENT(kfree_skb,
__entry->skbaddr, __entry->protocol, __entry->location)
);

TRACE_EVENT(consume_skb,

TP_PROTO(struct sk_buff *skb),

TP_ARGS(skb),

TP_STRUCT__entry(
__field( void *, skbaddr )
),

TP_fast_assign(
__entry->skbaddr = skb;
),

TP_printk("skbaddr=%p", __entry->skbaddr)
);

TRACE_EVENT(skb_copy_datagram_iovec,

TP_PROTO(const struct sk_buff *skb, int len),
Expand Down
1 change: 1 addition & 0 deletions trunk/net/core/datagram.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ void skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb)
unlock_sock_fast(sk, slow);

/* skb is now orphaned, can be freed outside of locked section */
trace_kfree_skb(skb, skb_free_datagram_locked);
__kfree_skb(skb);
}
EXPORT_SYMBOL(skb_free_datagram_locked);
Expand Down
2 changes: 2 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
#include <linux/random.h>
#include <trace/events/napi.h>
#include <trace/events/net.h>
#include <trace/events/skb.h>
#include <linux/pci.h>

#include "net-sysfs.h"
Expand Down Expand Up @@ -2576,6 +2577,7 @@ static void net_tx_action(struct softirq_action *h)
clist = clist->next;

WARN_ON(atomic_read(&skb->users));
trace_kfree_skb(skb, net_tx_action);
__kfree_skb(skb);
}
}
Expand Down
1 change: 1 addition & 0 deletions trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@ void consume_skb(struct sk_buff *skb)
smp_rmb();
else if (likely(!atomic_dec_and_test(&skb->users)))
return;
trace_consume_skb(skb);
__kfree_skb(skb);
}
EXPORT_SYMBOL(consume_skb);
Expand Down

0 comments on commit 1d5cafe

Please sign in to comment.