Commit 26ce14e7 authored by Chuck Lever's avatar Chuck Lever

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: default avatarChuck Lever <chuck.lever@oracle.com>
parent c1a3f2ce
...@@ -1774,18 +1774,18 @@ TRACE_EVENT(svc_xprt_create_err, ...@@ -1774,18 +1774,18 @@ TRACE_EVENT(svc_xprt_create_err,
__field(long, error) __field(long, error)
__string(program, program) __string(program, program)
__string(protocol, protocol) __string(protocol, protocol)
__array(unsigned char, addr, sizeof(struct sockaddr_in6)) __sockaddr(addr, salen)
), ),
TP_fast_assign( TP_fast_assign(
__entry->error = PTR_ERR(xprt); __entry->error = PTR_ERR(xprt);
__assign_str(program, program); __assign_str(program, program);
__assign_str(protocol, protocol); __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", 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) __entry->error)
); );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment