summaryrefslogtreecommitdiff
path: root/include/trace/events/sunrpc.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2022-01-24 11:31:45 -0500
committerChuck Lever <chuck.lever@oracle.com>2022-02-28 10:26:39 -0500
commit26ce14e77a827fd73a650cffea4db7ddcc62ebc4 (patch)
tree4777893b828fddffe39f61e8f09664801078c9ec /include/trace/events/sunrpc.h
parentc1a3f2ce66c80cd9f2a4376fa35a5c8d05441c73 (diff)
downloadlinux-26ce14e77a827fd73a650cffea4db7ddcc62ebc4.tar.gz
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>
Diffstat (limited to 'include/trace/events/sunrpc.h')
-rw-r--r--include/trace/events/sunrpc.h6
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)
);