ipsec: ensure all trace events are discarded when mon. agg. is enabled#29616
Merged
pchaigno merged 2 commits intoDec 19, 2023
Conversation
7b5c4bc to
01a2645
Compare
01a2645 to
2e06a1c
Compare
pchaigno
approved these changes
Dec 7, 2023
pchaigno
left a comment
Member
There was a problem hiding this comment.
Nice fix, perfect commit description, and impressive work on Coccinelle! 🚀
Member
|
/test |
jrfastab
reviewed
Dec 12, 2023
jrfastab
approved these changes
Dec 12, 2023
lmb
approved these changes
Dec 12, 2023
Contributor
Author
|
/test |
Contributor
Author
|
Hit two flakes: |
Contributor
Author
|
/test |
pchaigno
approved these changes
Dec 18, 2023
Member
|
@learnitall You'll need to rebase to catch https://github.com/cilium/cilium/pull/29958/commits and pass the CI. |
This was referenced Dec 20, 2023
This was referenced Jan 17, 2024
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit modifies calls to
send_trace_notifyin the datapath to drop trace events related to encrypted packets when monitor aggregation is enabled. More specifically, this commit ensures that wheneversend_trace_notifyis called with atrace_reasonofTRACE_REASON_ENCRYPTED, themonitorargument is set to zero. A Coccinelle script is provided in this commit to add a build-time check for this requirement moving forward.This change helps to reduce the overall CPU usage of Cilium Agents when IPSec encryption is enabled, by reducing the number of trace events emitted by the datapath. Normally monitor aggregation can be used in order to reduce the number of trace events, however IPSec-related trace events are not able to be aggregated since they lack the necessary connection tracking information. See the function
emit_trace_notifyinbpf/lib/trace.hfor more information.This endeavor was first started in cilium/cilium#27168, however, in said PR I missed a couple of spots where this type of change could also be applied. This PR acts as a follow-up to ensure that all places where
TRACE_REASON_ENCRYPTEDappears in a call tosend_trace_notify, the argumentmonitoris set to zero.Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXXline if the commit addresses a particularGitHub issue.
Fixes: <commit-id>tag, thenplease add the commit author[s] as reviewer[s] to this issue.