Skip to content

Conversation

ldelossa
Copy link
Contributor

@ldelossa ldelossa commented Jan 9, 2024

This PR renames "egress_policies.h" to "srv6.h" since only SRv6 related logic was left in this file.
Moving forward "srv6.h" will be the canonical file for SRv6 related datapath functionality.

This PR also adds "srv6-encap" and "srv6-decap" monitor events, explaining to a debugger that SRv6 encap/decap successfully occurred and the subsequent packet is heading to the stack.
This will cut down the time it takes to debug whether the SRv6 datapath processed an SRv6 VPN related packet.

Rename egress_policies.h to srv6.h and add SRv6 related trace reasons. 

The only functions left in egress_policies.h are SRv6 related.
Let's rename this to 'srv6.h' and update references to the old file
name.

Signed-off-by: ldelossa <louis.delos@gmail.com>
Include a trace reason for SRv6 encapsulation and decapsulation.

This greatly improves the debugging process, indicating whether SRv6
VPN related packets are processed by our datapath.

Signed-off-by: ldelossa <louis.delos@gmail.com>
@ldelossa ldelossa requested a review from a team as a code owner January 9, 2024 13:50
@ldelossa ldelossa requested a review from gentoo-root January 9, 2024 13:50
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 9, 2024
@ldelossa ldelossa added the release-note/misc This PR makes changes that have no direct user impact. label Jan 9, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 9, 2024
@ldelossa
Copy link
Contributor Author

ldelossa commented Jan 9, 2024

/test

@YutaroHayakawa YutaroHayakawa requested review from a team and kaworu and removed request for a team January 10, 2024 02:31
Copy link
Member

@YutaroHayakawa YutaroHayakawa left a comment

Choose a reason for hiding this comment

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

Changes looks good to me, but in addition to this, can't we contain the information about the SID on the header we decapsulated? So that we can answer to the question like "is SID X correctly decapsulated?". Looks like send_trace_notify6 can take an "orig_addr". Can't we use it to store SID?

@YutaroHayakawa
Copy link
Member

Also, let me pull-in Hubble team as we touched to the trace_reason.

@ldelossa
Copy link
Contributor Author

ldelossa commented Jan 10, 2024

Changes looks good to me, but in addition to this, can't we contain the information about the SID on the header we decapsulated? So that we can answer to the question like "is SID X correctly decapsulated?". Looks like send_trace_notify6 can take an "orig_addr". Can't we use it to store SID?

@YutaroHayakawa I avoided doing this because we'd need to validate the skb_buff and pull out the ipv6 header when the tail call started, and then log it before we work on the sk_buff directly in srv6_decapsulation function. If we log the destination before we perform the decap, that could be confusing since we may not successfully perform the decap. I also didn't like doing the potential double verification if we didn't update the srv6_decapsulation function.

@YutaroHayakawa
Copy link
Member

Alright, then, for the moment, let's go with this.

@ldelossa
Copy link
Contributor Author

@YutaroHayakawa sounds good Yutaro.

We could also add a raw cilium_dbg statement to dump the SID before we encap, therefore it doesn't 'suggest' anything in a follow up?

@ldelossa
Copy link
Contributor Author

Marking 'do-not-merge' until Alex has a chance to review. Talked with him and there maybe an implication to this in the Hubble code's ability to perform conn tracking observability.

@ldelossa ldelossa added the dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. label Jan 15, 2024
Consider encap/decap as egress/ingress (respectively) and both as
unknown reply ct status.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
@ldelossa ldelossa requested a review from a team as a code owner January 16, 2024 12:26
@kaworu kaworu requested a review from gandro January 16, 2024 16:00
@kaworu
Copy link
Member

kaworu commented Jan 16, 2024

@gandro could you please take a look at the patch, especially the Hubble related commit 🙏

@ldelossa ldelossa removed the dont-merge/discussion A discussion is ongoing and should be resolved before merging, regardless of reviews & tests status. label Jan 17, 2024
@ldelossa
Copy link
Contributor Author

/test

@ldelossa ldelossa added this pull request to the merge queue Jan 22, 2024
Merged via the queue into cilium:main with commit a6bfb79 Jan 22, 2024
@ldelossa ldelossa deleted the ldelossa/srv6-monitor-logging branch January 22, 2024 14:26
@joamaki joamaki mentioned this pull request Jan 30, 2024
28 tasks
@joamaki joamaki added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 labels Jan 30, 2024
@joamaki joamaki mentioned this pull request Jan 31, 2024
17 tasks
@aanm aanm added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Jan 31, 2024
@nbusseneau nbusseneau mentioned this pull request Feb 8, 2024
9 tasks
@nbusseneau nbusseneau added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 labels Feb 8, 2024
@github-actions github-actions bot added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Feb 9, 2024
kaworu added a commit to kaworu/cilium that referenced this pull request Mar 6, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Mar 7, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Mar 27, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 10, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 19, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 19, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 22, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 23, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 26, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
kaworu added a commit to kaworu/cilium that referenced this pull request Apr 30, 2024
cilium#30154 and
cilium#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
github-merge-queue bot pushed a commit that referenced this pull request May 1, 2024
#30154 and
#31073 introduced new datapath
trace reasons and had an impact on Hubble, but the sig-hubble team
doesn't get automatically pulled in for review.

This patch adds the sig-hubble team to review datapath_trace.go changes.

Signed-off-by: Alexandre Perrin <alex@isovalent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
No open projects
Status: Released
Development

Successfully merging this pull request may close these issues.

8 participants