diff options
author | Tuong Lien <tuong.t.lien@dektech.com.au> | 2020-05-26 12:38:35 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-27 01:16:52 +0300 |
commit | c6ed7a5cc2d68c36287c09260dc211173e0447d7 (patch) | |
tree | 125f7cacf4a942ace59cfc16eb8351d5dc62edd6 /net/tipc/trace.h | |
parent | d7626b5acff9227e2a65da636a53e09bdafdc0aa (diff) | |
download | linux-c6ed7a5cc2d68c36287c09260dc211173e0447d7.tar.xz |
tipc: add back link trace events
In the previous commit ("tipc: add Gap ACK blocks support for broadcast
link"), we have removed the following link trace events due to the code
changes:
- tipc_link_bc_ack
- tipc_link_retrans
This commit adds them back along with some minor changes to adapt to
the new code.
Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/trace.h')
-rw-r--r-- | net/tipc/trace.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/tipc/trace.h b/net/tipc/trace.h index 4d8e00483afc..e7535ab75255 100644 --- a/net/tipc/trace.h +++ b/net/tipc/trace.h @@ -299,8 +299,10 @@ DECLARE_EVENT_CLASS(tipc_link_transmq_class, __entry->from = f; __entry->to = t; __entry->len = skb_queue_len(tq); - __entry->fseqno = msg_seqno(buf_msg(skb_peek(tq))); - __entry->lseqno = msg_seqno(buf_msg(skb_peek_tail(tq))); + __entry->fseqno = __entry->len ? + msg_seqno(buf_msg(skb_peek(tq))) : 0; + __entry->lseqno = __entry->len ? + msg_seqno(buf_msg(skb_peek_tail(tq))) : 0; ), TP_printk("<%s> retrans req: [%u-%u] transmq: %u [%u-%u]\n", @@ -308,15 +310,16 @@ DECLARE_EVENT_CLASS(tipc_link_transmq_class, __entry->len, __entry->fseqno, __entry->lseqno) ); -DEFINE_EVENT(tipc_link_transmq_class, tipc_link_retrans, +DEFINE_EVENT_CONDITION(tipc_link_transmq_class, tipc_link_retrans, TP_PROTO(struct tipc_link *r, u16 f, u16 t, struct sk_buff_head *tq), - TP_ARGS(r, f, t, tq) + TP_ARGS(r, f, t, tq), + TP_CONDITION(less_eq(f, t)) ); DEFINE_EVENT_PRINT(tipc_link_transmq_class, tipc_link_bc_ack, TP_PROTO(struct tipc_link *r, u16 f, u16 t, struct sk_buff_head *tq), TP_ARGS(r, f, t, tq), - TP_printk("<%s> acked: [%u-%u] transmq: %u [%u-%u]\n", + TP_printk("<%s> acked: %u gap: %u transmq: %u [%u-%u]\n", __entry->name, __entry->from, __entry->to, __entry->len, __entry->fseqno, __entry->lseqno) ); |