16
16
/*
17
17
* Declare tracing information enums and their string mappings for display.
18
18
*/
19
+ #define rxrpc_abort_reasons \
20
+ /* AFS errors */ \
21
+ EM(afs_abort_general_error, "afs-error") \
22
+ EM(afs_abort_interrupted, "afs-intr") \
23
+ EM(afs_abort_oom, "afs-oom") \
24
+ EM(afs_abort_op_not_supported, "afs-op-notsupp") \
25
+ EM(afs_abort_probeuuid_negative, "afs-probeuuid-neg") \
26
+ EM(afs_abort_send_data_error, "afs-send-data") \
27
+ EM(afs_abort_unmarshal_error, "afs-unmarshal") \
28
+ /* rxperf errors */ \
29
+ EM (rxperf_abort_general_error , "rxperf-error" ) \
30
+ EM (rxperf_abort_oom , "rxperf-oom" ) \
31
+ EM (rxperf_abort_op_not_supported , "rxperf-op-notsupp" ) \
32
+ EM (rxperf_abort_unmarshal_error , "rxperf-unmarshal" ) \
33
+ /* RxKAD security errors */ \
34
+ EM (rxkad_abort_1_short_check , "rxkad1-short-check" ) \
35
+ EM (rxkad_abort_1_short_data , "rxkad1-short-data" ) \
36
+ EM (rxkad_abort_1_short_encdata , "rxkad1-short-encdata" ) \
37
+ EM (rxkad_abort_1_short_header , "rxkad1-short-hdr" ) \
38
+ EM (rxkad_abort_2_short_check , "rxkad2-short-check" ) \
39
+ EM (rxkad_abort_2_short_data , "rxkad2-short-data" ) \
40
+ EM (rxkad_abort_2_short_header , "rxkad2-short-hdr" ) \
41
+ EM (rxkad_abort_2_short_len , "rxkad2-short-len" ) \
42
+ EM (rxkad_abort_bad_checksum , "rxkad2-bad-cksum" ) \
43
+ EM (rxkad_abort_chall_key_expired , "rxkad-chall-key-exp" ) \
44
+ EM (rxkad_abort_chall_level , "rxkad-chall-level" ) \
45
+ EM (rxkad_abort_chall_no_key , "rxkad-chall-nokey" ) \
46
+ EM (rxkad_abort_chall_short , "rxkad-chall-short" ) \
47
+ EM (rxkad_abort_chall_version , "rxkad-chall-version" ) \
48
+ EM (rxkad_abort_resp_bad_callid , "rxkad-resp-bad-callid" ) \
49
+ EM (rxkad_abort_resp_bad_checksum , "rxkad-resp-bad-cksum" ) \
50
+ EM (rxkad_abort_resp_bad_param , "rxkad-resp-bad-param" ) \
51
+ EM (rxkad_abort_resp_call_ctr , "rxkad-resp-call-ctr" ) \
52
+ EM (rxkad_abort_resp_call_state , "rxkad-resp-call-state" ) \
53
+ EM (rxkad_abort_resp_key_expired , "rxkad-resp-key-exp" ) \
54
+ EM (rxkad_abort_resp_key_rejected , "rxkad-resp-key-rej" ) \
55
+ EM (rxkad_abort_resp_level , "rxkad-resp-level" ) \
56
+ EM (rxkad_abort_resp_nokey , "rxkad-resp-nokey" ) \
57
+ EM (rxkad_abort_resp_ooseq , "rxkad-resp-ooseq" ) \
58
+ EM (rxkad_abort_resp_short , "rxkad-resp-short" ) \
59
+ EM (rxkad_abort_resp_short_tkt , "rxkad-resp-short-tkt" ) \
60
+ EM (rxkad_abort_resp_tkt_aname , "rxkad-resp-tk-aname" ) \
61
+ EM (rxkad_abort_resp_tkt_expired , "rxkad-resp-tk-exp" ) \
62
+ EM (rxkad_abort_resp_tkt_future , "rxkad-resp-tk-future" ) \
63
+ EM (rxkad_abort_resp_tkt_inst , "rxkad-resp-tk-inst" ) \
64
+ EM (rxkad_abort_resp_tkt_len , "rxkad-resp-tk-len" ) \
65
+ EM (rxkad_abort_resp_tkt_realm , "rxkad-resp-tk-realm" ) \
66
+ EM (rxkad_abort_resp_tkt_short , "rxkad-resp-tk-short" ) \
67
+ EM (rxkad_abort_resp_tkt_sinst , "rxkad-resp-tk-sinst" ) \
68
+ EM (rxkad_abort_resp_tkt_sname , "rxkad-resp-tk-sname" ) \
69
+ EM (rxkad_abort_resp_unknown_tkt , "rxkad-resp-unknown-tkt" ) \
70
+ EM (rxkad_abort_resp_version , "rxkad-resp-version" ) \
71
+ /* rxrpc errors */ \
72
+ EM (rxrpc_abort_call_improper_term , "call-improper-term" ) \
73
+ EM (rxrpc_abort_call_reset , "call-reset" ) \
74
+ EM (rxrpc_abort_call_sendmsg , "call-sendmsg" ) \
75
+ EM (rxrpc_abort_call_sock_release , "call-sock-rel" ) \
76
+ EM (rxrpc_abort_call_sock_release_tba , "call-sock-rel-tba" ) \
77
+ EM (rxrpc_abort_call_timeout , "call-timeout" ) \
78
+ EM (rxrpc_abort_no_service_key , "no-serv-key" ) \
79
+ EM (rxrpc_abort_nomem , "nomem" ) \
80
+ EM (rxrpc_abort_service_not_offered , "serv-not-offered" ) \
81
+ EM (rxrpc_abort_shut_down , "shut-down" ) \
82
+ EM (rxrpc_abort_unsupported_security , "unsup-sec" ) \
83
+ EM (rxrpc_badmsg_bad_abort , "bad-abort" ) \
84
+ EM (rxrpc_badmsg_bad_jumbo , "bad-jumbo" ) \
85
+ EM (rxrpc_badmsg_short_ack , "short-ack" ) \
86
+ EM (rxrpc_badmsg_short_ack_info , "short-ack-info" ) \
87
+ EM (rxrpc_badmsg_short_hdr , "short-hdr" ) \
88
+ EM (rxrpc_badmsg_unsupported_packet , "unsup-pkt" ) \
89
+ EM (rxrpc_badmsg_zero_call , "zero-call" ) \
90
+ EM (rxrpc_badmsg_zero_seq , "zero-seq" ) \
91
+ EM (rxrpc_badmsg_zero_service , "zero-service" ) \
92
+ EM (rxrpc_eproto_ackr_outside_window , "ackr-out-win" ) \
93
+ EM (rxrpc_eproto_ackr_sack_overflow , "ackr-sack-over" ) \
94
+ EM (rxrpc_eproto_ackr_short_sack , "ackr-short-sack" ) \
95
+ EM (rxrpc_eproto_ackr_zero , "ackr-zero" ) \
96
+ EM (rxrpc_eproto_bad_upgrade , "bad-upgrade" ) \
97
+ EM (rxrpc_eproto_data_after_last , "data-after-last" ) \
98
+ EM (rxrpc_eproto_different_last , "diff-last" ) \
99
+ EM (rxrpc_eproto_early_reply , "early-reply" ) \
100
+ EM (rxrpc_eproto_improper_term , "improper-term" ) \
101
+ EM (rxrpc_eproto_no_client_call , "no-cl-call" ) \
102
+ EM (rxrpc_eproto_no_client_conn , "no-cl-conn" ) \
103
+ EM (rxrpc_eproto_no_service_call , "no-sv-call" ) \
104
+ EM (rxrpc_eproto_reupgrade , "re-upgrade" ) \
105
+ EM (rxrpc_eproto_rxnull_challenge , "rxnull-chall" ) \
106
+ EM (rxrpc_eproto_rxnull_response , "rxnull-resp" ) \
107
+ EM (rxrpc_eproto_tx_rot_last , "tx-rot-last" ) \
108
+ EM (rxrpc_eproto_unexpected_ack , "unex-ack" ) \
109
+ EM (rxrpc_eproto_unexpected_ackall , "unex-ackall" ) \
110
+ EM (rxrpc_eproto_unexpected_implicit_end , "unex-impl-end" ) \
111
+ EM (rxrpc_eproto_unexpected_reply , "unex-reply" ) \
112
+ EM (rxrpc_eproto_wrong_security , "wrong-sec" ) \
113
+ EM (rxrpc_recvmsg_excess_data , "recvmsg-excess" ) \
114
+ EM (rxrpc_recvmsg_short_data , "recvmsg-short" ) \
115
+ E_ (rxrpc_sendmsg_late_send , "sendmsg-late" )
116
+
19
117
#define rxrpc_call_poke_traces \
20
118
EM(rxrpc_call_poke_abort, "Abort") \
21
119
EM(rxrpc_call_poke_complete, "Compl") \
382
480
#define EM (a , b ) a,
383
481
#define E_ (a , b ) a
384
482
483
+ enum rxrpc_abort_reason { rxrpc_abort_reasons } __mode (byte );
385
484
enum rxrpc_bundle_trace { rxrpc_bundle_traces } __mode (byte );
386
485
enum rxrpc_call_poke_trace { rxrpc_call_poke_traces } __mode (byte );
387
486
enum rxrpc_call_trace { rxrpc_call_traces } __mode (byte );
@@ -410,9 +509,13 @@ enum rxrpc_txqueue_trace { rxrpc_txqueue_traces } __mode(byte);
410
509
*/
411
510
#undef EM
412
511
#undef E_
512
+
513
+ #ifndef RXRPC_TRACE_ONLY_DEFINE_ENUMS
514
+
413
515
#define EM (a , b ) TRACE_DEFINE_ENUM(a);
414
516
#define E_ (a , b ) TRACE_DEFINE_ENUM(a);
415
517
518
+ rxrpc_abort_reasons ;
416
519
rxrpc_bundle_traces ;
417
520
rxrpc_call_poke_traces ;
418
521
rxrpc_call_traces ;
@@ -663,14 +766,14 @@ TRACE_EVENT(rxrpc_rx_done,
663
766
);
664
767
665
768
TRACE_EVENT (rxrpc_abort ,
666
- TP_PROTO (unsigned int call_nr , const char * why , u32 cid , u32 call_id ,
667
- rxrpc_seq_t seq , int abort_code , int error ),
769
+ TP_PROTO (unsigned int call_nr , enum rxrpc_abort_reason why ,
770
+ u32 cid , u32 call_id , rxrpc_seq_t seq , int abort_code , int error ),
668
771
669
772
TP_ARGS (call_nr , why , cid , call_id , seq , abort_code , error ),
670
773
671
774
TP_STRUCT__entry (
672
775
__field (unsigned int , call_nr )
673
- __array ( char , why , 4 )
776
+ __field ( enum rxrpc_abort_reason , why )
674
777
__field (u32 , cid )
675
778
__field (u32 , call_id )
676
779
__field (rxrpc_seq_t , seq )
@@ -679,8 +782,8 @@ TRACE_EVENT(rxrpc_abort,
679
782
),
680
783
681
784
TP_fast_assign (
682
- memcpy (__entry -> why , why , 4 );
683
785
__entry -> call_nr = call_nr ;
786
+ __entry -> why = why ;
684
787
__entry -> cid = cid ;
685
788
__entry -> call_id = call_id ;
686
789
__entry -> abort_code = abort_code ;
@@ -691,7 +794,8 @@ TRACE_EVENT(rxrpc_abort,
691
794
TP_printk ("c=%08x %08x:%08x s=%u a=%d e=%d %s" ,
692
795
__entry -> call_nr ,
693
796
__entry -> cid , __entry -> call_id , __entry -> seq ,
694
- __entry -> abort_code , __entry -> error , __entry -> why )
797
+ __entry -> abort_code , __entry -> error ,
798
+ __print_symbolic (__entry -> why , rxrpc_abort_reasons ))
695
799
);
696
800
697
801
TRACE_EVENT (rxrpc_call_complete ,
@@ -1527,30 +1631,6 @@ TRACE_EVENT(rxrpc_improper_term,
1527
1631
__entry -> abort_code )
1528
1632
);
1529
1633
1530
- TRACE_EVENT (rxrpc_rx_eproto ,
1531
- TP_PROTO (struct rxrpc_call * call , rxrpc_serial_t serial ,
1532
- const char * why ),
1533
-
1534
- TP_ARGS (call , serial , why ),
1535
-
1536
- TP_STRUCT__entry (
1537
- __field (unsigned int , call )
1538
- __field (rxrpc_serial_t , serial )
1539
- __field (const char * , why )
1540
- ),
1541
-
1542
- TP_fast_assign (
1543
- __entry -> call = call ? call -> debug_id : 0 ;
1544
- __entry -> serial = serial ;
1545
- __entry -> why = why ;
1546
- ),
1547
-
1548
- TP_printk ("c=%08x EPROTO %08x %s" ,
1549
- __entry -> call ,
1550
- __entry -> serial ,
1551
- __entry -> why )
1552
- );
1553
-
1554
1634
TRACE_EVENT (rxrpc_connect_call ,
1555
1635
TP_PROTO (struct rxrpc_call * call ),
1556
1636
@@ -1848,6 +1928,8 @@ TRACE_EVENT(rxrpc_call_poked,
1848
1928
1849
1929
#undef EM
1850
1930
#undef E_
1931
+
1932
+ #endif /* RXRPC_TRACE_ONLY_DEFINE_ENUMS */
1851
1933
#endif /* _TRACE_RXRPC_H */
1852
1934
1853
1935
/* This part must be outside protection */
0 commit comments