162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (C) 2018, Microsoft Corporation. 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Author(s): Steve French <stfrench@microsoft.com> 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci#undef TRACE_SYSTEM 862306a36Sopenharmony_ci#define TRACE_SYSTEM cifs 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#if !defined(_CIFS_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) 1162306a36Sopenharmony_ci#define _CIFS_TRACE_H 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#include <linux/tracepoint.h> 1462306a36Sopenharmony_ci#include <linux/net.h> 1562306a36Sopenharmony_ci#include <linux/inet.h> 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci/* 1862306a36Sopenharmony_ci * Please use this 3-part article as a reference for writing new tracepoints: 1962306a36Sopenharmony_ci * https://lwn.net/Articles/379903/ 2062306a36Sopenharmony_ci */ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* For logging errors in read or write */ 2362306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_rw_err_class, 2462306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 2562306a36Sopenharmony_ci __u64 fid, 2662306a36Sopenharmony_ci __u32 tid, 2762306a36Sopenharmony_ci __u64 sesid, 2862306a36Sopenharmony_ci __u64 offset, 2962306a36Sopenharmony_ci __u32 len, 3062306a36Sopenharmony_ci int rc), 3162306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, offset, len, rc), 3262306a36Sopenharmony_ci TP_STRUCT__entry( 3362306a36Sopenharmony_ci __field(unsigned int, xid) 3462306a36Sopenharmony_ci __field(__u64, fid) 3562306a36Sopenharmony_ci __field(__u32, tid) 3662306a36Sopenharmony_ci __field(__u64, sesid) 3762306a36Sopenharmony_ci __field(__u64, offset) 3862306a36Sopenharmony_ci __field(__u32, len) 3962306a36Sopenharmony_ci __field(int, rc) 4062306a36Sopenharmony_ci ), 4162306a36Sopenharmony_ci TP_fast_assign( 4262306a36Sopenharmony_ci __entry->xid = xid; 4362306a36Sopenharmony_ci __entry->fid = fid; 4462306a36Sopenharmony_ci __entry->tid = tid; 4562306a36Sopenharmony_ci __entry->sesid = sesid; 4662306a36Sopenharmony_ci __entry->offset = offset; 4762306a36Sopenharmony_ci __entry->len = len; 4862306a36Sopenharmony_ci __entry->rc = rc; 4962306a36Sopenharmony_ci ), 5062306a36Sopenharmony_ci TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx len=0x%x rc=%d", 5162306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 5262306a36Sopenharmony_ci __entry->offset, __entry->len, __entry->rc) 5362306a36Sopenharmony_ci) 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#define DEFINE_SMB3_RW_ERR_EVENT(name) \ 5662306a36Sopenharmony_ciDEFINE_EVENT(smb3_rw_err_class, smb3_##name, \ 5762306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 5862306a36Sopenharmony_ci __u64 fid, \ 5962306a36Sopenharmony_ci __u32 tid, \ 6062306a36Sopenharmony_ci __u64 sesid, \ 6162306a36Sopenharmony_ci __u64 offset, \ 6262306a36Sopenharmony_ci __u32 len, \ 6362306a36Sopenharmony_ci int rc), \ 6462306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, offset, len, rc)) 6562306a36Sopenharmony_ci 6662306a36Sopenharmony_ciDEFINE_SMB3_RW_ERR_EVENT(write_err); 6762306a36Sopenharmony_ciDEFINE_SMB3_RW_ERR_EVENT(read_err); 6862306a36Sopenharmony_ciDEFINE_SMB3_RW_ERR_EVENT(query_dir_err); 6962306a36Sopenharmony_ciDEFINE_SMB3_RW_ERR_EVENT(zero_err); 7062306a36Sopenharmony_ciDEFINE_SMB3_RW_ERR_EVENT(falloc_err); 7162306a36Sopenharmony_ci 7262306a36Sopenharmony_ci 7362306a36Sopenharmony_ci/* For logging successful read or write */ 7462306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_rw_done_class, 7562306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 7662306a36Sopenharmony_ci __u64 fid, 7762306a36Sopenharmony_ci __u32 tid, 7862306a36Sopenharmony_ci __u64 sesid, 7962306a36Sopenharmony_ci __u64 offset, 8062306a36Sopenharmony_ci __u32 len), 8162306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, offset, len), 8262306a36Sopenharmony_ci TP_STRUCT__entry( 8362306a36Sopenharmony_ci __field(unsigned int, xid) 8462306a36Sopenharmony_ci __field(__u64, fid) 8562306a36Sopenharmony_ci __field(__u32, tid) 8662306a36Sopenharmony_ci __field(__u64, sesid) 8762306a36Sopenharmony_ci __field(__u64, offset) 8862306a36Sopenharmony_ci __field(__u32, len) 8962306a36Sopenharmony_ci ), 9062306a36Sopenharmony_ci TP_fast_assign( 9162306a36Sopenharmony_ci __entry->xid = xid; 9262306a36Sopenharmony_ci __entry->fid = fid; 9362306a36Sopenharmony_ci __entry->tid = tid; 9462306a36Sopenharmony_ci __entry->sesid = sesid; 9562306a36Sopenharmony_ci __entry->offset = offset; 9662306a36Sopenharmony_ci __entry->len = len; 9762306a36Sopenharmony_ci ), 9862306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx len=0x%x", 9962306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 10062306a36Sopenharmony_ci __entry->offset, __entry->len) 10162306a36Sopenharmony_ci) 10262306a36Sopenharmony_ci 10362306a36Sopenharmony_ci#define DEFINE_SMB3_RW_DONE_EVENT(name) \ 10462306a36Sopenharmony_ciDEFINE_EVENT(smb3_rw_done_class, smb3_##name, \ 10562306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 10662306a36Sopenharmony_ci __u64 fid, \ 10762306a36Sopenharmony_ci __u32 tid, \ 10862306a36Sopenharmony_ci __u64 sesid, \ 10962306a36Sopenharmony_ci __u64 offset, \ 11062306a36Sopenharmony_ci __u32 len), \ 11162306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, offset, len)) 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(write_enter); 11462306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(read_enter); 11562306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(query_dir_enter); 11662306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(zero_enter); 11762306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(falloc_enter); 11862306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(write_done); 11962306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(read_done); 12062306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(query_dir_done); 12162306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(zero_done); 12262306a36Sopenharmony_ciDEFINE_SMB3_RW_DONE_EVENT(falloc_done); 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci/* For logging successful set EOF (truncate) */ 12562306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_eof_class, 12662306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 12762306a36Sopenharmony_ci __u64 fid, 12862306a36Sopenharmony_ci __u32 tid, 12962306a36Sopenharmony_ci __u64 sesid, 13062306a36Sopenharmony_ci __u64 offset), 13162306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, offset), 13262306a36Sopenharmony_ci TP_STRUCT__entry( 13362306a36Sopenharmony_ci __field(unsigned int, xid) 13462306a36Sopenharmony_ci __field(__u64, fid) 13562306a36Sopenharmony_ci __field(__u32, tid) 13662306a36Sopenharmony_ci __field(__u64, sesid) 13762306a36Sopenharmony_ci __field(__u64, offset) 13862306a36Sopenharmony_ci ), 13962306a36Sopenharmony_ci TP_fast_assign( 14062306a36Sopenharmony_ci __entry->xid = xid; 14162306a36Sopenharmony_ci __entry->fid = fid; 14262306a36Sopenharmony_ci __entry->tid = tid; 14362306a36Sopenharmony_ci __entry->sesid = sesid; 14462306a36Sopenharmony_ci __entry->offset = offset; 14562306a36Sopenharmony_ci ), 14662306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx offset=0x%llx", 14762306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 14862306a36Sopenharmony_ci __entry->offset) 14962306a36Sopenharmony_ci) 15062306a36Sopenharmony_ci 15162306a36Sopenharmony_ci#define DEFINE_SMB3_EOF_EVENT(name) \ 15262306a36Sopenharmony_ciDEFINE_EVENT(smb3_eof_class, smb3_##name, \ 15362306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 15462306a36Sopenharmony_ci __u64 fid, \ 15562306a36Sopenharmony_ci __u32 tid, \ 15662306a36Sopenharmony_ci __u64 sesid, \ 15762306a36Sopenharmony_ci __u64 offset), \ 15862306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, offset)) 15962306a36Sopenharmony_ci 16062306a36Sopenharmony_ciDEFINE_SMB3_EOF_EVENT(set_eof); 16162306a36Sopenharmony_ci 16262306a36Sopenharmony_ci/* 16362306a36Sopenharmony_ci * For handle based calls other than read and write, and get/set info 16462306a36Sopenharmony_ci */ 16562306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_fd_class, 16662306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 16762306a36Sopenharmony_ci __u64 fid, 16862306a36Sopenharmony_ci __u32 tid, 16962306a36Sopenharmony_ci __u64 sesid), 17062306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid), 17162306a36Sopenharmony_ci TP_STRUCT__entry( 17262306a36Sopenharmony_ci __field(unsigned int, xid) 17362306a36Sopenharmony_ci __field(__u64, fid) 17462306a36Sopenharmony_ci __field(__u32, tid) 17562306a36Sopenharmony_ci __field(__u64, sesid) 17662306a36Sopenharmony_ci ), 17762306a36Sopenharmony_ci TP_fast_assign( 17862306a36Sopenharmony_ci __entry->xid = xid; 17962306a36Sopenharmony_ci __entry->fid = fid; 18062306a36Sopenharmony_ci __entry->tid = tid; 18162306a36Sopenharmony_ci __entry->sesid = sesid; 18262306a36Sopenharmony_ci ), 18362306a36Sopenharmony_ci TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx", 18462306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid) 18562306a36Sopenharmony_ci) 18662306a36Sopenharmony_ci 18762306a36Sopenharmony_ci#define DEFINE_SMB3_FD_EVENT(name) \ 18862306a36Sopenharmony_ciDEFINE_EVENT(smb3_fd_class, smb3_##name, \ 18962306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 19062306a36Sopenharmony_ci __u64 fid, \ 19162306a36Sopenharmony_ci __u32 tid, \ 19262306a36Sopenharmony_ci __u64 sesid), \ 19362306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid)) 19462306a36Sopenharmony_ci 19562306a36Sopenharmony_ciDEFINE_SMB3_FD_EVENT(flush_enter); 19662306a36Sopenharmony_ciDEFINE_SMB3_FD_EVENT(flush_done); 19762306a36Sopenharmony_ciDEFINE_SMB3_FD_EVENT(close_enter); 19862306a36Sopenharmony_ciDEFINE_SMB3_FD_EVENT(close_done); 19962306a36Sopenharmony_ciDEFINE_SMB3_FD_EVENT(oplock_not_found); 20062306a36Sopenharmony_ci 20162306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_fd_err_class, 20262306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 20362306a36Sopenharmony_ci __u64 fid, 20462306a36Sopenharmony_ci __u32 tid, 20562306a36Sopenharmony_ci __u64 sesid, 20662306a36Sopenharmony_ci int rc), 20762306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, rc), 20862306a36Sopenharmony_ci TP_STRUCT__entry( 20962306a36Sopenharmony_ci __field(unsigned int, xid) 21062306a36Sopenharmony_ci __field(__u64, fid) 21162306a36Sopenharmony_ci __field(__u32, tid) 21262306a36Sopenharmony_ci __field(__u64, sesid) 21362306a36Sopenharmony_ci __field(int, rc) 21462306a36Sopenharmony_ci ), 21562306a36Sopenharmony_ci TP_fast_assign( 21662306a36Sopenharmony_ci __entry->xid = xid; 21762306a36Sopenharmony_ci __entry->fid = fid; 21862306a36Sopenharmony_ci __entry->tid = tid; 21962306a36Sopenharmony_ci __entry->sesid = sesid; 22062306a36Sopenharmony_ci __entry->rc = rc; 22162306a36Sopenharmony_ci ), 22262306a36Sopenharmony_ci TP_printk("\txid=%u sid=0x%llx tid=0x%x fid=0x%llx rc=%d", 22362306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 22462306a36Sopenharmony_ci __entry->rc) 22562306a36Sopenharmony_ci) 22662306a36Sopenharmony_ci 22762306a36Sopenharmony_ci#define DEFINE_SMB3_FD_ERR_EVENT(name) \ 22862306a36Sopenharmony_ciDEFINE_EVENT(smb3_fd_err_class, smb3_##name, \ 22962306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 23062306a36Sopenharmony_ci __u64 fid, \ 23162306a36Sopenharmony_ci __u32 tid, \ 23262306a36Sopenharmony_ci __u64 sesid, \ 23362306a36Sopenharmony_ci int rc), \ 23462306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, rc)) 23562306a36Sopenharmony_ci 23662306a36Sopenharmony_ciDEFINE_SMB3_FD_ERR_EVENT(flush_err); 23762306a36Sopenharmony_ciDEFINE_SMB3_FD_ERR_EVENT(lock_err); 23862306a36Sopenharmony_ciDEFINE_SMB3_FD_ERR_EVENT(close_err); 23962306a36Sopenharmony_ci 24062306a36Sopenharmony_ci/* 24162306a36Sopenharmony_ci * For handle based query/set info calls 24262306a36Sopenharmony_ci */ 24362306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_inf_enter_class, 24462306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 24562306a36Sopenharmony_ci __u64 fid, 24662306a36Sopenharmony_ci __u32 tid, 24762306a36Sopenharmony_ci __u64 sesid, 24862306a36Sopenharmony_ci __u8 infclass, 24962306a36Sopenharmony_ci __u32 type), 25062306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, infclass, type), 25162306a36Sopenharmony_ci TP_STRUCT__entry( 25262306a36Sopenharmony_ci __field(unsigned int, xid) 25362306a36Sopenharmony_ci __field(__u64, fid) 25462306a36Sopenharmony_ci __field(__u32, tid) 25562306a36Sopenharmony_ci __field(__u64, sesid) 25662306a36Sopenharmony_ci __field(__u8, infclass) 25762306a36Sopenharmony_ci __field(__u32, type) 25862306a36Sopenharmony_ci ), 25962306a36Sopenharmony_ci TP_fast_assign( 26062306a36Sopenharmony_ci __entry->xid = xid; 26162306a36Sopenharmony_ci __entry->fid = fid; 26262306a36Sopenharmony_ci __entry->tid = tid; 26362306a36Sopenharmony_ci __entry->sesid = sesid; 26462306a36Sopenharmony_ci __entry->infclass = infclass; 26562306a36Sopenharmony_ci __entry->type = type; 26662306a36Sopenharmony_ci ), 26762306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx class=%u type=0x%x", 26862306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 26962306a36Sopenharmony_ci __entry->infclass, __entry->type) 27062306a36Sopenharmony_ci) 27162306a36Sopenharmony_ci 27262306a36Sopenharmony_ci#define DEFINE_SMB3_INF_ENTER_EVENT(name) \ 27362306a36Sopenharmony_ciDEFINE_EVENT(smb3_inf_enter_class, smb3_##name, \ 27462306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 27562306a36Sopenharmony_ci __u64 fid, \ 27662306a36Sopenharmony_ci __u32 tid, \ 27762306a36Sopenharmony_ci __u64 sesid, \ 27862306a36Sopenharmony_ci __u8 infclass, \ 27962306a36Sopenharmony_ci __u32 type), \ 28062306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, infclass, type)) 28162306a36Sopenharmony_ci 28262306a36Sopenharmony_ciDEFINE_SMB3_INF_ENTER_EVENT(query_info_enter); 28362306a36Sopenharmony_ciDEFINE_SMB3_INF_ENTER_EVENT(query_info_done); 28462306a36Sopenharmony_ciDEFINE_SMB3_INF_ENTER_EVENT(notify_enter); 28562306a36Sopenharmony_ciDEFINE_SMB3_INF_ENTER_EVENT(notify_done); 28662306a36Sopenharmony_ci 28762306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_inf_err_class, 28862306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 28962306a36Sopenharmony_ci __u64 fid, 29062306a36Sopenharmony_ci __u32 tid, 29162306a36Sopenharmony_ci __u64 sesid, 29262306a36Sopenharmony_ci __u8 infclass, 29362306a36Sopenharmony_ci __u32 type, 29462306a36Sopenharmony_ci int rc), 29562306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, infclass, type, rc), 29662306a36Sopenharmony_ci TP_STRUCT__entry( 29762306a36Sopenharmony_ci __field(unsigned int, xid) 29862306a36Sopenharmony_ci __field(__u64, fid) 29962306a36Sopenharmony_ci __field(__u32, tid) 30062306a36Sopenharmony_ci __field(__u64, sesid) 30162306a36Sopenharmony_ci __field(__u8, infclass) 30262306a36Sopenharmony_ci __field(__u32, type) 30362306a36Sopenharmony_ci __field(int, rc) 30462306a36Sopenharmony_ci ), 30562306a36Sopenharmony_ci TP_fast_assign( 30662306a36Sopenharmony_ci __entry->xid = xid; 30762306a36Sopenharmony_ci __entry->fid = fid; 30862306a36Sopenharmony_ci __entry->tid = tid; 30962306a36Sopenharmony_ci __entry->sesid = sesid; 31062306a36Sopenharmony_ci __entry->infclass = infclass; 31162306a36Sopenharmony_ci __entry->type = type; 31262306a36Sopenharmony_ci __entry->rc = rc; 31362306a36Sopenharmony_ci ), 31462306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx class=%u type=0x%x rc=%d", 31562306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 31662306a36Sopenharmony_ci __entry->infclass, __entry->type, __entry->rc) 31762306a36Sopenharmony_ci) 31862306a36Sopenharmony_ci 31962306a36Sopenharmony_ci#define DEFINE_SMB3_INF_ERR_EVENT(name) \ 32062306a36Sopenharmony_ciDEFINE_EVENT(smb3_inf_err_class, smb3_##name, \ 32162306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 32262306a36Sopenharmony_ci __u64 fid, \ 32362306a36Sopenharmony_ci __u32 tid, \ 32462306a36Sopenharmony_ci __u64 sesid, \ 32562306a36Sopenharmony_ci __u8 infclass, \ 32662306a36Sopenharmony_ci __u32 type, \ 32762306a36Sopenharmony_ci int rc), \ 32862306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, infclass, type, rc)) 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ciDEFINE_SMB3_INF_ERR_EVENT(query_info_err); 33162306a36Sopenharmony_ciDEFINE_SMB3_INF_ERR_EVENT(set_info_err); 33262306a36Sopenharmony_ciDEFINE_SMB3_INF_ERR_EVENT(notify_err); 33362306a36Sopenharmony_ciDEFINE_SMB3_INF_ERR_EVENT(fsctl_err); 33462306a36Sopenharmony_ci 33562306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_inf_compound_enter_class, 33662306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 33762306a36Sopenharmony_ci __u32 tid, 33862306a36Sopenharmony_ci __u64 sesid, 33962306a36Sopenharmony_ci const char *full_path), 34062306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, full_path), 34162306a36Sopenharmony_ci TP_STRUCT__entry( 34262306a36Sopenharmony_ci __field(unsigned int, xid) 34362306a36Sopenharmony_ci __field(__u32, tid) 34462306a36Sopenharmony_ci __field(__u64, sesid) 34562306a36Sopenharmony_ci __string(path, full_path) 34662306a36Sopenharmony_ci ), 34762306a36Sopenharmony_ci TP_fast_assign( 34862306a36Sopenharmony_ci __entry->xid = xid; 34962306a36Sopenharmony_ci __entry->tid = tid; 35062306a36Sopenharmony_ci __entry->sesid = sesid; 35162306a36Sopenharmony_ci __assign_str(path, full_path); 35262306a36Sopenharmony_ci ), 35362306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x path=%s", 35462306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, 35562306a36Sopenharmony_ci __get_str(path)) 35662306a36Sopenharmony_ci) 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci#define DEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(name) \ 35962306a36Sopenharmony_ciDEFINE_EVENT(smb3_inf_compound_enter_class, smb3_##name, \ 36062306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 36162306a36Sopenharmony_ci __u32 tid, \ 36262306a36Sopenharmony_ci __u64 sesid, \ 36362306a36Sopenharmony_ci const char *full_path), \ 36462306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, full_path)) 36562306a36Sopenharmony_ci 36662306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(query_info_compound_enter); 36762306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(posix_query_info_compound_enter); 36862306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(hardlink_enter); 36962306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(rename_enter); 37062306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(rmdir_enter); 37162306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(set_eof_enter); 37262306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(set_info_compound_enter); 37362306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(delete_enter); 37462306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(mkdir_enter); 37562306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ENTER_EVENT(tdis_enter); 37662306a36Sopenharmony_ci 37762306a36Sopenharmony_ci 37862306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_inf_compound_done_class, 37962306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 38062306a36Sopenharmony_ci __u32 tid, 38162306a36Sopenharmony_ci __u64 sesid), 38262306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid), 38362306a36Sopenharmony_ci TP_STRUCT__entry( 38462306a36Sopenharmony_ci __field(unsigned int, xid) 38562306a36Sopenharmony_ci __field(__u32, tid) 38662306a36Sopenharmony_ci __field(__u64, sesid) 38762306a36Sopenharmony_ci ), 38862306a36Sopenharmony_ci TP_fast_assign( 38962306a36Sopenharmony_ci __entry->xid = xid; 39062306a36Sopenharmony_ci __entry->tid = tid; 39162306a36Sopenharmony_ci __entry->sesid = sesid; 39262306a36Sopenharmony_ci ), 39362306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x", 39462306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid) 39562306a36Sopenharmony_ci) 39662306a36Sopenharmony_ci 39762306a36Sopenharmony_ci#define DEFINE_SMB3_INF_COMPOUND_DONE_EVENT(name) \ 39862306a36Sopenharmony_ciDEFINE_EVENT(smb3_inf_compound_done_class, smb3_##name, \ 39962306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 40062306a36Sopenharmony_ci __u32 tid, \ 40162306a36Sopenharmony_ci __u64 sesid), \ 40262306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid)) 40362306a36Sopenharmony_ci 40462306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(query_info_compound_done); 40562306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(posix_query_info_compound_done); 40662306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(hardlink_done); 40762306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(rename_done); 40862306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(rmdir_done); 40962306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(set_eof_done); 41062306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(set_info_compound_done); 41162306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(delete_done); 41262306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(mkdir_done); 41362306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_DONE_EVENT(tdis_done); 41462306a36Sopenharmony_ci 41562306a36Sopenharmony_ci 41662306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_inf_compound_err_class, 41762306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 41862306a36Sopenharmony_ci __u32 tid, 41962306a36Sopenharmony_ci __u64 sesid, 42062306a36Sopenharmony_ci int rc), 42162306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, rc), 42262306a36Sopenharmony_ci TP_STRUCT__entry( 42362306a36Sopenharmony_ci __field(unsigned int, xid) 42462306a36Sopenharmony_ci __field(__u32, tid) 42562306a36Sopenharmony_ci __field(__u64, sesid) 42662306a36Sopenharmony_ci __field(int, rc) 42762306a36Sopenharmony_ci ), 42862306a36Sopenharmony_ci TP_fast_assign( 42962306a36Sopenharmony_ci __entry->xid = xid; 43062306a36Sopenharmony_ci __entry->tid = tid; 43162306a36Sopenharmony_ci __entry->sesid = sesid; 43262306a36Sopenharmony_ci __entry->rc = rc; 43362306a36Sopenharmony_ci ), 43462306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x rc=%d", 43562306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, 43662306a36Sopenharmony_ci __entry->rc) 43762306a36Sopenharmony_ci) 43862306a36Sopenharmony_ci 43962306a36Sopenharmony_ci#define DEFINE_SMB3_INF_COMPOUND_ERR_EVENT(name) \ 44062306a36Sopenharmony_ciDEFINE_EVENT(smb3_inf_compound_err_class, smb3_##name, \ 44162306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 44262306a36Sopenharmony_ci __u32 tid, \ 44362306a36Sopenharmony_ci __u64 sesid, \ 44462306a36Sopenharmony_ci int rc), \ 44562306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, rc)) 44662306a36Sopenharmony_ci 44762306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(query_info_compound_err); 44862306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(posix_query_info_compound_err); 44962306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(hardlink_err); 45062306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(rename_err); 45162306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(rmdir_err); 45262306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(set_eof_err); 45362306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(set_info_compound_err); 45462306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(mkdir_err); 45562306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(delete_err); 45662306a36Sopenharmony_ciDEFINE_SMB3_INF_COMPOUND_ERR_EVENT(tdis_err); 45762306a36Sopenharmony_ci 45862306a36Sopenharmony_ci/* 45962306a36Sopenharmony_ci * For logging SMB3 Status code and Command for responses which return errors 46062306a36Sopenharmony_ci */ 46162306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_cmd_err_class, 46262306a36Sopenharmony_ci TP_PROTO(__u32 tid, 46362306a36Sopenharmony_ci __u64 sesid, 46462306a36Sopenharmony_ci __u16 cmd, 46562306a36Sopenharmony_ci __u64 mid, 46662306a36Sopenharmony_ci __u32 status, 46762306a36Sopenharmony_ci int rc), 46862306a36Sopenharmony_ci TP_ARGS(tid, sesid, cmd, mid, status, rc), 46962306a36Sopenharmony_ci TP_STRUCT__entry( 47062306a36Sopenharmony_ci __field(__u32, tid) 47162306a36Sopenharmony_ci __field(__u64, sesid) 47262306a36Sopenharmony_ci __field(__u16, cmd) 47362306a36Sopenharmony_ci __field(__u64, mid) 47462306a36Sopenharmony_ci __field(__u32, status) 47562306a36Sopenharmony_ci __field(int, rc) 47662306a36Sopenharmony_ci ), 47762306a36Sopenharmony_ci TP_fast_assign( 47862306a36Sopenharmony_ci __entry->tid = tid; 47962306a36Sopenharmony_ci __entry->sesid = sesid; 48062306a36Sopenharmony_ci __entry->cmd = cmd; 48162306a36Sopenharmony_ci __entry->mid = mid; 48262306a36Sopenharmony_ci __entry->status = status; 48362306a36Sopenharmony_ci __entry->rc = rc; 48462306a36Sopenharmony_ci ), 48562306a36Sopenharmony_ci TP_printk("\tsid=0x%llx tid=0x%x cmd=%u mid=%llu status=0x%x rc=%d", 48662306a36Sopenharmony_ci __entry->sesid, __entry->tid, __entry->cmd, __entry->mid, 48762306a36Sopenharmony_ci __entry->status, __entry->rc) 48862306a36Sopenharmony_ci) 48962306a36Sopenharmony_ci 49062306a36Sopenharmony_ci#define DEFINE_SMB3_CMD_ERR_EVENT(name) \ 49162306a36Sopenharmony_ciDEFINE_EVENT(smb3_cmd_err_class, smb3_##name, \ 49262306a36Sopenharmony_ci TP_PROTO(__u32 tid, \ 49362306a36Sopenharmony_ci __u64 sesid, \ 49462306a36Sopenharmony_ci __u16 cmd, \ 49562306a36Sopenharmony_ci __u64 mid, \ 49662306a36Sopenharmony_ci __u32 status, \ 49762306a36Sopenharmony_ci int rc), \ 49862306a36Sopenharmony_ci TP_ARGS(tid, sesid, cmd, mid, status, rc)) 49962306a36Sopenharmony_ci 50062306a36Sopenharmony_ciDEFINE_SMB3_CMD_ERR_EVENT(cmd_err); 50162306a36Sopenharmony_ci 50262306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_cmd_done_class, 50362306a36Sopenharmony_ci TP_PROTO(__u32 tid, 50462306a36Sopenharmony_ci __u64 sesid, 50562306a36Sopenharmony_ci __u16 cmd, 50662306a36Sopenharmony_ci __u64 mid), 50762306a36Sopenharmony_ci TP_ARGS(tid, sesid, cmd, mid), 50862306a36Sopenharmony_ci TP_STRUCT__entry( 50962306a36Sopenharmony_ci __field(__u32, tid) 51062306a36Sopenharmony_ci __field(__u64, sesid) 51162306a36Sopenharmony_ci __field(__u16, cmd) 51262306a36Sopenharmony_ci __field(__u64, mid) 51362306a36Sopenharmony_ci ), 51462306a36Sopenharmony_ci TP_fast_assign( 51562306a36Sopenharmony_ci __entry->tid = tid; 51662306a36Sopenharmony_ci __entry->sesid = sesid; 51762306a36Sopenharmony_ci __entry->cmd = cmd; 51862306a36Sopenharmony_ci __entry->mid = mid; 51962306a36Sopenharmony_ci ), 52062306a36Sopenharmony_ci TP_printk("\tsid=0x%llx tid=0x%x cmd=%u mid=%llu", 52162306a36Sopenharmony_ci __entry->sesid, __entry->tid, 52262306a36Sopenharmony_ci __entry->cmd, __entry->mid) 52362306a36Sopenharmony_ci) 52462306a36Sopenharmony_ci 52562306a36Sopenharmony_ci#define DEFINE_SMB3_CMD_DONE_EVENT(name) \ 52662306a36Sopenharmony_ciDEFINE_EVENT(smb3_cmd_done_class, smb3_##name, \ 52762306a36Sopenharmony_ci TP_PROTO(__u32 tid, \ 52862306a36Sopenharmony_ci __u64 sesid, \ 52962306a36Sopenharmony_ci __u16 cmd, \ 53062306a36Sopenharmony_ci __u64 mid), \ 53162306a36Sopenharmony_ci TP_ARGS(tid, sesid, cmd, mid)) 53262306a36Sopenharmony_ci 53362306a36Sopenharmony_ciDEFINE_SMB3_CMD_DONE_EVENT(cmd_enter); 53462306a36Sopenharmony_ciDEFINE_SMB3_CMD_DONE_EVENT(cmd_done); 53562306a36Sopenharmony_ciDEFINE_SMB3_CMD_DONE_EVENT(ses_expired); 53662306a36Sopenharmony_ci 53762306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_mid_class, 53862306a36Sopenharmony_ci TP_PROTO(__u16 cmd, 53962306a36Sopenharmony_ci __u64 mid, 54062306a36Sopenharmony_ci __u32 pid, 54162306a36Sopenharmony_ci unsigned long when_sent, 54262306a36Sopenharmony_ci unsigned long when_received), 54362306a36Sopenharmony_ci TP_ARGS(cmd, mid, pid, when_sent, when_received), 54462306a36Sopenharmony_ci TP_STRUCT__entry( 54562306a36Sopenharmony_ci __field(__u16, cmd) 54662306a36Sopenharmony_ci __field(__u64, mid) 54762306a36Sopenharmony_ci __field(__u32, pid) 54862306a36Sopenharmony_ci __field(unsigned long, when_sent) 54962306a36Sopenharmony_ci __field(unsigned long, when_received) 55062306a36Sopenharmony_ci ), 55162306a36Sopenharmony_ci TP_fast_assign( 55262306a36Sopenharmony_ci __entry->cmd = cmd; 55362306a36Sopenharmony_ci __entry->mid = mid; 55462306a36Sopenharmony_ci __entry->pid = pid; 55562306a36Sopenharmony_ci __entry->when_sent = when_sent; 55662306a36Sopenharmony_ci __entry->when_received = when_received; 55762306a36Sopenharmony_ci ), 55862306a36Sopenharmony_ci TP_printk("\tcmd=%u mid=%llu pid=%u, when_sent=%lu when_rcv=%lu", 55962306a36Sopenharmony_ci __entry->cmd, __entry->mid, __entry->pid, __entry->when_sent, 56062306a36Sopenharmony_ci __entry->when_received) 56162306a36Sopenharmony_ci) 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci#define DEFINE_SMB3_MID_EVENT(name) \ 56462306a36Sopenharmony_ciDEFINE_EVENT(smb3_mid_class, smb3_##name, \ 56562306a36Sopenharmony_ci TP_PROTO(__u16 cmd, \ 56662306a36Sopenharmony_ci __u64 mid, \ 56762306a36Sopenharmony_ci __u32 pid, \ 56862306a36Sopenharmony_ci unsigned long when_sent, \ 56962306a36Sopenharmony_ci unsigned long when_received), \ 57062306a36Sopenharmony_ci TP_ARGS(cmd, mid, pid, when_sent, when_received)) 57162306a36Sopenharmony_ci 57262306a36Sopenharmony_ciDEFINE_SMB3_MID_EVENT(slow_rsp); 57362306a36Sopenharmony_ci 57462306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_exit_err_class, 57562306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 57662306a36Sopenharmony_ci const char *func_name, 57762306a36Sopenharmony_ci int rc), 57862306a36Sopenharmony_ci TP_ARGS(xid, func_name, rc), 57962306a36Sopenharmony_ci TP_STRUCT__entry( 58062306a36Sopenharmony_ci __field(unsigned int, xid) 58162306a36Sopenharmony_ci __string(func_name, func_name) 58262306a36Sopenharmony_ci __field(int, rc) 58362306a36Sopenharmony_ci ), 58462306a36Sopenharmony_ci TP_fast_assign( 58562306a36Sopenharmony_ci __entry->xid = xid; 58662306a36Sopenharmony_ci __assign_str(func_name, func_name); 58762306a36Sopenharmony_ci __entry->rc = rc; 58862306a36Sopenharmony_ci ), 58962306a36Sopenharmony_ci TP_printk("\t%s: xid=%u rc=%d", 59062306a36Sopenharmony_ci __get_str(func_name), __entry->xid, __entry->rc) 59162306a36Sopenharmony_ci) 59262306a36Sopenharmony_ci 59362306a36Sopenharmony_ci#define DEFINE_SMB3_EXIT_ERR_EVENT(name) \ 59462306a36Sopenharmony_ciDEFINE_EVENT(smb3_exit_err_class, smb3_##name, \ 59562306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 59662306a36Sopenharmony_ci const char *func_name, \ 59762306a36Sopenharmony_ci int rc), \ 59862306a36Sopenharmony_ci TP_ARGS(xid, func_name, rc)) 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_ciDEFINE_SMB3_EXIT_ERR_EVENT(exit_err); 60162306a36Sopenharmony_ci 60262306a36Sopenharmony_ci 60362306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_sync_err_class, 60462306a36Sopenharmony_ci TP_PROTO(unsigned long ino, 60562306a36Sopenharmony_ci int rc), 60662306a36Sopenharmony_ci TP_ARGS(ino, rc), 60762306a36Sopenharmony_ci TP_STRUCT__entry( 60862306a36Sopenharmony_ci __field(unsigned long, ino) 60962306a36Sopenharmony_ci __field(int, rc) 61062306a36Sopenharmony_ci ), 61162306a36Sopenharmony_ci TP_fast_assign( 61262306a36Sopenharmony_ci __entry->ino = ino; 61362306a36Sopenharmony_ci __entry->rc = rc; 61462306a36Sopenharmony_ci ), 61562306a36Sopenharmony_ci TP_printk("\tino=%lu rc=%d", 61662306a36Sopenharmony_ci __entry->ino, __entry->rc) 61762306a36Sopenharmony_ci) 61862306a36Sopenharmony_ci 61962306a36Sopenharmony_ci#define DEFINE_SMB3_SYNC_ERR_EVENT(name) \ 62062306a36Sopenharmony_ciDEFINE_EVENT(smb3_sync_err_class, cifs_##name, \ 62162306a36Sopenharmony_ci TP_PROTO(unsigned long ino, \ 62262306a36Sopenharmony_ci int rc), \ 62362306a36Sopenharmony_ci TP_ARGS(ino, rc)) 62462306a36Sopenharmony_ci 62562306a36Sopenharmony_ciDEFINE_SMB3_SYNC_ERR_EVENT(fsync_err); 62662306a36Sopenharmony_ciDEFINE_SMB3_SYNC_ERR_EVENT(flush_err); 62762306a36Sopenharmony_ci 62862306a36Sopenharmony_ci 62962306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_enter_exit_class, 63062306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 63162306a36Sopenharmony_ci const char *func_name), 63262306a36Sopenharmony_ci TP_ARGS(xid, func_name), 63362306a36Sopenharmony_ci TP_STRUCT__entry( 63462306a36Sopenharmony_ci __field(unsigned int, xid) 63562306a36Sopenharmony_ci __string(func_name, func_name) 63662306a36Sopenharmony_ci ), 63762306a36Sopenharmony_ci TP_fast_assign( 63862306a36Sopenharmony_ci __entry->xid = xid; 63962306a36Sopenharmony_ci __assign_str(func_name, func_name); 64062306a36Sopenharmony_ci ), 64162306a36Sopenharmony_ci TP_printk("\t%s: xid=%u", 64262306a36Sopenharmony_ci __get_str(func_name), __entry->xid) 64362306a36Sopenharmony_ci) 64462306a36Sopenharmony_ci 64562306a36Sopenharmony_ci#define DEFINE_SMB3_ENTER_EXIT_EVENT(name) \ 64662306a36Sopenharmony_ciDEFINE_EVENT(smb3_enter_exit_class, smb3_##name, \ 64762306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 64862306a36Sopenharmony_ci const char *func_name), \ 64962306a36Sopenharmony_ci TP_ARGS(xid, func_name)) 65062306a36Sopenharmony_ci 65162306a36Sopenharmony_ciDEFINE_SMB3_ENTER_EXIT_EVENT(enter); 65262306a36Sopenharmony_ciDEFINE_SMB3_ENTER_EXIT_EVENT(exit_done); 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_ci/* 65562306a36Sopenharmony_ci * For SMB2/SMB3 tree connect 65662306a36Sopenharmony_ci */ 65762306a36Sopenharmony_ci 65862306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_tcon_class, 65962306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 66062306a36Sopenharmony_ci __u32 tid, 66162306a36Sopenharmony_ci __u64 sesid, 66262306a36Sopenharmony_ci const char *unc_name, 66362306a36Sopenharmony_ci int rc), 66462306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, unc_name, rc), 66562306a36Sopenharmony_ci TP_STRUCT__entry( 66662306a36Sopenharmony_ci __field(unsigned int, xid) 66762306a36Sopenharmony_ci __field(__u32, tid) 66862306a36Sopenharmony_ci __field(__u64, sesid) 66962306a36Sopenharmony_ci __string(name, unc_name) 67062306a36Sopenharmony_ci __field(int, rc) 67162306a36Sopenharmony_ci ), 67262306a36Sopenharmony_ci TP_fast_assign( 67362306a36Sopenharmony_ci __entry->xid = xid; 67462306a36Sopenharmony_ci __entry->tid = tid; 67562306a36Sopenharmony_ci __entry->sesid = sesid; 67662306a36Sopenharmony_ci __assign_str(name, unc_name); 67762306a36Sopenharmony_ci __entry->rc = rc; 67862306a36Sopenharmony_ci ), 67962306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x unc_name=%s rc=%d", 68062306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, 68162306a36Sopenharmony_ci __get_str(name), __entry->rc) 68262306a36Sopenharmony_ci) 68362306a36Sopenharmony_ci 68462306a36Sopenharmony_ci#define DEFINE_SMB3_TCON_EVENT(name) \ 68562306a36Sopenharmony_ciDEFINE_EVENT(smb3_tcon_class, smb3_##name, \ 68662306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 68762306a36Sopenharmony_ci __u32 tid, \ 68862306a36Sopenharmony_ci __u64 sesid, \ 68962306a36Sopenharmony_ci const char *unc_name, \ 69062306a36Sopenharmony_ci int rc), \ 69162306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, unc_name, rc)) 69262306a36Sopenharmony_ci 69362306a36Sopenharmony_ciDEFINE_SMB3_TCON_EVENT(tcon); 69462306a36Sopenharmony_ciDEFINE_SMB3_TCON_EVENT(qfs_done); 69562306a36Sopenharmony_ci 69662306a36Sopenharmony_ci/* 69762306a36Sopenharmony_ci * For smb2/smb3 open (including create and mkdir) calls 69862306a36Sopenharmony_ci */ 69962306a36Sopenharmony_ci 70062306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_open_enter_class, 70162306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 70262306a36Sopenharmony_ci __u32 tid, 70362306a36Sopenharmony_ci __u64 sesid, 70462306a36Sopenharmony_ci const char *full_path, 70562306a36Sopenharmony_ci int create_options, 70662306a36Sopenharmony_ci int desired_access), 70762306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, full_path, create_options, desired_access), 70862306a36Sopenharmony_ci TP_STRUCT__entry( 70962306a36Sopenharmony_ci __field(unsigned int, xid) 71062306a36Sopenharmony_ci __field(__u32, tid) 71162306a36Sopenharmony_ci __field(__u64, sesid) 71262306a36Sopenharmony_ci __string(path, full_path) 71362306a36Sopenharmony_ci __field(int, create_options) 71462306a36Sopenharmony_ci __field(int, desired_access) 71562306a36Sopenharmony_ci ), 71662306a36Sopenharmony_ci TP_fast_assign( 71762306a36Sopenharmony_ci __entry->xid = xid; 71862306a36Sopenharmony_ci __entry->tid = tid; 71962306a36Sopenharmony_ci __entry->sesid = sesid; 72062306a36Sopenharmony_ci __assign_str(path, full_path); 72162306a36Sopenharmony_ci __entry->create_options = create_options; 72262306a36Sopenharmony_ci __entry->desired_access = desired_access; 72362306a36Sopenharmony_ci ), 72462306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x path=%s cr_opts=0x%x des_access=0x%x", 72562306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __get_str(path), 72662306a36Sopenharmony_ci __entry->create_options, __entry->desired_access) 72762306a36Sopenharmony_ci) 72862306a36Sopenharmony_ci 72962306a36Sopenharmony_ci#define DEFINE_SMB3_OPEN_ENTER_EVENT(name) \ 73062306a36Sopenharmony_ciDEFINE_EVENT(smb3_open_enter_class, smb3_##name, \ 73162306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 73262306a36Sopenharmony_ci __u32 tid, \ 73362306a36Sopenharmony_ci __u64 sesid, \ 73462306a36Sopenharmony_ci const char *full_path, \ 73562306a36Sopenharmony_ci int create_options, \ 73662306a36Sopenharmony_ci int desired_access), \ 73762306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, full_path, create_options, desired_access)) 73862306a36Sopenharmony_ci 73962306a36Sopenharmony_ciDEFINE_SMB3_OPEN_ENTER_EVENT(open_enter); 74062306a36Sopenharmony_ciDEFINE_SMB3_OPEN_ENTER_EVENT(posix_mkdir_enter); 74162306a36Sopenharmony_ci 74262306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_open_err_class, 74362306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 74462306a36Sopenharmony_ci __u32 tid, 74562306a36Sopenharmony_ci __u64 sesid, 74662306a36Sopenharmony_ci int create_options, 74762306a36Sopenharmony_ci int desired_access, 74862306a36Sopenharmony_ci int rc), 74962306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, create_options, desired_access, rc), 75062306a36Sopenharmony_ci TP_STRUCT__entry( 75162306a36Sopenharmony_ci __field(unsigned int, xid) 75262306a36Sopenharmony_ci __field(__u32, tid) 75362306a36Sopenharmony_ci __field(__u64, sesid) 75462306a36Sopenharmony_ci __field(int, create_options) 75562306a36Sopenharmony_ci __field(int, desired_access) 75662306a36Sopenharmony_ci __field(int, rc) 75762306a36Sopenharmony_ci ), 75862306a36Sopenharmony_ci TP_fast_assign( 75962306a36Sopenharmony_ci __entry->xid = xid; 76062306a36Sopenharmony_ci __entry->tid = tid; 76162306a36Sopenharmony_ci __entry->sesid = sesid; 76262306a36Sopenharmony_ci __entry->create_options = create_options; 76362306a36Sopenharmony_ci __entry->desired_access = desired_access; 76462306a36Sopenharmony_ci __entry->rc = rc; 76562306a36Sopenharmony_ci ), 76662306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x cr_opts=0x%x des_access=0x%x rc=%d", 76762306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, 76862306a36Sopenharmony_ci __entry->create_options, __entry->desired_access, __entry->rc) 76962306a36Sopenharmony_ci) 77062306a36Sopenharmony_ci 77162306a36Sopenharmony_ci#define DEFINE_SMB3_OPEN_ERR_EVENT(name) \ 77262306a36Sopenharmony_ciDEFINE_EVENT(smb3_open_err_class, smb3_##name, \ 77362306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 77462306a36Sopenharmony_ci __u32 tid, \ 77562306a36Sopenharmony_ci __u64 sesid, \ 77662306a36Sopenharmony_ci int create_options, \ 77762306a36Sopenharmony_ci int desired_access, \ 77862306a36Sopenharmony_ci int rc), \ 77962306a36Sopenharmony_ci TP_ARGS(xid, tid, sesid, create_options, desired_access, rc)) 78062306a36Sopenharmony_ci 78162306a36Sopenharmony_ciDEFINE_SMB3_OPEN_ERR_EVENT(open_err); 78262306a36Sopenharmony_ciDEFINE_SMB3_OPEN_ERR_EVENT(posix_mkdir_err); 78362306a36Sopenharmony_ci 78462306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_open_done_class, 78562306a36Sopenharmony_ci TP_PROTO(unsigned int xid, 78662306a36Sopenharmony_ci __u64 fid, 78762306a36Sopenharmony_ci __u32 tid, 78862306a36Sopenharmony_ci __u64 sesid, 78962306a36Sopenharmony_ci int create_options, 79062306a36Sopenharmony_ci int desired_access), 79162306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, create_options, desired_access), 79262306a36Sopenharmony_ci TP_STRUCT__entry( 79362306a36Sopenharmony_ci __field(unsigned int, xid) 79462306a36Sopenharmony_ci __field(__u64, fid) 79562306a36Sopenharmony_ci __field(__u32, tid) 79662306a36Sopenharmony_ci __field(__u64, sesid) 79762306a36Sopenharmony_ci __field(int, create_options) 79862306a36Sopenharmony_ci __field(int, desired_access) 79962306a36Sopenharmony_ci ), 80062306a36Sopenharmony_ci TP_fast_assign( 80162306a36Sopenharmony_ci __entry->xid = xid; 80262306a36Sopenharmony_ci __entry->fid = fid; 80362306a36Sopenharmony_ci __entry->tid = tid; 80462306a36Sopenharmony_ci __entry->sesid = sesid; 80562306a36Sopenharmony_ci __entry->create_options = create_options; 80662306a36Sopenharmony_ci __entry->desired_access = desired_access; 80762306a36Sopenharmony_ci ), 80862306a36Sopenharmony_ci TP_printk("xid=%u sid=0x%llx tid=0x%x fid=0x%llx cr_opts=0x%x des_access=0x%x", 80962306a36Sopenharmony_ci __entry->xid, __entry->sesid, __entry->tid, __entry->fid, 81062306a36Sopenharmony_ci __entry->create_options, __entry->desired_access) 81162306a36Sopenharmony_ci) 81262306a36Sopenharmony_ci 81362306a36Sopenharmony_ci#define DEFINE_SMB3_OPEN_DONE_EVENT(name) \ 81462306a36Sopenharmony_ciDEFINE_EVENT(smb3_open_done_class, smb3_##name, \ 81562306a36Sopenharmony_ci TP_PROTO(unsigned int xid, \ 81662306a36Sopenharmony_ci __u64 fid, \ 81762306a36Sopenharmony_ci __u32 tid, \ 81862306a36Sopenharmony_ci __u64 sesid, \ 81962306a36Sopenharmony_ci int create_options, \ 82062306a36Sopenharmony_ci int desired_access), \ 82162306a36Sopenharmony_ci TP_ARGS(xid, fid, tid, sesid, create_options, desired_access)) 82262306a36Sopenharmony_ci 82362306a36Sopenharmony_ciDEFINE_SMB3_OPEN_DONE_EVENT(open_done); 82462306a36Sopenharmony_ciDEFINE_SMB3_OPEN_DONE_EVENT(posix_mkdir_done); 82562306a36Sopenharmony_ci 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_lease_done_class, 82862306a36Sopenharmony_ci TP_PROTO(__u32 lease_state, 82962306a36Sopenharmony_ci __u32 tid, 83062306a36Sopenharmony_ci __u64 sesid, 83162306a36Sopenharmony_ci __u64 lease_key_low, 83262306a36Sopenharmony_ci __u64 lease_key_high), 83362306a36Sopenharmony_ci TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high), 83462306a36Sopenharmony_ci TP_STRUCT__entry( 83562306a36Sopenharmony_ci __field(__u32, lease_state) 83662306a36Sopenharmony_ci __field(__u32, tid) 83762306a36Sopenharmony_ci __field(__u64, sesid) 83862306a36Sopenharmony_ci __field(__u64, lease_key_low) 83962306a36Sopenharmony_ci __field(__u64, lease_key_high) 84062306a36Sopenharmony_ci ), 84162306a36Sopenharmony_ci TP_fast_assign( 84262306a36Sopenharmony_ci __entry->lease_state = lease_state; 84362306a36Sopenharmony_ci __entry->tid = tid; 84462306a36Sopenharmony_ci __entry->sesid = sesid; 84562306a36Sopenharmony_ci __entry->lease_key_low = lease_key_low; 84662306a36Sopenharmony_ci __entry->lease_key_high = lease_key_high; 84762306a36Sopenharmony_ci ), 84862306a36Sopenharmony_ci TP_printk("sid=0x%llx tid=0x%x lease_key=0x%llx%llx lease_state=0x%x", 84962306a36Sopenharmony_ci __entry->sesid, __entry->tid, __entry->lease_key_high, 85062306a36Sopenharmony_ci __entry->lease_key_low, __entry->lease_state) 85162306a36Sopenharmony_ci) 85262306a36Sopenharmony_ci 85362306a36Sopenharmony_ci#define DEFINE_SMB3_LEASE_DONE_EVENT(name) \ 85462306a36Sopenharmony_ciDEFINE_EVENT(smb3_lease_done_class, smb3_##name, \ 85562306a36Sopenharmony_ci TP_PROTO(__u32 lease_state, \ 85662306a36Sopenharmony_ci __u32 tid, \ 85762306a36Sopenharmony_ci __u64 sesid, \ 85862306a36Sopenharmony_ci __u64 lease_key_low, \ 85962306a36Sopenharmony_ci __u64 lease_key_high), \ 86062306a36Sopenharmony_ci TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high)) 86162306a36Sopenharmony_ci 86262306a36Sopenharmony_ciDEFINE_SMB3_LEASE_DONE_EVENT(lease_done); 86362306a36Sopenharmony_ciDEFINE_SMB3_LEASE_DONE_EVENT(lease_not_found); 86462306a36Sopenharmony_ci 86562306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_lease_err_class, 86662306a36Sopenharmony_ci TP_PROTO(__u32 lease_state, 86762306a36Sopenharmony_ci __u32 tid, 86862306a36Sopenharmony_ci __u64 sesid, 86962306a36Sopenharmony_ci __u64 lease_key_low, 87062306a36Sopenharmony_ci __u64 lease_key_high, 87162306a36Sopenharmony_ci int rc), 87262306a36Sopenharmony_ci TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high, rc), 87362306a36Sopenharmony_ci TP_STRUCT__entry( 87462306a36Sopenharmony_ci __field(__u32, lease_state) 87562306a36Sopenharmony_ci __field(__u32, tid) 87662306a36Sopenharmony_ci __field(__u64, sesid) 87762306a36Sopenharmony_ci __field(__u64, lease_key_low) 87862306a36Sopenharmony_ci __field(__u64, lease_key_high) 87962306a36Sopenharmony_ci __field(int, rc) 88062306a36Sopenharmony_ci ), 88162306a36Sopenharmony_ci TP_fast_assign( 88262306a36Sopenharmony_ci __entry->lease_state = lease_state; 88362306a36Sopenharmony_ci __entry->tid = tid; 88462306a36Sopenharmony_ci __entry->sesid = sesid; 88562306a36Sopenharmony_ci __entry->lease_key_low = lease_key_low; 88662306a36Sopenharmony_ci __entry->lease_key_high = lease_key_high; 88762306a36Sopenharmony_ci __entry->rc = rc; 88862306a36Sopenharmony_ci ), 88962306a36Sopenharmony_ci TP_printk("sid=0x%llx tid=0x%x lease_key=0x%llx%llx lease_state=0x%x rc=%d", 89062306a36Sopenharmony_ci __entry->sesid, __entry->tid, __entry->lease_key_high, 89162306a36Sopenharmony_ci __entry->lease_key_low, __entry->lease_state, __entry->rc) 89262306a36Sopenharmony_ci) 89362306a36Sopenharmony_ci 89462306a36Sopenharmony_ci#define DEFINE_SMB3_LEASE_ERR_EVENT(name) \ 89562306a36Sopenharmony_ciDEFINE_EVENT(smb3_lease_err_class, smb3_##name, \ 89662306a36Sopenharmony_ci TP_PROTO(__u32 lease_state, \ 89762306a36Sopenharmony_ci __u32 tid, \ 89862306a36Sopenharmony_ci __u64 sesid, \ 89962306a36Sopenharmony_ci __u64 lease_key_low, \ 90062306a36Sopenharmony_ci __u64 lease_key_high, \ 90162306a36Sopenharmony_ci int rc), \ 90262306a36Sopenharmony_ci TP_ARGS(lease_state, tid, sesid, lease_key_low, lease_key_high, rc)) 90362306a36Sopenharmony_ci 90462306a36Sopenharmony_ciDEFINE_SMB3_LEASE_ERR_EVENT(lease_err); 90562306a36Sopenharmony_ci 90662306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_connect_class, 90762306a36Sopenharmony_ci TP_PROTO(char *hostname, 90862306a36Sopenharmony_ci __u64 conn_id, 90962306a36Sopenharmony_ci const struct __kernel_sockaddr_storage *dst_addr), 91062306a36Sopenharmony_ci TP_ARGS(hostname, conn_id, dst_addr), 91162306a36Sopenharmony_ci TP_STRUCT__entry( 91262306a36Sopenharmony_ci __string(hostname, hostname) 91362306a36Sopenharmony_ci __field(__u64, conn_id) 91462306a36Sopenharmony_ci __array(__u8, dst_addr, sizeof(struct sockaddr_storage)) 91562306a36Sopenharmony_ci ), 91662306a36Sopenharmony_ci TP_fast_assign( 91762306a36Sopenharmony_ci struct sockaddr_storage *pss = NULL; 91862306a36Sopenharmony_ci 91962306a36Sopenharmony_ci __entry->conn_id = conn_id; 92062306a36Sopenharmony_ci pss = (struct sockaddr_storage *)__entry->dst_addr; 92162306a36Sopenharmony_ci *pss = *dst_addr; 92262306a36Sopenharmony_ci __assign_str(hostname, hostname); 92362306a36Sopenharmony_ci ), 92462306a36Sopenharmony_ci TP_printk("conn_id=0x%llx server=%s addr=%pISpsfc", 92562306a36Sopenharmony_ci __entry->conn_id, 92662306a36Sopenharmony_ci __get_str(hostname), 92762306a36Sopenharmony_ci __entry->dst_addr) 92862306a36Sopenharmony_ci) 92962306a36Sopenharmony_ci 93062306a36Sopenharmony_ci#define DEFINE_SMB3_CONNECT_EVENT(name) \ 93162306a36Sopenharmony_ciDEFINE_EVENT(smb3_connect_class, smb3_##name, \ 93262306a36Sopenharmony_ci TP_PROTO(char *hostname, \ 93362306a36Sopenharmony_ci __u64 conn_id, \ 93462306a36Sopenharmony_ci const struct __kernel_sockaddr_storage *addr), \ 93562306a36Sopenharmony_ci TP_ARGS(hostname, conn_id, addr)) 93662306a36Sopenharmony_ci 93762306a36Sopenharmony_ciDEFINE_SMB3_CONNECT_EVENT(connect_done); 93862306a36Sopenharmony_ciDEFINE_SMB3_CONNECT_EVENT(smbd_connect_done); 93962306a36Sopenharmony_ciDEFINE_SMB3_CONNECT_EVENT(smbd_connect_err); 94062306a36Sopenharmony_ci 94162306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_connect_err_class, 94262306a36Sopenharmony_ci TP_PROTO(char *hostname, __u64 conn_id, 94362306a36Sopenharmony_ci const struct __kernel_sockaddr_storage *dst_addr, int rc), 94462306a36Sopenharmony_ci TP_ARGS(hostname, conn_id, dst_addr, rc), 94562306a36Sopenharmony_ci TP_STRUCT__entry( 94662306a36Sopenharmony_ci __string(hostname, hostname) 94762306a36Sopenharmony_ci __field(__u64, conn_id) 94862306a36Sopenharmony_ci __array(__u8, dst_addr, sizeof(struct sockaddr_storage)) 94962306a36Sopenharmony_ci __field(int, rc) 95062306a36Sopenharmony_ci ), 95162306a36Sopenharmony_ci TP_fast_assign( 95262306a36Sopenharmony_ci struct sockaddr_storage *pss = NULL; 95362306a36Sopenharmony_ci 95462306a36Sopenharmony_ci __entry->conn_id = conn_id; 95562306a36Sopenharmony_ci __entry->rc = rc; 95662306a36Sopenharmony_ci pss = (struct sockaddr_storage *)__entry->dst_addr; 95762306a36Sopenharmony_ci *pss = *dst_addr; 95862306a36Sopenharmony_ci __assign_str(hostname, hostname); 95962306a36Sopenharmony_ci ), 96062306a36Sopenharmony_ci TP_printk("rc=%d conn_id=0x%llx server=%s addr=%pISpsfc", 96162306a36Sopenharmony_ci __entry->rc, 96262306a36Sopenharmony_ci __entry->conn_id, 96362306a36Sopenharmony_ci __get_str(hostname), 96462306a36Sopenharmony_ci __entry->dst_addr) 96562306a36Sopenharmony_ci) 96662306a36Sopenharmony_ci 96762306a36Sopenharmony_ci#define DEFINE_SMB3_CONNECT_ERR_EVENT(name) \ 96862306a36Sopenharmony_ciDEFINE_EVENT(smb3_connect_err_class, smb3_##name, \ 96962306a36Sopenharmony_ci TP_PROTO(char *hostname, \ 97062306a36Sopenharmony_ci __u64 conn_id, \ 97162306a36Sopenharmony_ci const struct __kernel_sockaddr_storage *addr, \ 97262306a36Sopenharmony_ci int rc), \ 97362306a36Sopenharmony_ci TP_ARGS(hostname, conn_id, addr, rc)) 97462306a36Sopenharmony_ci 97562306a36Sopenharmony_ciDEFINE_SMB3_CONNECT_ERR_EVENT(connect_err); 97662306a36Sopenharmony_ci 97762306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_reconnect_class, 97862306a36Sopenharmony_ci TP_PROTO(__u64 currmid, 97962306a36Sopenharmony_ci __u64 conn_id, 98062306a36Sopenharmony_ci char *hostname), 98162306a36Sopenharmony_ci TP_ARGS(currmid, conn_id, hostname), 98262306a36Sopenharmony_ci TP_STRUCT__entry( 98362306a36Sopenharmony_ci __field(__u64, currmid) 98462306a36Sopenharmony_ci __field(__u64, conn_id) 98562306a36Sopenharmony_ci __string(hostname, hostname) 98662306a36Sopenharmony_ci ), 98762306a36Sopenharmony_ci TP_fast_assign( 98862306a36Sopenharmony_ci __entry->currmid = currmid; 98962306a36Sopenharmony_ci __entry->conn_id = conn_id; 99062306a36Sopenharmony_ci __assign_str(hostname, hostname); 99162306a36Sopenharmony_ci ), 99262306a36Sopenharmony_ci TP_printk("conn_id=0x%llx server=%s current_mid=%llu", 99362306a36Sopenharmony_ci __entry->conn_id, 99462306a36Sopenharmony_ci __get_str(hostname), 99562306a36Sopenharmony_ci __entry->currmid) 99662306a36Sopenharmony_ci) 99762306a36Sopenharmony_ci 99862306a36Sopenharmony_ci#define DEFINE_SMB3_RECONNECT_EVENT(name) \ 99962306a36Sopenharmony_ciDEFINE_EVENT(smb3_reconnect_class, smb3_##name, \ 100062306a36Sopenharmony_ci TP_PROTO(__u64 currmid, \ 100162306a36Sopenharmony_ci __u64 conn_id, \ 100262306a36Sopenharmony_ci char *hostname), \ 100362306a36Sopenharmony_ci TP_ARGS(currmid, conn_id, hostname)) 100462306a36Sopenharmony_ci 100562306a36Sopenharmony_ciDEFINE_SMB3_RECONNECT_EVENT(reconnect); 100662306a36Sopenharmony_ciDEFINE_SMB3_RECONNECT_EVENT(partial_send_reconnect); 100762306a36Sopenharmony_ci 100862306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_ses_class, 100962306a36Sopenharmony_ci TP_PROTO(__u64 sesid), 101062306a36Sopenharmony_ci TP_ARGS(sesid), 101162306a36Sopenharmony_ci TP_STRUCT__entry( 101262306a36Sopenharmony_ci __field(__u64, sesid) 101362306a36Sopenharmony_ci ), 101462306a36Sopenharmony_ci TP_fast_assign( 101562306a36Sopenharmony_ci __entry->sesid = sesid; 101662306a36Sopenharmony_ci ), 101762306a36Sopenharmony_ci TP_printk("sid=0x%llx", 101862306a36Sopenharmony_ci __entry->sesid) 101962306a36Sopenharmony_ci) 102062306a36Sopenharmony_ci 102162306a36Sopenharmony_ci#define DEFINE_SMB3_SES_EVENT(name) \ 102262306a36Sopenharmony_ciDEFINE_EVENT(smb3_ses_class, smb3_##name, \ 102362306a36Sopenharmony_ci TP_PROTO(__u64 sesid), \ 102462306a36Sopenharmony_ci TP_ARGS(sesid)) 102562306a36Sopenharmony_ci 102662306a36Sopenharmony_ciDEFINE_SMB3_SES_EVENT(ses_not_found); 102762306a36Sopenharmony_ci 102862306a36Sopenharmony_ciDECLARE_EVENT_CLASS(smb3_credit_class, 102962306a36Sopenharmony_ci TP_PROTO(__u64 currmid, 103062306a36Sopenharmony_ci __u64 conn_id, 103162306a36Sopenharmony_ci char *hostname, 103262306a36Sopenharmony_ci int credits, 103362306a36Sopenharmony_ci int credits_to_add, 103462306a36Sopenharmony_ci int in_flight), 103562306a36Sopenharmony_ci TP_ARGS(currmid, conn_id, hostname, credits, credits_to_add, in_flight), 103662306a36Sopenharmony_ci TP_STRUCT__entry( 103762306a36Sopenharmony_ci __field(__u64, currmid) 103862306a36Sopenharmony_ci __field(__u64, conn_id) 103962306a36Sopenharmony_ci __string(hostname, hostname) 104062306a36Sopenharmony_ci __field(int, credits) 104162306a36Sopenharmony_ci __field(int, credits_to_add) 104262306a36Sopenharmony_ci __field(int, in_flight) 104362306a36Sopenharmony_ci ), 104462306a36Sopenharmony_ci TP_fast_assign( 104562306a36Sopenharmony_ci __entry->currmid = currmid; 104662306a36Sopenharmony_ci __entry->conn_id = conn_id; 104762306a36Sopenharmony_ci __assign_str(hostname, hostname); 104862306a36Sopenharmony_ci __entry->credits = credits; 104962306a36Sopenharmony_ci __entry->credits_to_add = credits_to_add; 105062306a36Sopenharmony_ci __entry->in_flight = in_flight; 105162306a36Sopenharmony_ci ), 105262306a36Sopenharmony_ci TP_printk("conn_id=0x%llx server=%s current_mid=%llu " 105362306a36Sopenharmony_ci "credits=%d credit_change=%d in_flight=%d", 105462306a36Sopenharmony_ci __entry->conn_id, 105562306a36Sopenharmony_ci __get_str(hostname), 105662306a36Sopenharmony_ci __entry->currmid, 105762306a36Sopenharmony_ci __entry->credits, 105862306a36Sopenharmony_ci __entry->credits_to_add, 105962306a36Sopenharmony_ci __entry->in_flight) 106062306a36Sopenharmony_ci) 106162306a36Sopenharmony_ci 106262306a36Sopenharmony_ci#define DEFINE_SMB3_CREDIT_EVENT(name) \ 106362306a36Sopenharmony_ciDEFINE_EVENT(smb3_credit_class, smb3_##name, \ 106462306a36Sopenharmony_ci TP_PROTO(__u64 currmid, \ 106562306a36Sopenharmony_ci __u64 conn_id, \ 106662306a36Sopenharmony_ci char *hostname, \ 106762306a36Sopenharmony_ci int credits, \ 106862306a36Sopenharmony_ci int credits_to_add, \ 106962306a36Sopenharmony_ci int in_flight), \ 107062306a36Sopenharmony_ci TP_ARGS(currmid, conn_id, hostname, credits, credits_to_add, in_flight)) 107162306a36Sopenharmony_ci 107262306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(reconnect_with_invalid_credits); 107362306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(reconnect_detected); 107462306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(credit_timeout); 107562306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(insufficient_credits); 107662306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(too_many_credits); 107762306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(add_credits); 107862306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(adj_credits); 107962306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(hdr_credits); 108062306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(nblk_credits); 108162306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(pend_credits); 108262306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(wait_credits); 108362306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(waitff_credits); 108462306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(overflow_credits); 108562306a36Sopenharmony_ciDEFINE_SMB3_CREDIT_EVENT(set_credits); 108662306a36Sopenharmony_ci 108762306a36Sopenharmony_ci#endif /* _CIFS_TRACE_H */ 108862306a36Sopenharmony_ci 108962306a36Sopenharmony_ci#undef TRACE_INCLUDE_PATH 109062306a36Sopenharmony_ci#define TRACE_INCLUDE_PATH . 109162306a36Sopenharmony_ci#define TRACE_INCLUDE_FILE trace 109262306a36Sopenharmony_ci#include <trace/define_trace.h> 1093