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

[BPF] extra conntrack counters and stats #9590

Merged

Conversation

tomastigera
Copy link
Contributor

Description

Related issues/PRs

Todos

  • Tests
  • Documentation
  • Release note

Release Note

ebpf: additional conntrack counters

Reminder for the reviewer

Make sure that this PR has the correct labels and milestone set.

Every PR needs one docs-* label.

  • docs-pr-required: This change requires a change to the documentation that has not been completed yet.
  • docs-completed: This change has all necessary documentation completed.
  • docs-not-required: This change has no user-facing impact and requires no docs.

Every PR needs one release-note-* label.

  • release-note-required: This PR has user-facing changes. Most PRs should have this label.
  • release-note-not-required: This PR has no user-facing changes.

Other optional labels:

  • cherry-pick-candidate: This PR should be cherry-picked to an earlier release. For bug fixes only.
  • needs-operator-pr: This PR is related to install and requires a corresponding change to the operator.

@tomastigera tomastigera requested a review from a team as a code owner December 12, 2024 00:03
@marvin-tigera marvin-tigera added this to the Calico v3.30.0 milestone Dec 12, 2024
@marvin-tigera marvin-tigera added release-note-required Change has user-facing impact (no matter how small) docs-pr-required Change is not yet documented labels Dec 12, 2024
@ioworker0
Copy link

Nice work ~

It seems that we added stats for conntrack in the second commit, which is really useful. Would it be possible to also add counters for conntrack creation failure events?

@tomastigera
Copy link
Contributor Author

Would it be possible to also add counters for conntrack creation failure events?

That is added in the first commit deny_reason(ctx, CALI_REASON_CT_CREATE_FAILED); and printed in dump counters

node/Makefile Show resolved Hide resolved
felix/bpf/counters/counters.go Outdated Show resolved Hide resolved
@ioworker0
Copy link

Would it be possible to also add counters for conntrack creation failure events?

That is added in the first commit deny_reason(ctx, CALI_REASON_CT_CREATE_FAILED); and printed in dump counters

Ah, I clearly missed that.

Prints some stats without the need to use grep or other tools onthe dump
output.

Total connections: 36
Total entries: 48
NAT connections: 12

TCP : 32
UDP : 4
Others : 0

TCP Established: 16
TCP Closed: 16
TCP Reset: 0
TCP Syn-sent: 0
@tomastigera tomastigera force-pushed the tomas-bpf-source-counters branch from f0417a7 to 564367b Compare December 17, 2024 16:45
Copy link
Member

@fasaxc fasaxc left a comment

Choose a reason for hiding this comment

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

LGTM

@tomastigera tomastigera merged commit f7c8ebb into projectcalico:master Dec 19, 2024
3 checks passed
@tomastigera tomastigera deleted the tomas-bpf-source-counters branch December 19, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-pr-required Change is not yet documented release-note-required Change has user-facing impact (no matter how small)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants