Skip to content

mem_watcher下paf功能修改 #981

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

lzh-digital
Copy link

@lzh-digital lzh-digital commented Mar 13, 2025

mem_watcher下paf功能修改

t = BPF_CORE_READ(ac, preferred_zoneref, zone, _watermark) 将 _watermark(一个数组)的值赋给 t,但是t 被定义为指针(unsigned long *t), BPF_CORE_READ 只返回数组的第一个元素的值,所以在下面代码中对于水位线 min、low、high的定义:

	e->min = t[0] + y;
	e->low = t[1] + y;
	e->high = t[2] + y;
	e->flag = (int)gfp_mask;

这些数据是错误的,应该每一个都用 BPF_CORE_READ 读取_watermark
以下是正确的输出与验证
111111

WPS图片(2)

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.

1 participant