Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
b4af5932
Commit
b4af5932
authored
May 02, 2020
by
Chuck Lever
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SUNRPC: Trace server-side rpcbind registration events
Signed-off-by:
Chuck Lever
<
chuck.lever@oracle.com
>
parent
a0469f46
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
15 deletions
+84
-15
include/trace/events/sunrpc.h
include/trace/events/sunrpc.h
+80
-0
net/sunrpc/svc.c
net/sunrpc/svc.c
+4
-15
No files found.
include/trace/events/sunrpc.h
View file @
b4af5932
...
...
@@ -1581,6 +1581,86 @@ DEFINE_CACHE_EVENT(cache_entry_update);
DEFINE_CACHE_EVENT
(
cache_entry_make_negative
);
DEFINE_CACHE_EVENT
(
cache_entry_no_listener
);
DECLARE_EVENT_CLASS
(
register_class
,
TP_PROTO
(
const
char
*
program
,
const
u32
version
,
const
int
family
,
const
unsigned
short
protocol
,
const
unsigned
short
port
,
int
error
),
TP_ARGS
(
program
,
version
,
family
,
protocol
,
port
,
error
),
TP_STRUCT__entry
(
__field
(
u32
,
version
)
__field
(
unsigned
long
,
family
)
__field
(
unsigned
short
,
protocol
)
__field
(
unsigned
short
,
port
)
__field
(
int
,
error
)
__string
(
program
,
program
)
),
TP_fast_assign
(
__entry
->
version
=
version
;
__entry
->
family
=
family
;
__entry
->
protocol
=
protocol
;
__entry
->
port
=
port
;
__entry
->
error
=
error
;
__assign_str
(
program
,
program
);
),
TP_printk
(
"program=%sv%u proto=%s port=%u family=%s error=%d"
,
__get_str
(
program
),
__entry
->
version
,
__entry
->
protocol
==
IPPROTO_UDP
?
"udp"
:
"tcp"
,
__entry
->
port
,
rpc_show_address_family
(
__entry
->
family
),
__entry
->
error
)
);
#define DEFINE_REGISTER_EVENT(name) \
DEFINE_EVENT(register_class, svc_##name, \
TP_PROTO( \
const char *program, \
const u32 version, \
const int family, \
const unsigned short protocol, \
const unsigned short port, \
int error \
), \
TP_ARGS(program, version, family, protocol, \
port, error))
DEFINE_REGISTER_EVENT
(
register
);
DEFINE_REGISTER_EVENT
(
noregister
);
TRACE_EVENT
(
svc_unregister
,
TP_PROTO
(
const
char
*
program
,
const
u32
version
,
int
error
),
TP_ARGS
(
program
,
version
,
error
),
TP_STRUCT__entry
(
__field
(
u32
,
version
)
__field
(
int
,
error
)
__string
(
program
,
program
)
),
TP_fast_assign
(
__entry
->
version
=
version
;
__entry
->
error
=
error
;
__assign_str
(
program
,
program
);
),
TP_printk
(
"program=%sv%u error=%d"
,
__get_str
(
program
),
__entry
->
version
,
__entry
->
error
)
);
#endif
/* _TRACE_SUNRPC_H */
#include <trace/define_trace.h>
net/sunrpc/svc.c
View file @
b4af5932
...
...
@@ -991,6 +991,7 @@ static int __svc_register(struct net *net, const char *progname,
#endif
}
trace_svc_register
(
progname
,
version
,
protocol
,
port
,
family
,
error
);
return
error
;
}
...
...
@@ -1000,11 +1001,6 @@ int svc_rpcbind_set_version(struct net *net,
unsigned
short
proto
,
unsigned
short
port
)
{
dprintk
(
"svc: svc_register(%sv%d, %s, %u, %u)
\n
"
,
progp
->
pg_name
,
version
,
proto
==
IPPROTO_UDP
?
"udp"
:
"tcp"
,
port
,
family
);
return
__svc_register
(
net
,
progp
->
pg_name
,
progp
->
pg_prog
,
version
,
family
,
proto
,
port
);
...
...
@@ -1024,11 +1020,8 @@ int svc_generic_rpcbind_set(struct net *net,
return
0
;
if
(
vers
->
vs_hidden
)
{
dprintk
(
"svc: svc_register(%sv%d, %s, %u, %u)"
" (but not telling portmap)
\n
"
,
progp
->
pg_name
,
version
,
proto
==
IPPROTO_UDP
?
"udp"
:
"tcp"
,
port
,
family
);
trace_svc_noregister
(
progp
->
pg_name
,
version
,
proto
,
port
,
family
,
0
);
return
0
;
}
...
...
@@ -1106,8 +1099,7 @@ static void __svc_unregister(struct net *net, const u32 program, const u32 versi
if
(
error
==
-
EPROTONOSUPPORT
)
error
=
rpcb_register
(
net
,
program
,
version
,
0
,
0
);
dprintk
(
"svc: %s(%sv%u), error %d
\n
"
,
__func__
,
progname
,
version
,
error
);
trace_svc_unregister
(
progname
,
version
,
error
);
}
/*
...
...
@@ -1132,9 +1124,6 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net)
continue
;
if
(
progp
->
pg_vers
[
i
]
->
vs_hidden
)
continue
;
dprintk
(
"svc: attempting to unregister %sv%u
\n
"
,
progp
->
pg_name
,
i
);
__svc_unregister
(
net
,
progp
->
pg_prog
,
i
,
progp
->
pg_name
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment