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

FIX bpf_map_delete_elem unexpected error log #287

Merged
merged 1 commit into from
May 7, 2024

Conversation

hzxuzhonghu
Copy link
Member

What type of PR is this?

What this PR does / why we need it:

We areusing bpf_map_delete_elem which returns longs type. We see very weired phenomenon though it is -2 when no key exists, but it is not equal to int -2.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
@hzxuzhonghu hzxuzhonghu force-pushed the fix-unexpected-error branch from c72eba2 to 4ebf249 Compare May 6, 2024 07:51
@@ -199,8 +198,7 @@ int record_tuple(struct bpf_sock_ops *skops)
auth_ip_tuple(skops);
break;
case BPF_SOCK_OPS_STATE_CB:
if (skops->args[1] == BPF_TCP_CLOSE || skops->args[1] == BPF_TCP_CLOSE_WAIT
|| skops->args[1] == BPF_TCP_FIN_WAIT1) {
if (skops->args[1] == BPF_TCP_CLOSE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@nlgwcy
Copy link
Contributor

nlgwcy commented May 7, 2024

/lgtm
/approve

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: nlgwcy

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 f69ba77 into kmesh-net:main May 7, 2024
3 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.

3 participants