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

libbpf-tools/tcptracer: Remove unused parameter 'ctx' #5253

Merged
merged 1 commit into from
Mar 29, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions libbpf-tools/tcptracer.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ filter_event(struct sock *sk, __u32 uid, __u32 pid)
}

static __always_inline int
enter_tcp_connect(struct pt_regs *ctx, struct sock *sk)
enter_tcp_connect(struct sock *sk)
{
__u64 pid_tgid = bpf_get_current_pid_tgid();
__u32 pid = pid_tgid >> 32;
Expand All @@ -165,7 +165,7 @@ enter_tcp_connect(struct pt_regs *ctx, struct sock *sk)
}

static __always_inline int
exit_tcp_connect(struct pt_regs *ctx, int ret, __u16 family)
exit_tcp_connect(int ret, __u16 family)
{
__u64 pid_tgid = bpf_get_current_pid_tgid();
__u32 pid = pid_tgid >> 32;
Expand Down Expand Up @@ -203,25 +203,25 @@ exit_tcp_connect(struct pt_regs *ctx, int ret, __u16 family)
SEC("kprobe/tcp_v4_connect")
int BPF_KPROBE(tcp_v4_connect, struct sock *sk)
{
return enter_tcp_connect(ctx, sk);
return enter_tcp_connect(sk);
}

SEC("kretprobe/tcp_v4_connect")
int BPF_KRETPROBE(tcp_v4_connect_ret, int ret)
{
return exit_tcp_connect(ctx, ret, AF_INET);
return exit_tcp_connect(ret, AF_INET);
}

SEC("kprobe/tcp_v6_connect")
int BPF_KPROBE(tcp_v6_connect, struct sock *sk)
{
return enter_tcp_connect(ctx, sk);
return enter_tcp_connect(sk);
}

SEC("kretprobe/tcp_v6_connect")
int BPF_KRETPROBE(tcp_v6_connect_ret, int ret)
{
return exit_tcp_connect(ctx, ret, AF_INET6);
return exit_tcp_connect(ret, AF_INET6);
}

SEC("kprobe/tcp_close")
Expand Down
Loading