-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] make conntrack timeouts configurable #9607
[BPF] make conntrack timeouts configurable #9607
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
93d4e03
to
49ac572
Compare
dd2d130
to
2413c56
Compare
badbf68
to
762b351
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tomastigera I'm just reviewing the API bits (others have reviewed the implementation IIUC).
Looking pretty good, but had a few questions / suggestions.
// GenericIPLastSeen: nf_conntrack_generic_timeout | ||
// ICMPLastSeen: nf_conntrack_icmp_timeout | ||
// | ||
// If there is no mapping, 'auto' is replaced by the default value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that we have defined these as pointers I don't think we need a special "auto" field - nil
means "use the default value", right? Or am I misunderstanding the semantics of "auto"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we need auto to distinguish between "use the default" aka nil/unset and use the value from linux if available aka auto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - in that case, I think the description here isn't clear enough. That behavior wasn't obvious to me. I'll add a suggested edit.
BPFConntrackTimers overides the default values for the specified conntrack timer if set. It is a struct of values, where each value can be either a duration or `auto` to pick the value from a Linux conntrack timeout. Possible values for the keys are: CreationGracePeriod, TCPPreEstablished, TCPEstablished, TCPFinsSeen, TCPResetSeen, UDPLastSeen, GenericIPLastSeen, ICMPLastSeen. Unset or incorrect values are replaced by the default values with a warning log for incorrect values. Current auto mappings: TCPPreEstablished: nf_conntrack_tcp_timeout_syn_sent TCPEstablished: nf_conntrack_tcp_timeout_established TCPFinsSeen: nf_conntrack_tcp_timeout_time_wait GenericIPLastSeen: nf_conntrack_generic_timeout ICMPLastSeen: nf_conntrack_icmp_timeout If there is no mapping, 'auto' is replaced by the default value. [Default: CreationGracePeriod: 10s TCPPreEstablished: 20s TCPEstablished: 1h TCPFinsSeen: auto (30s is default) TCPResetSeen: 40s UDPLastSeen: 60s GenericIPLastSeen: 10m ICMPLastSeen: 5s ]
762b351
to
6b485e1
Compare
137dcd5
to
52e8c8a
Compare
refs #9372
Description
Related issues/PRs
Todos
Release Note
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.