~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/tipc/trace.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /net/tipc/trace.h (Version linux-6.12-rc7) and /net/tipc/trace.h (Version linux-5.6.19)


  1 /*                                                  1 /*
  2  * net/tipc/trace.h: TIPC tracepoints               2  * net/tipc/trace.h: TIPC tracepoints
  3  *                                                  3  *
  4  * Copyright (c) 2018, Ericsson AB                  4  * Copyright (c) 2018, Ericsson AB
  5  * All rights reserved.                             5  * All rights reserved.
  6  *                                                  6  *
  7  * Redistribution and use in source and binary      7  * Redistribution and use in source and binary forms, with or without
  8  * modification, are permitted provided that t      8  * modification, are permitted provided that the following conditions are met:
  9  *                                                  9  *
 10  * 1. Redistributions of source code must reta     10  * 1. Redistributions of source code must retain the above copyright
 11  *    notice, this list of conditions and the      11  *    notice, this list of conditions and the following disclaimer.
 12  * 2. Redistributions in binary form must repr     12  * 2. Redistributions in binary form must reproduce the above copyright
 13  *    notice, this list of conditions and the      13  *    notice, this list of conditions and the following disclaimer in the
 14  *    documentation and/or other materials pro     14  *    documentation and/or other materials provided with the distribution.
 15  * 3. Neither the names of the copyright holde     15  * 3. Neither the names of the copyright holders nor the names of its
 16  *    contributors may be used to endorse or p     16  *    contributors may be used to endorse or promote products derived from
 17  *    this software without specific prior wri     17  *    this software without specific prior written permission.
 18  *                                                 18  *
 19  * Alternatively, this software may be distrib     19  * Alternatively, this software may be distributed under the terms of the
 20  * GNU General Public License ("GPL") version      20  * GNU General Public License ("GPL") version 2 as published by the Free
 21  * Software Foundation.                            21  * Software Foundation.
 22  *                                                 22  *
 23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT      23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "ASIS"
 24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCL     24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,THE
 25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND F     25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYR     26  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL     27  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT L     28  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,      29  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THE     30  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUD     31  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 32  * ARISING IN ANY WAY OUT OF THE USE OF THIS S     32  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 33  * POSSIBILITY OF SUCH DAMAGE.                     33  * POSSIBILITY OF SUCH DAMAGE.
 34  */                                                34  */
 35                                                    35 
 36 #undef TRACE_SYSTEM                                36 #undef TRACE_SYSTEM
 37 #define TRACE_SYSTEM tipc                          37 #define TRACE_SYSTEM tipc
 38                                                    38 
 39 #if !defined(_TIPC_TRACE_H) || defined(TRACE_H     39 #if !defined(_TIPC_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
 40 #define _TIPC_TRACE_H                              40 #define _TIPC_TRACE_H
 41                                                    41 
 42 #include <linux/tracepoint.h>                      42 #include <linux/tracepoint.h>
 43 #include "core.h"                                  43 #include "core.h"
 44 #include "link.h"                                  44 #include "link.h"
 45 #include "socket.h"                                45 #include "socket.h"
 46 #include "node.h"                                  46 #include "node.h"
 47                                                    47 
 48 #define SKB_LMIN        (100)                      48 #define SKB_LMIN        (100)
 49 #define SKB_LMAX        (SKB_LMIN * 2)             49 #define SKB_LMAX        (SKB_LMIN * 2)
 50 #define LIST_LMIN       (SKB_LMIN * 3)             50 #define LIST_LMIN       (SKB_LMIN * 3)
 51 #define LIST_LMAX       (SKB_LMIN * 11)            51 #define LIST_LMAX       (SKB_LMIN * 11)
 52 #define SK_LMIN         (SKB_LMIN * 2)             52 #define SK_LMIN         (SKB_LMIN * 2)
 53 #define SK_LMAX         (SKB_LMIN * 11)            53 #define SK_LMAX         (SKB_LMIN * 11)
 54 #define LINK_LMIN       (SKB_LMIN)                 54 #define LINK_LMIN       (SKB_LMIN)
 55 #define LINK_LMAX       (SKB_LMIN * 16)            55 #define LINK_LMAX       (SKB_LMIN * 16)
 56 #define NODE_LMIN       (SKB_LMIN)                 56 #define NODE_LMIN       (SKB_LMIN)
 57 #define NODE_LMAX       (SKB_LMIN * 11)            57 #define NODE_LMAX       (SKB_LMIN * 11)
 58                                                    58 
 59 #ifndef __TIPC_TRACE_ENUM                          59 #ifndef __TIPC_TRACE_ENUM
 60 #define __TIPC_TRACE_ENUM                          60 #define __TIPC_TRACE_ENUM
 61 enum {                                             61 enum {
 62         TIPC_DUMP_NONE          = 0,               62         TIPC_DUMP_NONE          = 0,
 63                                                    63 
 64         TIPC_DUMP_TRANSMQ       = 1,               64         TIPC_DUMP_TRANSMQ       = 1,
 65         TIPC_DUMP_BACKLOGQ      = (1 << 1),        65         TIPC_DUMP_BACKLOGQ      = (1 << 1),
 66         TIPC_DUMP_DEFERDQ       = (1 << 2),        66         TIPC_DUMP_DEFERDQ       = (1 << 2),
 67         TIPC_DUMP_INPUTQ        = (1 << 3),        67         TIPC_DUMP_INPUTQ        = (1 << 3),
 68         TIPC_DUMP_WAKEUP        = (1 << 4),        68         TIPC_DUMP_WAKEUP        = (1 << 4),
 69                                                    69 
 70         TIPC_DUMP_SK_SNDQ       = (1 << 8),        70         TIPC_DUMP_SK_SNDQ       = (1 << 8),
 71         TIPC_DUMP_SK_RCVQ       = (1 << 9),        71         TIPC_DUMP_SK_RCVQ       = (1 << 9),
 72         TIPC_DUMP_SK_BKLGQ      = (1 << 10),       72         TIPC_DUMP_SK_BKLGQ      = (1 << 10),
 73         TIPC_DUMP_ALL           = 0xffffu          73         TIPC_DUMP_ALL           = 0xffffu
 74 };                                                 74 };
 75 #endif                                             75 #endif
 76                                                    76 
 77 /* Link & Node FSM states: */                      77 /* Link & Node FSM states: */
 78 #define state_sym(val)                             78 #define state_sym(val)                                                    \
 79         __print_symbolic(val,                      79         __print_symbolic(val,                                             \
 80                         {(0xe),         "ESTAB     80                         {(0xe),         "ESTABLISHED"                   },\
 81                         {(0xe << 4),    "ESTAB     81                         {(0xe << 4),    "ESTABLISHING"                  },\
 82                         {(0x1 << 8),    "RESET     82                         {(0x1 << 8),    "RESET"                         },\
 83                         {(0x2 << 12),   "RESET     83                         {(0x2 << 12),   "RESETTING"                     },\
 84                         {(0xd << 16),   "PEER_     84                         {(0xd << 16),   "PEER_RESET"                    },\
 85                         {(0xf << 20),   "FAILI     85                         {(0xf << 20),   "FAILINGOVER"                   },\
 86                         {(0xc << 24),   "SYNCH     86                         {(0xc << 24),   "SYNCHING"                      },\
 87                         {(0xdd),        "SELF_     87                         {(0xdd),        "SELF_DOWN_PEER_DOWN"           },\
 88                         {(0xaa),        "SELF_     88                         {(0xaa),        "SELF_UP_PEER_UP"               },\
 89                         {(0xd1),        "SELF_     89                         {(0xd1),        "SELF_DOWN_PEER_LEAVING"        },\
 90                         {(0xac),        "SELF_     90                         {(0xac),        "SELF_UP_PEER_COMING"           },\
 91                         {(0xca),        "SELF_     91                         {(0xca),        "SELF_COMING_PEER_UP"           },\
 92                         {(0x1d),        "SELF_     92                         {(0x1d),        "SELF_LEAVING_PEER_DOWN"        },\
 93                         {(0xf0),        "FAILI     93                         {(0xf0),        "FAILINGOVER"                   },\
 94                         {(0xcc),        "SYNCH     94                         {(0xcc),        "SYNCHING"                      })
 95                                                    95 
 96 /* Link & Node FSM events: */                      96 /* Link & Node FSM events: */
 97 #define evt_sym(val)                               97 #define evt_sym(val)                                                      \
 98         __print_symbolic(val,                      98         __print_symbolic(val,                                             \
 99                         {(0xec1ab1e),   "ESTAB     99                         {(0xec1ab1e),   "ESTABLISH_EVT"                 },\
100                         {(0x9eed0e),    "PEER_    100                         {(0x9eed0e),    "PEER_RESET_EVT"                },\
101                         {(0xfa110e),    "FAILU    101                         {(0xfa110e),    "FAILURE_EVT"                   },\
102                         {(0x10ca1d0e),  "RESET    102                         {(0x10ca1d0e),  "RESET_EVT"                     },\
103                         {(0xfa110bee),  "FAILO    103                         {(0xfa110bee),  "FAILOVER_BEGIN_EVT"            },\
104                         {(0xfa110ede),  "FAILO    104                         {(0xfa110ede),  "FAILOVER_END_EVT"              },\
105                         {(0xc1ccbee),   "SYNCH    105                         {(0xc1ccbee),   "SYNCH_BEGIN_EVT"               },\
106                         {(0xc1ccede),   "SYNCH    106                         {(0xc1ccede),   "SYNCH_END_EVT"                 },\
107                         {(0xece),       "SELF_    107                         {(0xece),       "SELF_ESTABL_CONTACT_EVT"       },\
108                         {(0x1ce),       "SELF_    108                         {(0x1ce),       "SELF_LOST_CONTACT_EVT"         },\
109                         {(0x9ece),      "PEER_    109                         {(0x9ece),      "PEER_ESTABL_CONTACT_EVT"       },\
110                         {(0x91ce),      "PEER_    110                         {(0x91ce),      "PEER_LOST_CONTACT_EVT"         },\
111                         {(0xfbe),       "FAILO    111                         {(0xfbe),       "FAILOVER_BEGIN_EVT"            },\
112                         {(0xfee),       "FAILO    112                         {(0xfee),       "FAILOVER_END_EVT"              },\
113                         {(0xcbe),       "SYNCH    113                         {(0xcbe),       "SYNCH_BEGIN_EVT"               },\
114                         {(0xcee),       "SYNCH    114                         {(0xcee),       "SYNCH_END_EVT"                 })
115                                                   115 
116 /* Bearer, net device events: */                  116 /* Bearer, net device events: */
117 #define dev_evt_sym(val)                          117 #define dev_evt_sym(val)                                                  \
118         __print_symbolic(val,                     118         __print_symbolic(val,                                             \
119                         {(NETDEV_CHANGE),         119                         {(NETDEV_CHANGE),       "NETDEV_CHANGE"         },\
120                         {(NETDEV_GOING_DOWN),     120                         {(NETDEV_GOING_DOWN),   "NETDEV_GOING_DOWN"     },\
121                         {(NETDEV_UP),             121                         {(NETDEV_UP),           "NETDEV_UP"             },\
122                         {(NETDEV_CHANGEMTU),      122                         {(NETDEV_CHANGEMTU),    "NETDEV_CHANGEMTU"      },\
123                         {(NETDEV_CHANGEADDR),     123                         {(NETDEV_CHANGEADDR),   "NETDEV_CHANGEADDR"     },\
124                         {(NETDEV_UNREGISTER),     124                         {(NETDEV_UNREGISTER),   "NETDEV_UNREGISTER"     },\
125                         {(NETDEV_CHANGENAME),     125                         {(NETDEV_CHANGENAME),   "NETDEV_CHANGENAME"     })
126                                                   126 
127 extern unsigned long sysctl_tipc_sk_filter[5]     127 extern unsigned long sysctl_tipc_sk_filter[5] __read_mostly;
128                                                   128 
129 int tipc_skb_dump(struct sk_buff *skb, bool mo    129 int tipc_skb_dump(struct sk_buff *skb, bool more, char *buf);
130 int tipc_list_dump(struct sk_buff_head *list,     130 int tipc_list_dump(struct sk_buff_head *list, bool more, char *buf);
131 int tipc_sk_dump(struct sock *sk, u16 dqueues,    131 int tipc_sk_dump(struct sock *sk, u16 dqueues, char *buf);
132 int tipc_link_dump(struct tipc_link *l, u16 dq    132 int tipc_link_dump(struct tipc_link *l, u16 dqueues, char *buf);
133 int tipc_node_dump(struct tipc_node *n, bool m    133 int tipc_node_dump(struct tipc_node *n, bool more, char *buf);
134 bool tipc_sk_filtering(struct sock *sk);          134 bool tipc_sk_filtering(struct sock *sk);
135                                                   135 
136 DECLARE_EVENT_CLASS(tipc_skb_class,               136 DECLARE_EVENT_CLASS(tipc_skb_class,
137                                                   137 
138         TP_PROTO(struct sk_buff *skb, bool mor    138         TP_PROTO(struct sk_buff *skb, bool more, const char *header),
139                                                   139 
140         TP_ARGS(skb, more, header),               140         TP_ARGS(skb, more, header),
141                                                   141 
142         TP_STRUCT__entry(                         142         TP_STRUCT__entry(
143                 __string(header, header)          143                 __string(header, header)
144                 __dynamic_array(char, buf, (mo    144                 __dynamic_array(char, buf, (more) ? SKB_LMAX : SKB_LMIN)
145         ),                                        145         ),
146                                                   146 
147         TP_fast_assign(                           147         TP_fast_assign(
148                 __assign_str(header);          !! 148                 __assign_str(header, header);
149                 tipc_skb_dump(skb, more, __get    149                 tipc_skb_dump(skb, more, __get_str(buf));
150         ),                                        150         ),
151                                                   151 
152         TP_printk("%s\n%s", __get_str(header),    152         TP_printk("%s\n%s", __get_str(header), __get_str(buf))
153 )                                                 153 )
154                                                   154 
155 #define DEFINE_SKB_EVENT(name) \                  155 #define DEFINE_SKB_EVENT(name) \
156 DEFINE_EVENT(tipc_skb_class, name, \              156 DEFINE_EVENT(tipc_skb_class, name, \
157         TP_PROTO(struct sk_buff *skb, bool mor    157         TP_PROTO(struct sk_buff *skb, bool more, const char *header), \
158         TP_ARGS(skb, more, header))               158         TP_ARGS(skb, more, header))
159 DEFINE_SKB_EVENT(tipc_skb_dump);                  159 DEFINE_SKB_EVENT(tipc_skb_dump);
160 DEFINE_SKB_EVENT(tipc_proto_build);               160 DEFINE_SKB_EVENT(tipc_proto_build);
161 DEFINE_SKB_EVENT(tipc_proto_rcv);                 161 DEFINE_SKB_EVENT(tipc_proto_rcv);
162                                                   162 
163 DECLARE_EVENT_CLASS(tipc_list_class,              163 DECLARE_EVENT_CLASS(tipc_list_class,
164                                                   164 
165         TP_PROTO(struct sk_buff_head *list, bo    165         TP_PROTO(struct sk_buff_head *list, bool more, const char *header),
166                                                   166 
167         TP_ARGS(list, more, header),              167         TP_ARGS(list, more, header),
168                                                   168 
169         TP_STRUCT__entry(                         169         TP_STRUCT__entry(
170                 __string(header, header)          170                 __string(header, header)
171                 __dynamic_array(char, buf, (mo    171                 __dynamic_array(char, buf, (more) ? LIST_LMAX : LIST_LMIN)
172         ),                                        172         ),
173                                                   173 
174         TP_fast_assign(                           174         TP_fast_assign(
175                 __assign_str(header);          !! 175                 __assign_str(header, header);
176                 tipc_list_dump(list, more, __g    176                 tipc_list_dump(list, more, __get_str(buf));
177         ),                                        177         ),
178                                                   178 
179         TP_printk("%s\n%s", __get_str(header),    179         TP_printk("%s\n%s", __get_str(header), __get_str(buf))
180 );                                                180 );
181                                                   181 
182 #define DEFINE_LIST_EVENT(name) \                 182 #define DEFINE_LIST_EVENT(name) \
183 DEFINE_EVENT(tipc_list_class, name, \             183 DEFINE_EVENT(tipc_list_class, name, \
184         TP_PROTO(struct sk_buff_head *list, bo    184         TP_PROTO(struct sk_buff_head *list, bool more, const char *header), \
185         TP_ARGS(list, more, header))              185         TP_ARGS(list, more, header))
186 DEFINE_LIST_EVENT(tipc_list_dump);                186 DEFINE_LIST_EVENT(tipc_list_dump);
187                                                   187 
188 DECLARE_EVENT_CLASS(tipc_sk_class,                188 DECLARE_EVENT_CLASS(tipc_sk_class,
189                                                   189 
190         TP_PROTO(struct sock *sk, struct sk_bu    190         TP_PROTO(struct sock *sk, struct sk_buff *skb, u16 dqueues,
191                  const char *header),             191                  const char *header),
192                                                   192 
193         TP_ARGS(sk, skb, dqueues, header),        193         TP_ARGS(sk, skb, dqueues, header),
194                                                   194 
195         TP_STRUCT__entry(                         195         TP_STRUCT__entry(
196                 __string(header, header)          196                 __string(header, header)
197                 __field(u32, portid)              197                 __field(u32, portid)
198                 __dynamic_array(char, buf, (dq    198                 __dynamic_array(char, buf, (dqueues) ? SK_LMAX : SK_LMIN)
199                 __dynamic_array(char, skb_buf,    199                 __dynamic_array(char, skb_buf, (skb) ? SKB_LMIN : 1)
200         ),                                        200         ),
201                                                   201 
202         TP_fast_assign(                           202         TP_fast_assign(
203                 __assign_str(header);          !! 203                 __assign_str(header, header);
204                 __entry->portid = tipc_sock_ge    204                 __entry->portid = tipc_sock_get_portid(sk);
205                 tipc_sk_dump(sk, dqueues, __ge    205                 tipc_sk_dump(sk, dqueues, __get_str(buf));
206                 if (skb)                          206                 if (skb)
207                         tipc_skb_dump(skb, fal    207                         tipc_skb_dump(skb, false, __get_str(skb_buf));
208                 else                              208                 else
209                         *(__get_str(skb_buf))     209                         *(__get_str(skb_buf)) = '\0';
210         ),                                        210         ),
211                                                   211 
212         TP_printk("<%u> %s\n%s%s", __entry->po    212         TP_printk("<%u> %s\n%s%s", __entry->portid, __get_str(header),
213                   __get_str(skb_buf), __get_st    213                   __get_str(skb_buf), __get_str(buf))
214 );                                                214 );
215                                                   215 
216 #define DEFINE_SK_EVENT_FILTER(name) \            216 #define DEFINE_SK_EVENT_FILTER(name) \
217 DEFINE_EVENT_CONDITION(tipc_sk_class, name, \     217 DEFINE_EVENT_CONDITION(tipc_sk_class, name, \
218         TP_PROTO(struct sock *sk, struct sk_bu    218         TP_PROTO(struct sock *sk, struct sk_buff *skb, u16 dqueues, \
219                  const char *header), \           219                  const char *header), \
220         TP_ARGS(sk, skb, dqueues, header), \      220         TP_ARGS(sk, skb, dqueues, header), \
221         TP_CONDITION(tipc_sk_filtering(sk)))      221         TP_CONDITION(tipc_sk_filtering(sk)))
222 DEFINE_SK_EVENT_FILTER(tipc_sk_dump);             222 DEFINE_SK_EVENT_FILTER(tipc_sk_dump);
223 DEFINE_SK_EVENT_FILTER(tipc_sk_create);           223 DEFINE_SK_EVENT_FILTER(tipc_sk_create);
224 DEFINE_SK_EVENT_FILTER(tipc_sk_sendmcast);        224 DEFINE_SK_EVENT_FILTER(tipc_sk_sendmcast);
225 DEFINE_SK_EVENT_FILTER(tipc_sk_sendmsg);          225 DEFINE_SK_EVENT_FILTER(tipc_sk_sendmsg);
226 DEFINE_SK_EVENT_FILTER(tipc_sk_sendstream);       226 DEFINE_SK_EVENT_FILTER(tipc_sk_sendstream);
227 DEFINE_SK_EVENT_FILTER(tipc_sk_poll);             227 DEFINE_SK_EVENT_FILTER(tipc_sk_poll);
228 DEFINE_SK_EVENT_FILTER(tipc_sk_filter_rcv);       228 DEFINE_SK_EVENT_FILTER(tipc_sk_filter_rcv);
229 DEFINE_SK_EVENT_FILTER(tipc_sk_advance_rx);       229 DEFINE_SK_EVENT_FILTER(tipc_sk_advance_rx);
230 DEFINE_SK_EVENT_FILTER(tipc_sk_rej_msg);          230 DEFINE_SK_EVENT_FILTER(tipc_sk_rej_msg);
231 DEFINE_SK_EVENT_FILTER(tipc_sk_drop_msg);         231 DEFINE_SK_EVENT_FILTER(tipc_sk_drop_msg);
232 DEFINE_SK_EVENT_FILTER(tipc_sk_release);          232 DEFINE_SK_EVENT_FILTER(tipc_sk_release);
233 DEFINE_SK_EVENT_FILTER(tipc_sk_shutdown);         233 DEFINE_SK_EVENT_FILTER(tipc_sk_shutdown);
234                                                   234 
235 #define DEFINE_SK_EVENT_FILTER_COND(name, cond    235 #define DEFINE_SK_EVENT_FILTER_COND(name, cond) \
236 DEFINE_EVENT_CONDITION(tipc_sk_class, name, \     236 DEFINE_EVENT_CONDITION(tipc_sk_class, name, \
237         TP_PROTO(struct sock *sk, struct sk_bu    237         TP_PROTO(struct sock *sk, struct sk_buff *skb, u16 dqueues, \
238                  const char *header), \           238                  const char *header), \
239         TP_ARGS(sk, skb, dqueues, header), \      239         TP_ARGS(sk, skb, dqueues, header), \
240         TP_CONDITION(tipc_sk_filtering(sk) &&     240         TP_CONDITION(tipc_sk_filtering(sk) && (cond)))
241 DEFINE_SK_EVENT_FILTER_COND(tipc_sk_overlimit1    241 DEFINE_SK_EVENT_FILTER_COND(tipc_sk_overlimit1, tipc_sk_overlimit1(sk, skb));
242 DEFINE_SK_EVENT_FILTER_COND(tipc_sk_overlimit2    242 DEFINE_SK_EVENT_FILTER_COND(tipc_sk_overlimit2, tipc_sk_overlimit2(sk, skb));
243                                                   243 
244 DECLARE_EVENT_CLASS(tipc_link_class,              244 DECLARE_EVENT_CLASS(tipc_link_class,
245                                                   245 
246         TP_PROTO(struct tipc_link *l, u16 dque    246         TP_PROTO(struct tipc_link *l, u16 dqueues, const char *header),
247                                                   247 
248         TP_ARGS(l, dqueues, header),              248         TP_ARGS(l, dqueues, header),
249                                                   249 
250         TP_STRUCT__entry(                         250         TP_STRUCT__entry(
251                 __string(header, header)          251                 __string(header, header)
252                 __array(char, name, TIPC_MAX_L    252                 __array(char, name, TIPC_MAX_LINK_NAME)
253                 __dynamic_array(char, buf, (dq    253                 __dynamic_array(char, buf, (dqueues) ? LINK_LMAX : LINK_LMIN)
254         ),                                        254         ),
255                                                   255 
256         TP_fast_assign(                           256         TP_fast_assign(
257                 __assign_str(header);          !! 257                 __assign_str(header, header);
258                 memcpy(__entry->name, tipc_lin !! 258                 tipc_link_name_ext(l, __entry->name);
259                 tipc_link_dump(l, dqueues, __g    259                 tipc_link_dump(l, dqueues, __get_str(buf));
260         ),                                        260         ),
261                                                   261 
262         TP_printk("<%s> %s\n%s", __entry->name    262         TP_printk("<%s> %s\n%s", __entry->name, __get_str(header),
263                   __get_str(buf))                 263                   __get_str(buf))
264 );                                                264 );
265                                                   265 
266 #define DEFINE_LINK_EVENT(name) \                 266 #define DEFINE_LINK_EVENT(name) \
267 DEFINE_EVENT(tipc_link_class, name, \             267 DEFINE_EVENT(tipc_link_class, name, \
268         TP_PROTO(struct tipc_link *l, u16 dque    268         TP_PROTO(struct tipc_link *l, u16 dqueues, const char *header), \
269         TP_ARGS(l, dqueues, header))              269         TP_ARGS(l, dqueues, header))
270 DEFINE_LINK_EVENT(tipc_link_dump);                270 DEFINE_LINK_EVENT(tipc_link_dump);
271 DEFINE_LINK_EVENT(tipc_link_conges);              271 DEFINE_LINK_EVENT(tipc_link_conges);
272 DEFINE_LINK_EVENT(tipc_link_timeout);             272 DEFINE_LINK_EVENT(tipc_link_timeout);
273 DEFINE_LINK_EVENT(tipc_link_reset);               273 DEFINE_LINK_EVENT(tipc_link_reset);
274                                                   274 
275 #define DEFINE_LINK_EVENT_COND(name, cond) \      275 #define DEFINE_LINK_EVENT_COND(name, cond) \
276 DEFINE_EVENT_CONDITION(tipc_link_class, name,     276 DEFINE_EVENT_CONDITION(tipc_link_class, name, \
277         TP_PROTO(struct tipc_link *l, u16 dque    277         TP_PROTO(struct tipc_link *l, u16 dqueues, const char *header), \
278         TP_ARGS(l, dqueues, header), \            278         TP_ARGS(l, dqueues, header), \
279         TP_CONDITION(cond))                       279         TP_CONDITION(cond))
280 DEFINE_LINK_EVENT_COND(tipc_link_too_silent, t    280 DEFINE_LINK_EVENT_COND(tipc_link_too_silent, tipc_link_too_silent(l));
281                                                   281 
282 DECLARE_EVENT_CLASS(tipc_link_transmq_class,      282 DECLARE_EVENT_CLASS(tipc_link_transmq_class,
283                                                   283 
284         TP_PROTO(struct tipc_link *r, u16 f, u    284         TP_PROTO(struct tipc_link *r, u16 f, u16 t, struct sk_buff_head *tq),
285                                                   285 
286         TP_ARGS(r, f, t, tq),                     286         TP_ARGS(r, f, t, tq),
287                                                   287 
288         TP_STRUCT__entry(                         288         TP_STRUCT__entry(
289                 __array(char, name, TIPC_MAX_L    289                 __array(char, name, TIPC_MAX_LINK_NAME)
290                 __field(u16, from)                290                 __field(u16, from)
291                 __field(u16, to)                  291                 __field(u16, to)
292                 __field(u32, len)                 292                 __field(u32, len)
293                 __field(u16, fseqno)              293                 __field(u16, fseqno)
294                 __field(u16, lseqno)              294                 __field(u16, lseqno)
295         ),                                        295         ),
296                                                   296 
297         TP_fast_assign(                           297         TP_fast_assign(
298                 memcpy(__entry->name, tipc_lin !! 298                 tipc_link_name_ext(r, __entry->name);
299                 __entry->from = f;                299                 __entry->from = f;
300                 __entry->to = t;                  300                 __entry->to = t;
301                 __entry->len = skb_queue_len(t    301                 __entry->len = skb_queue_len(tq);
302                 __entry->fseqno = __entry->len !! 302                 __entry->fseqno = msg_seqno(buf_msg(skb_peek(tq)));
303                                   msg_seqno(bu !! 303                 __entry->lseqno = msg_seqno(buf_msg(skb_peek_tail(tq)));
304                 __entry->lseqno = __entry->len << 
305                                   msg_seqno(bu << 
306         ),                                        304         ),
307                                                   305 
308         TP_printk("<%s> retrans req: [%u-%u] t    306         TP_printk("<%s> retrans req: [%u-%u] transmq: %u [%u-%u]\n",
309                   __entry->name, __entry->from    307                   __entry->name, __entry->from, __entry->to,
310                   __entry->len, __entry->fseqn    308                   __entry->len, __entry->fseqno, __entry->lseqno)
311 );                                                309 );
312                                                   310 
313 DEFINE_EVENT_CONDITION(tipc_link_transmq_class !! 311 DEFINE_EVENT(tipc_link_transmq_class, tipc_link_retrans,
314         TP_PROTO(struct tipc_link *r, u16 f, u    312         TP_PROTO(struct tipc_link *r, u16 f, u16 t, struct sk_buff_head *tq),
315         TP_ARGS(r, f, t, tq),                  !! 313         TP_ARGS(r, f, t, tq)
316         TP_CONDITION(less_eq(f, t))            << 
317 );                                                314 );
318                                                   315 
319 DEFINE_EVENT_PRINT(tipc_link_transmq_class, ti    316 DEFINE_EVENT_PRINT(tipc_link_transmq_class, tipc_link_bc_ack,
320         TP_PROTO(struct tipc_link *r, u16 f, u    317         TP_PROTO(struct tipc_link *r, u16 f, u16 t, struct sk_buff_head *tq),
321         TP_ARGS(r, f, t, tq),                     318         TP_ARGS(r, f, t, tq),
322         TP_printk("<%s> acked: %u gap: %u tran !! 319         TP_printk("<%s> acked: [%u-%u] transmq: %u [%u-%u]\n",
323                   __entry->name, __entry->from    320                   __entry->name, __entry->from, __entry->to,
324                   __entry->len, __entry->fseqn    321                   __entry->len, __entry->fseqno, __entry->lseqno)
325 );                                                322 );
326                                                   323 
327 DECLARE_EVENT_CLASS(tipc_node_class,              324 DECLARE_EVENT_CLASS(tipc_node_class,
328                                                   325 
329         TP_PROTO(struct tipc_node *n, bool mor    326         TP_PROTO(struct tipc_node *n, bool more, const char *header),
330                                                   327 
331         TP_ARGS(n, more, header),                 328         TP_ARGS(n, more, header),
332                                                   329 
333         TP_STRUCT__entry(                         330         TP_STRUCT__entry(
334                 __string(header, header)          331                 __string(header, header)
335                 __field(u32, addr)                332                 __field(u32, addr)
336                 __dynamic_array(char, buf, (mo    333                 __dynamic_array(char, buf, (more) ? NODE_LMAX : NODE_LMIN)
337         ),                                        334         ),
338                                                   335 
339         TP_fast_assign(                           336         TP_fast_assign(
340                 __assign_str(header);          !! 337                 __assign_str(header, header);
341                 __entry->addr = tipc_node_get_    338                 __entry->addr = tipc_node_get_addr(n);
342                 tipc_node_dump(n, more, __get_    339                 tipc_node_dump(n, more, __get_str(buf));
343         ),                                        340         ),
344                                                   341 
345         TP_printk("<%x> %s\n%s", __entry->addr    342         TP_printk("<%x> %s\n%s", __entry->addr, __get_str(header),
346                   __get_str(buf))                 343                   __get_str(buf))
347 );                                                344 );
348                                                   345 
349 #define DEFINE_NODE_EVENT(name) \                 346 #define DEFINE_NODE_EVENT(name) \
350 DEFINE_EVENT(tipc_node_class, name, \             347 DEFINE_EVENT(tipc_node_class, name, \
351         TP_PROTO(struct tipc_node *n, bool mor    348         TP_PROTO(struct tipc_node *n, bool more, const char *header), \
352         TP_ARGS(n, more, header))                 349         TP_ARGS(n, more, header))
353 DEFINE_NODE_EVENT(tipc_node_dump);                350 DEFINE_NODE_EVENT(tipc_node_dump);
354 DEFINE_NODE_EVENT(tipc_node_create);              351 DEFINE_NODE_EVENT(tipc_node_create);
355 DEFINE_NODE_EVENT(tipc_node_delete);              352 DEFINE_NODE_EVENT(tipc_node_delete);
356 DEFINE_NODE_EVENT(tipc_node_lost_contact);        353 DEFINE_NODE_EVENT(tipc_node_lost_contact);
357 DEFINE_NODE_EVENT(tipc_node_timeout);             354 DEFINE_NODE_EVENT(tipc_node_timeout);
358 DEFINE_NODE_EVENT(tipc_node_link_up);             355 DEFINE_NODE_EVENT(tipc_node_link_up);
359 DEFINE_NODE_EVENT(tipc_node_link_down);           356 DEFINE_NODE_EVENT(tipc_node_link_down);
360 DEFINE_NODE_EVENT(tipc_node_reset_links);         357 DEFINE_NODE_EVENT(tipc_node_reset_links);
361 DEFINE_NODE_EVENT(tipc_node_check_state);         358 DEFINE_NODE_EVENT(tipc_node_check_state);
362                                                   359 
363 DECLARE_EVENT_CLASS(tipc_fsm_class,               360 DECLARE_EVENT_CLASS(tipc_fsm_class,
364                                                   361 
365         TP_PROTO(const char *name, u32 os, u32    362         TP_PROTO(const char *name, u32 os, u32 ns, int evt),
366                                                   363 
367         TP_ARGS(name, os, ns, evt),               364         TP_ARGS(name, os, ns, evt),
368                                                   365 
369         TP_STRUCT__entry(                         366         TP_STRUCT__entry(
370                 __string(name, name)              367                 __string(name, name)
371                 __field(u32, os)                  368                 __field(u32, os)
372                 __field(u32, ns)                  369                 __field(u32, ns)
373                 __field(u32, evt)                 370                 __field(u32, evt)
374         ),                                        371         ),
375                                                   372 
376         TP_fast_assign(                           373         TP_fast_assign(
377                 __assign_str(name);            !! 374                 __assign_str(name, name);
378                 __entry->os = os;                 375                 __entry->os = os;
379                 __entry->ns = ns;                 376                 __entry->ns = ns;
380                 __entry->evt = evt;               377                 __entry->evt = evt;
381         ),                                        378         ),
382                                                   379 
383         TP_printk("<%s> %s--(%s)->%s\n", __get    380         TP_printk("<%s> %s--(%s)->%s\n", __get_str(name),
384                   state_sym(__entry->os), evt_    381                   state_sym(__entry->os), evt_sym(__entry->evt),
385                   state_sym(__entry->ns))         382                   state_sym(__entry->ns))
386 );                                                383 );
387                                                   384 
388 #define DEFINE_FSM_EVENT(fsm_name) \              385 #define DEFINE_FSM_EVENT(fsm_name) \
389 DEFINE_EVENT(tipc_fsm_class, fsm_name, \          386 DEFINE_EVENT(tipc_fsm_class, fsm_name, \
390         TP_PROTO(const char *name, u32 os, u32    387         TP_PROTO(const char *name, u32 os, u32 ns, int evt), \
391         TP_ARGS(name, os, ns, evt))               388         TP_ARGS(name, os, ns, evt))
392 DEFINE_FSM_EVENT(tipc_link_fsm);                  389 DEFINE_FSM_EVENT(tipc_link_fsm);
393 DEFINE_FSM_EVENT(tipc_node_fsm);                  390 DEFINE_FSM_EVENT(tipc_node_fsm);
394                                                   391 
395 TRACE_EVENT(tipc_l2_device_event,                 392 TRACE_EVENT(tipc_l2_device_event,
396                                                   393 
397         TP_PROTO(struct net_device *dev, struc    394         TP_PROTO(struct net_device *dev, struct tipc_bearer *b,
398                  unsigned long evt),              395                  unsigned long evt),
399                                                   396 
400         TP_ARGS(dev, b, evt),                     397         TP_ARGS(dev, b, evt),
401                                                   398 
402         TP_STRUCT__entry(                         399         TP_STRUCT__entry(
403                 __string(dev_name, dev->name)     400                 __string(dev_name, dev->name)
404                 __string(b_name, b->name)         401                 __string(b_name, b->name)
405                 __field(unsigned long, evt)       402                 __field(unsigned long, evt)
406                 __field(u8, b_up)                 403                 __field(u8, b_up)
407                 __field(u8, carrier)              404                 __field(u8, carrier)
408                 __field(u8, oper)                 405                 __field(u8, oper)
409         ),                                        406         ),
410                                                   407 
411         TP_fast_assign(                           408         TP_fast_assign(
412                 __assign_str(dev_name);        !! 409                 __assign_str(dev_name, dev->name);
413                 __assign_str(b_name);          !! 410                 __assign_str(b_name, b->name);
414                 __entry->evt = evt;               411                 __entry->evt = evt;
415                 __entry->b_up = test_bit(0, &b    412                 __entry->b_up = test_bit(0, &b->up);
416                 __entry->carrier = netif_carri    413                 __entry->carrier = netif_carrier_ok(dev);
417                 __entry->oper = netif_oper_up(    414                 __entry->oper = netif_oper_up(dev);
418         ),                                        415         ),
419                                                   416 
420         TP_printk("%s on: <%s>/<%s> oper: %s c    417         TP_printk("%s on: <%s>/<%s> oper: %s carrier: %s bearer: %s\n",
421                   dev_evt_sym(__entry->evt), _    418                   dev_evt_sym(__entry->evt), __get_str(dev_name),
422                   __get_str(b_name), (__entry-    419                   __get_str(b_name), (__entry->oper) ? "up" : "down",
423                   (__entry->carrier) ? "ok" :     420                   (__entry->carrier) ? "ok" : "notok",
424                   (__entry->b_up) ? "up" : "do    421                   (__entry->b_up) ? "up" : "down")
425 );                                                422 );
426                                                   423 
427 #endif /* _TIPC_TRACE_H */                        424 #endif /* _TIPC_TRACE_H */
428                                                   425 
429 /* This part must be outside protection */        426 /* This part must be outside protection */
430 #undef TRACE_INCLUDE_PATH                         427 #undef TRACE_INCLUDE_PATH
431 #define TRACE_INCLUDE_PATH .                      428 #define TRACE_INCLUDE_PATH .
432 #undef TRACE_INCLUDE_FILE                         429 #undef TRACE_INCLUDE_FILE
433 #define TRACE_INCLUDE_FILE trace                  430 #define TRACE_INCLUDE_FILE trace
434 #include <trace/define_trace.h>                   431 #include <trace/define_trace.h>
435                                                   432 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php