aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/trace.h')
-rw-r--r--net/tipc/trace.h32
1 files changed, 28 insertions, 4 deletions
diff --git a/net/tipc/trace.h b/net/tipc/trace.h
index 535c8958651f..ebbfcd14627e 100644
--- a/net/tipc/trace.h
+++ b/net/tipc/trace.h
@@ -113,11 +113,14 @@ enum {
113 {(0xcbe), "SYNCH_BEGIN_EVT" },\ 113 {(0xcbe), "SYNCH_BEGIN_EVT" },\
114 {(0xcee), "SYNCH_END_EVT" }) 114 {(0xcee), "SYNCH_END_EVT" })
115 115
116extern unsigned long sysctl_tipc_sk_filter[5] __read_mostly;
117
116int tipc_skb_dump(struct sk_buff *skb, bool more, char *buf); 118int tipc_skb_dump(struct sk_buff *skb, bool more, char *buf);
117int tipc_list_dump(struct sk_buff_head *list, bool more, char *buf); 119int tipc_list_dump(struct sk_buff_head *list, bool more, char *buf);
118int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf); 120int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf);
119int tipc_link_dump(struct tipc_link *l, u16 dqueues, char *buf); 121int tipc_link_dump(struct tipc_link *l, u16 dqueues, char *buf);
120int tipc_node_dump(struct tipc_node *n, bool more, char *buf); 122int tipc_node_dump(struct tipc_node *n, bool more, char *buf);
123bool tipc_sk_filtering(struct sock *sk);
121 124
122DECLARE_EVENT_CLASS(tipc_skb_class, 125DECLARE_EVENT_CLASS(tipc_skb_class,
123 126
@@ -199,12 +202,33 @@ DECLARE_EVENT_CLASS(tipc_sk_class,
199 __get_str(skb_buf), __get_str(buf)) 202 __get_str(skb_buf), __get_str(buf))
200); 203);
201 204
202#define DEFINE_SK_EVENT(name) \ 205#define DEFINE_SK_EVENT_FILTER(name) \
203DEFINE_EVENT(tipc_sk_class, name, \ 206DEFINE_EVENT_CONDITION(tipc_sk_class, name, \
207 TP_PROTO(struct sock *sk, struct sk_buff *skb, u16 dqueues, \
208 const char *header), \
209 TP_ARGS(sk, skb, dqueues, header), \
210 TP_CONDITION(tipc_sk_filtering(sk)))
211DEFINE_SK_EVENT_FILTER(tipc_sk_dump);
212DEFINE_SK_EVENT_FILTER(tipc_sk_create);
213DEFINE_SK_EVENT_FILTER(tipc_sk_sendmcast);
214DEFINE_SK_EVENT_FILTER(tipc_sk_sendmsg);
215DEFINE_SK_EVENT_FILTER(tipc_sk_sendstream);
216DEFINE_SK_EVENT_FILTER(tipc_sk_poll);
217DEFINE_SK_EVENT_FILTER(tipc_sk_filter_rcv);
218DEFINE_SK_EVENT_FILTER(tipc_sk_advance_rx);
219DEFINE_SK_EVENT_FILTER(tipc_sk_rej_msg);
220DEFINE_SK_EVENT_FILTER(tipc_sk_drop_msg);
221DEFINE_SK_EVENT_FILTER(tipc_sk_release);
222DEFINE_SK_EVENT_FILTER(tipc_sk_shutdown);
223
224#define DEFINE_SK_EVENT_FILTER_COND(name, cond) \
225DEFINE_EVENT_CONDITION(tipc_sk_class, name, \
204 TP_PROTO(struct sock *sk, struct sk_buff *skb, u16 dqueues, \ 226 TP_PROTO(struct sock *sk, struct sk_buff *skb, u16 dqueues, \
205 const char *header), \ 227 const char *header), \
206 TP_ARGS(sk, skb, dqueues, header)) 228 TP_ARGS(sk, skb, dqueues, header), \
207DEFINE_SK_EVENT(tipc_sk_dump); 229 TP_CONDITION(tipc_sk_filtering(sk) && (cond)))
230DEFINE_SK_EVENT_FILTER_COND(tipc_sk_overlimit1, tipc_sk_overlimit1(sk, skb));
231DEFINE_SK_EVENT_FILTER_COND(tipc_sk_overlimit2, tipc_sk_overlimit2(sk, skb));
208 232
209DECLARE_EVENT_CLASS(tipc_link_class, 233DECLARE_EVENT_CLASS(tipc_link_class,
210 234