libtraceevent: Add processing of __get_sockaddr() and __get_sockaddr_rel()
PATCH 1/1 libtraceevent: Add processing of __get_sockaddr() and __get_sockaddr_rel()
From: "Steven Rostedt (Google)" <[email protected]>
The macros __get_sockaddr() and __get_sockaddr_rel() are now added in the TRACE_EVENT() helper functions and can be used to retrieve dynamically saved sockaddr structures that hold IP addresses. Update libtraceevent to handle them.
--- src/event-parse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
src/event-parse.c +3 -1
@@ -3485,7 +3485,9 @@ process_function(struct tep_event *event, struct tep_print_arg *arg,return process_bitmask (event, arg, tok); }if (strcmp (token,"__get_dynamic_array" ) ==0 || -strcmp (token,"__get_rel_dynamic_array" ) ==0 ) { +strcmp (token,"__get_rel_dynamic_array" ) ==0 || +strcmp (token,"__get_sockaddr" ) ==0 || +strcmp (token,"__get_sockaddr_rel" ) ==0 ) {free_token (token);return process_dynamic_array (event, arg, tok); }
Signature · 1 line
2.35.1
Quoted 10 lines · Steven Rostedt
From: "Steven Rostedt (Google)" <[email protected]>
The macros
__get_sockaddr()and__get_sockaddr_rel()are now added in theTRACE_EVENT()helper functions and can be used to retrieve dynamically saved sockaddr structures that hold IP addresses. Update libtraceevent to handle them.
Quoted 4 lines
Reported-by Chuck Lever III <[email protected]>Signed-off-by Steven Rostedt (Google) <[email protected]>
This is a freshly-updated Fedora 36 system running v6.0-rc4, and the __sockaddr stuff still doesn't work.
mount.nfs-1639 [002] 406.390138: svc_xprt_enqueue: [FAILED TO PARSE] server=ARRAY[02, 00, 8a, 97, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] client=<E8>sl flags=0x4c03 netns_ino=4026531840 pid=0
mount.nfs-1639 [002] 406.390360: svcsock_new_socket: type=STREAM family=AF_INET6 (listener)
mount.nfs-1639 [002] 406.390361: svc_xprt_enqueue: [FAILED TO PARSE] server=ARRAY[0a, 00, a7, e7, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] client=*<FC>% flags=0x4c03 netns_ino=4026531840 pid=0
mount.nfs-1639 [002] 406.390439: rpc_task_begin: task:00000002@00000002 flags=DYNAMIC|NO_ROUND_ROBIN|SOFT|TIMEOUT|NORTO|CRED_NOREF runstate=ACTIVE status=0 action=0x0
mount.nfs-1639 [002] 406.390440: rpc_task_run_action: task:00000002@00000002 flags=DYNAMIC|NO_ROUND_ROBIN|SOFT|TIMEOUT|NORTO|CRED_NOREF runstate=RUNNING|ACTIVE status=0 action=call_start
mount.nfs-1639 [002] 406.390440: rpc_request: task:00000002@00000002 nfsv4 SETCLIENTID (sync)
NFSv4 callback-1642 [006] 406.390440: svc_xprt_dequeue: [FAILED TO PARSE] server=ARRAY[02, 00, 8a, 97, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] client=<CA>d^F flags=0x4c83 netns_ino=4026531840 wakeup=0x18325fae# dnf list libtrace\* Last metadata expiration check: 1:27:00 ago on Fri 09 Sep 2022 12:31:57 PM EDT. Installed Packages libtracecmd.x86_64 1.1.3-2.fc36 @updates libtraceevent.x86_64 1.5.3-2.fc36 @updates libtracefs.x86_64 1.3.1-2.fc36 @updates Available Packages libtracecmd.i686 1.1.0-3.fc36 fedora libtracecmd-devel.i686 1.1.0-3.fc36 fedora libtracecmd-devel.x86_64 1.1.3-2.fc36 updates libtraceevent.i686 1.5.3-2.fc36 updates libtraceevent-devel.i686 1.5.3-2.fc36 updates libtraceevent-devel.x86_64 1.5.3-2.fc36 updates libtracefs.i686 1.3.1-2.fc36 updates libtracefs-devel.i686 1.3.1-2.fc36 updates libtracefs-devel.x86_64 1.3.1-2.fc36 updates # dnf list trace-cmd\* Last metadata expiration check: 1:27:09 ago on Fri 09 Sep 2022 12:31:57 PM EDT. Installed Packages trace-cmd.x86_64 3.0.3-2.fc36 @updates Available Packages trace-cmd-python3.x86_64 3.0.3-2.fc36 updates # dnf repolist repo id repo name fedora Fedora 36 - x86_64 fedora-cisco-openh264 Fedora 36 openh264 (From Cisco) - x86_64 fedora-modular Fedora Modular 36 - x86_64 updates Fedora 36 - x86_64 - Updates updates-modular Fedora Modular 36 - x86_64 - Updates #
Quoted 22 lines
---
src/event-parse.c| 4 +++-1 file changed, 3 insertions(+), 1 deletion(-)src/event-parse.c +3
-1@@ -3485,7 +3485,9 @@ process_function(struct tep_event *event, struct tep_print_arg *arg,return process_bitmask (event, arg, tok); }if (strcmp (token,"__get_dynamic_array" ) ==0 || -strcmp (token,"__get_rel_dynamic_array" ) ==0 ) { +strcmp (token,"__get_rel_dynamic_array" ) ==0 || +strcmp (token,"__get_sockaddr" ) ==0 || +strcmp (token,"__get_sockaddr_rel" ) ==0 ) {free_token (token);return process_dynamic_array (event, arg, tok); }Signature · 1 line
2.35.1
--
Chuck Lever
Quoted 11 lines · On Fri, 9 Sep 2022 18:00:45 +0000 Chuck Lever III <[email protected]>…
This is a freshly-updated Fedora 36 system running v6.0-rc4, and the
__sockaddrstuff still doesn't work.mount.nfs-1639 [002] 406.390138: svc_xprt_enqueue: [FAILED TO PARSE] server=ARRAY[02, 00, 8a, 97, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] client=<E8>sl flags=0x4c03 netns_ino=4026531840 pid=0 mount.nfs-1639 [002] 406.390360: svcsock_new_socket: type=STREAM family=AF_INET6 (listener) mount.nfs-1639 [002] 406.390361: svc_xprt_enqueue: [FAILED TO PARSE] server=ARRAY[0a, 00, a7, e7, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] client=*<FC>% flags=0x4c03 netns_ino=4026531840 pid=0 mount.nfs-1639 [002] 406.390439: rpc_task_begin: task:00000002@00000002 flags=DYNAMIC|NO_ROUND_ROBIN|SOFT|TIMEOUT|NORTO|CRED_NOREF runstate=ACTIVE status=0 action=0x0 mount.nfs-1639 [002] 406.390440: rpc_task_run_action: task:00000002@00000002 flags=DYNAMIC|NO_ROUND_ROBIN|SOFT|TIMEOUT|NORTO|CRED_NOREF runstate=RUNNING|ACTIVE status=0 action=call_start mount.nfs-1639 [002] 406.390440: rpc_request: task:00000002@00000002 nfsv4 SETCLIENTID (sync) NFSv4 callback-1642 [006] 406.390440: svc_xprt_dequeue: [FAILED TO PARSE] server=ARRAY[02, 00, 8a, 97, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00] client=<CA>d^F flags=0x4c83 netns_ino=4026531840 wakeup=0x18325fae
Quoted 13 lines
# dnf list libtrace\* Last metadata expiration check: 1:27:00 ago on Fri 09 Sep 2022 12:31:57 PM EDT. Installed Packages libtracecmd.x86_64 1.1.3-2.fc36 @updates libtraceevent.x86_64 1.5.3-2.fc36 @updates libtracefs.x86_64 1.3.1-2.fc36 @updates Available Packages libtracecmd.i686 1.1.0-3.fc36 fedora libtracecmd-devel.i686 1.1.0-3.fc36 fedora libtracecmd-devel.x86_64 1.1.3-2.fc36 updates libtraceevent.i686 1.5.3-2.fc36 updates libtraceevent-devel.i686 1.5.3-2.fc36 updates libtraceevent-devel.x86_64 1.5.3-2.fc36 updates
That parsing was added in libtraceevent 1.6.2.
-- Steve
Quoted 3 lines
libtracefs.i686 1.3.1-2.fc36 updates libtracefs-devel.i686 1.3.1-2.fc36 updates libtracefs-devel.x86_64 1.3.1-2.fc36 updates