diff options
author | 2022-01-24 11:31:45 -0500 | |
---|---|---|
committer | 2022-02-28 10:26:39 -0500 | |
commit | 26ce14e77a827fd73a650cffea4db7ddcc62ebc4 (patch) | |
tree | 4777893b828fddffe39f61e8f09664801078c9ec | |
parent | NFSD: Remove NFSD_PROC_ARGS_* macros (diff) | |
download | wireguard-linux-26ce14e77a827fd73a650cffea4db7ddcc62ebc4.tar.xz wireguard-linux-26ce14e77a827fd73a650cffea4db7ddcc62ebc4.zip |
SUNRPC: Improve sockaddr handling in the svc_xprt_create_error trace point
Clean up: Use the new __sockaddr field to record the socket address.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r-- | include/trace/events/sunrpc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 29982d60b68a..39ed91dca5ab 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -1774,18 +1774,18 @@ TRACE_EVENT(svc_xprt_create_err, __field(long, error) __string(program, program) __string(protocol, protocol) - __array(unsigned char, addr, sizeof(struct sockaddr_in6)) + __sockaddr(addr, salen) ), TP_fast_assign( __entry->error = PTR_ERR(xprt); __assign_str(program, program); __assign_str(protocol, protocol); - memcpy(__entry->addr, sap, min(salen, sizeof(__entry->addr))); + __assign_sockaddr(addr, sap, salen); ), TP_printk("addr=%pISpc program=%s protocol=%s error=%ld", - __entry->addr, __get_str(program), __get_str(protocol), + __get_sockaddr(addr), __get_str(program), __get_str(protocol), __entry->error) ); |