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: Refactoring egress gateway datapath #17868

Merged
merged 2 commits into from Nov 15, 2021

Conversation

pchaigno
Copy link
Member

This pull request performs just a bit of refactoring on the egress gateway's code in the datapath. This refactoring was prepared for the SRv6 work (cf. #17646) but is independent so sending it's own pull request.

See commits for details.

@pchaigno pchaigno added sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/misc This PR makes changes that have no direct user impact. feature/egress-gateway Impacts the egress IP gateway feature. labels Nov 12, 2021
@pchaigno pchaigno force-pushed the egressgw-datapath-refactoring branch from 68ab33b to e76ec4c Compare November 12, 2021 16:40
Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno force-pushed the egressgw-datapath-refactoring branch from e76ec4c to ca13a74 Compare November 12, 2021 16:49
@pchaigno pchaigno marked this pull request as ready for review November 12, 2021 17:07
@pchaigno pchaigno requested review from a team and borkmann November 12, 2021 17:07
@pchaigno
Copy link
Member Author

/test

Copy link
Member

@borkmann borkmann left a comment

Choose a reason for hiding this comment

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

lgtm

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Nov 15, 2021
Copy link
Contributor

@kkourt kkourt left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

bpf/lib/egress_policies.h Outdated Show resolved Hide resolved
@@ -13,6 +13,7 @@
#include "lb.h"
#include "common.h"
#include "overloadable.h"
#include "egress_policies.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: are there any policies that are not egress gw policies, that could be characterized as egress policies?

Copy link
Member Author

Choose a reason for hiding this comment

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

SRv6 egress policies are coming 😃

Move several check from bpf_lxc into a helper function
is_cluster_destination().

Signed-off-by: Paul Chaignon <paul@cilium.io>
@pchaigno pchaigno force-pushed the egressgw-datapath-refactoring branch from ca13a74 to ef858bb Compare November 15, 2021 10:56
@pchaigno
Copy link
Member Author

As seen in https://github.com/cilium/cilium/compare/ca13a74c4d8fe856d34c3892df528215bc927cd6..ef858bbab4d78bdc111d35f73947a9c8d6dbdda6, the only change of the last push is a comment change. All tests were green before that, so not triggering again and keeping ready-to-merge label.

@ti-mo ti-mo merged commit 4a10eaa into cilium:master Nov 15, 2021
@pchaigno pchaigno deleted the egressgw-datapath-refactoring branch November 15, 2021 11:02
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.10.6 Nov 15, 2021
@pchaigno
Copy link
Member Author

Added label for backporting to v1.10 to facilitate the backport of other egress gateway fixes.

@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.10 to Backport done to v1.10 in 1.10.6 Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/egress-gateway Impacts the egress IP gateway feature. 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. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
No open projects
1.10.6
Backport done to v1.10
Development

Successfully merging this pull request may close these issues.

None yet

6 participants