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

add prefix km_ in almost all kmesh bpf map #1084

Merged
merged 4 commits into from
Dec 3, 2024

Conversation

LiZhenCheng9527
Copy link
Collaborator

@LiZhenCheng9527 LiZhenCheng9527 commented Nov 30, 2024

What type of PR is this?

What this PR does / why we need it:

Which issue(s) this PR fixes:
a part of #1081

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 46.42857% with 30 lines in your changes missing coverage. Please review.

Project coverage is 50.76%. Comparing base (5e59d30) to head (9d8e9f0).
Report is 28 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/workload/bpfcache/frontend.go 0.00% 5 Missing ⚠️
pkg/controller/workload/bpfcache/auth_policy.go 0.00% 4 Missing ⚠️
pkg/controller/workload/bpfcache/backend.go 0.00% 4 Missing ⚠️
pkg/controller/workload/bpfcache/endpoint.go 50.00% 2 Missing and 2 partials ⚠️
pkg/controller/workload/bpfcache/service.go 0.00% 4 Missing ⚠️
pkg/controller/workload/workload_controller.go 0.00% 3 Missing ⚠️
pkg/bpf/ads/loader.go 50.00% 0 Missing and 2 partials ⚠️
pkg/controller/controller.go 0.00% 2 Missing ⚠️
pkg/bpf/ads/sock_connection.go 75.00% 0 Missing and 1 partial ⚠️
pkg/bpf/workload/loader.go 50.00% 0 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
pkg/bpf/workload/sock_connection.go 52.94% <100.00%> (ø)
pkg/bpf/workload/sock_ops.go 54.90% <100.00%> (ø)
pkg/bpf/workload/xdp.go 48.27% <100.00%> (ø)
pkg/consistenthash/maglev/maglev.go 68.65% <ø> (ø)
pkg/controller/workload/bpfcache/fake_map.go 76.92% <100.00%> (+76.92%) ⬆️
pkg/logger/logger.go 36.95% <ø> (ø)
pkg/bpf/ads/sock_connection.go 55.90% <75.00%> (ø)
pkg/bpf/workload/loader.go 24.48% <50.00%> (ø)
pkg/bpf/ads/loader.go 36.48% <50.00%> (ø)
pkg/controller/controller.go 0.00% <0.00%> (ø)
... and 6 more

... and 3 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 ecf7d1e...9d8e9f0. Read the comment docs.

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.

some of the map name exceeds 16 bytes, prefer remove map_of

bpf/include/bpf_common.h Outdated Show resolved Hide resolved
@LiZhenCheng9527
Copy link
Collaborator Author

some of the map name exceeds 16 bytes, prefer remove map_of

I renamed the map in config.h

@LiZhenCheng9527
Copy link
Collaborator Author

LiZhenCheng9527 commented Dec 2, 2024

After I change the map name in bpf/kmesh/ads/include/config.h and execute make gen, my changes are undone.
My test was to run make gen-bpf2go encountered this.


// map name
#define map_of_manager km_manage
#define map_of_sock_storage km_sockStorage
Copy link
Member

Choose a reason for hiding this comment

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

not mix _ with camel naming

Copy link
Member

Choose a reason for hiding this comment

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

@LiZhenCheng9527 update it then we can merge

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: LiZhenCheng9527 <[email protected]>
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.

/lgtm

@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 e055da3 into kmesh-net:main Dec 3, 2024
12 checks passed
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.

4 participants