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

refactor: remove deprecated installTailCalls function and its usage #3258

Closed
wants to merge 1 commit into from

Conversation

arthur-zhang
Copy link
Contributor

@arthur-zhang arthur-zhang commented Dec 25, 2024

Since we do tailcall map initialize in ebpf side, we do not need do in go files.

Description

we refract tail call map initialize in ebpf c code like this, and remove sec name from "kprobe/#idx" to "kprobe", the go code is useless.

struct {
	__uint(type, BPF_MAP_TYPE_PROG_ARRAY);
	__uint(max_entries, 13);
	__uint(key_size, sizeof(__u32));
	__array(values, int(void *));
} kprobe_calls SEC(".maps") = {
	.values = {
		[0] = (void *)&generic_kprobe_setup_event,
		[1] = (void *)&generic_kprobe_process_event,
		[2] = (void *)&generic_kprobe_process_filter,
		[3] = (void *)&generic_kprobe_filter_arg,
		[4] = (void *)&generic_kprobe_actions,
		[5] = (void *)&generic_kprobe_output,
	},
};

previous:

__attribute__((section("kprobe/0"), used)) int
generic_kprobe_setup_event(void *ctx)

current:

__attribute__((section("kprobe"), used)) int
generic_kprobe_setup_event(void *ctx)

@arthur-zhang arthur-zhang requested a review from a team as a code owner December 25, 2024 03:31
Copy link
Contributor

@olsajiri olsajiri left a comment

Choose a reason for hiding this comment

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

sorry but I'd like to keep that code around as a possibility to setup tailcalls,
there could also be some users of that.. plus it's not that much code

@arthur-zhang
Copy link
Contributor Author

got it

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