Skip to content

Commit

Permalink
bpf: Fix perf_event_output_metric again
Browse files Browse the repository at this point in the history
:face_palm:

Fixes: 4360b28 ("bpf: Fix perf_event_output_metric")

Signed-off-by: Anna Kapuscinska <anna@isovalent.com>
  • Loading branch information
lambdanis committed Sep 3, 2024
1 parent 4360b28 commit f7564b2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bpf/lib/process.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,14 +597,19 @@ perf_event_output_metric(void *ctx, u8 msg_op, void *map, u64 flags, void *data,
switch (err) {
case -2: // ENOENT
__sync_fetch_and_add(&valp->sent_failed[msg_op][SENT_FAILED_ENOENT], 1);
break;
case -7: // E2BIG
__sync_fetch_and_add(&valp->sent_failed[msg_op][SENT_FAILED_E2BIG], 1);
break;
case -16: // EBUSY
__sync_fetch_and_add(&valp->sent_failed[msg_op][SENT_FAILED_EBUSY], 1);
break;
case -22: // EINVAL
__sync_fetch_and_add(&valp->sent_failed[msg_op][SENT_FAILED_EINVAL], 1);
break;
case -28: // ENOSPC
__sync_fetch_and_add(&valp->sent_failed[msg_op][SENT_FAILED_ENOSPC], 1);
break;
default:
__sync_fetch_and_add(&valp->sent_failed[msg_op][SENT_FAILED_UNKNOWN], 1);
}
Expand Down

0 comments on commit f7564b2

Please sign in to comment.