Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement pwru --output-caller to print caller function name #373

Merged
merged 4 commits into from
Jun 11, 2024

Conversation

jschwinger233
Copy link
Member

@jschwinger233 jschwinger233 commented May 13, 2024

The example output of pwru --output-caller --output-meta --output-tuple --filter-track-skb 'dst host 1.1.1.1 and port 80 ' :

SKB                CPU PROCESS          NETNS      MARK/x        IFACE       PROTO  MTU   LEN   TUPLE FUNC CALLER
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0               0         0x0000 0     60    10.103.80.168:55476->1.1.1.1:80(tcp) ip_local_out __ip_queue_xmit
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0               0         0x0000 0     60    10.103.80.168:55476->1.1.1.1:80(tcp) __ip_local_out ip_local_out
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0               0         0x0800 0     60    10.103.80.168:55476->1.1.1.1:80(tcp) nf_hook_slow   __ip_local_out
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0               0         0x0800 0     60    10.103.80.168:55476->1.1.1.1:80(tcp) ip_output      ip_local_out
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  60    10.103.80.168:55476->1.1.1.1:80(tcp) nf_hook_slow   ip_output
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  60    10.103.80.168:55476->1.1.1.1:80(tcp) apparmor_ip_postroute nf_hook_slow
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  60    10.103.80.168:55476->1.1.1.1:80(tcp) ip_finish_output      ip_output
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  60    10.103.80.168:55476->1.1.1.1:80(tcp) __ip_finish_output    ip_finish_output
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  60    10.103.80.168:55476->1.1.1.1:80(tcp) ip_finish_output2     __ip_finish_output
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) __dev_queue_xmit      neigh_hh_output
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) qdisc_pkt_len_init    __dev_queue_xmit
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) netdev_core_pick_tx   __dev_queue_xmit
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) validate_xmit_skb     __dev_queue_xmit
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) netif_skb_features    validate_xmit_skb
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) skb_network_protocol  netif_skb_features
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) skb_csum_hwoffload_help validate_xmit_skb
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) validate_xmit_xfrm      validate_xmit_skb
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) dev_hard_start_xmit     __dev_queue_xmit
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) skb_csum_hwoffload_help ieee80211_tx_skb_fixup[mac80211]
0xffff918922e634e8 3   ~bin/curl:659155 4026531840 0          wlp0s20f3:2    0x0800 1500  74    10.103.80.168:55476->1.1.1.1:80(tcp) skb_push                __ieee80211_xmit_fast[mac80211]
0xffff918922e634e8 7   ~ault_queue:1095 4026531840 0          wlp0s20f3:2    0x0800 1500  94    10.103.80.168:55476->1.1.1.1:80(tcp) tcp_wfree               __ieee80211_tx_status[mac80211]
0xffff918922e634e8 7   ~ault_queue:1095 4026531840 0          wlp0s20f3:2    0x0800 1500  94    10.103.80.168:55476->1.1.1.1:80(tcp) consume_skb             __ieee80211_tx_status[mac80211]
0xffff918922e634e8 7   ~ault_queue:1095 4026531840 0          wlp0s20f3:2    0x0800 1500  94    10.103.80.168:55476->1.1.1.1:80(tcp) skb_release_head_state  consume_skb
0xffff918922e634e8 7   ~ault_queue:1095 4026531840 0          wlp0s20f3:2    0x0800 1500  94    10.103.80.168:55476->1.1.1.1:80(tcp) skb_release_data        consume_skb
0xffff918922e634e8 7   ~ault_queue:1095 4026531840 0          wlp0s20f3:2    0x0800 1500  94    10.103.80.168:55476->1.1.1.1:80(tcp) kfree_skbmem            consume_skb

@jschwinger233 jschwinger233 requested a review from a team as a code owner May 13, 2024 08:00
@jschwinger233 jschwinger233 requested a review from brb May 13, 2024 08:00
@jschwinger233 jschwinger233 force-pushed the gray/output-caller branch 2 times, most recently from 03005ff to 40c65fb Compare May 16, 2024 05:12
@jschwinger233 jschwinger233 marked this pull request as draft May 16, 2024 08:04
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jschwinger233
Copy link
Member Author

@brb I want to hold it on until the PR to align columns lands.

No logic change.

Signed-off-by: gray <gray.liang@isovalent.com>
Signed-off-by: gray <gray.liang@isovalent.com>
pwru --output-caller prints another column "CALLER_FUNC".

Signed-off-by: gray <gray.liang@isovalent.com>
Signed-off-by: gray <gray.liang@isovalent.com>
@jschwinger233 jschwinger233 marked this pull request as ready for review May 31, 2024 09:07
@jschwinger233 jschwinger233 requested a review from brb May 31, 2024 09:07
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@brb brb merged commit 7988665 into cilium:main Jun 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants