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

improve xdp bpf log #1158

Merged
merged 3 commits into from
Jan 10, 2025
Merged

improve xdp bpf log #1158

merged 3 commits into from
Jan 10, 2025

Conversation

weli-l
Copy link
Contributor

@weli-l weli-l commented Jan 3, 2025

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #1157

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.83%. Comparing base (21d1139) to head (ef92f16).
Report is 57 commits behind head on main.

see 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 21d1139...ef92f16. Read the comment docs.

rule_ip,
preFixLen,
bpf_ntohl(tuple_info->ipv4.daddr));
target_ip);
}
return match_ipv4_rule(rule_ip, preFixLen, tuple_info, type);
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't the Ipv6 log need to be added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't the Ipv6 log need to be added?

added

Signed-off-by: weli-l <[email protected]>
@weli-l
Copy link
Contributor Author

weli-l commented Jan 9, 2025

/retest

AUTH,
"src ip: %u, dst ip %u, dst port: %u\n",
ip2str(&tuple_key.ipv6.saddr[0], false),
ip2str(&tuple_key.ipv6.daddr[0], false),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ip2str(&tuple_key.ipv6.daddr[0], false),
ip2str(&tuple_key.ipv6.daddr, false),

DEBUG,
AUTH,
"src ip: %u, dst ip %u, dst port: %u\n",
ip2str(&tuple_key.ipv6.saddr[0], false),
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ip2str(&tuple_key.ipv6.saddr[0], false),
ip2str(&tuple_key.ipv6.saddr, false),

Copy link
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

&IPv6[0] equals &IPv6, correct me if i am wrong

/lgtm
/approve

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kmesh-bot kmesh-bot merged commit b86f8e0 into kmesh-net:main Jan 10, 2025
12 checks passed
@hzxuzhonghu
Copy link
Member

/cherry-pick release-1.0

@kmesh-bot
Copy link
Collaborator

@hzxuzhonghu: new pull request created: #1177

In response to this:

/cherry-pick release-1.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve xdp logs to reduce the number of eBPF instructions
5 participants