-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nathan Skrzypczak <[email protected]>
- Loading branch information
Showing
6 changed files
with
68 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
VPP Version : 23.06-rc0~206-gbc006bb5a | ||
VPP Version : 23.06-rc0~211-gf559a7816 | ||
Binapi-generator version : govpp v0.8.0-dev | ||
VPP Base commit : 28d74a396 gerrit:34726/3 interface: add buffer stats api | ||
VPP Base commit : 004ebac6a gerrit:34726/3 interface: add buffer stats api | ||
------------------ Cherry picked commits -------------------- | ||
capo: Calico Policies plugin | ||
acl: acl-plugin custom policies | ||
cnat: [WIP] no k8s maglev from pods | ||
pbl: Port based balancer | ||
gerrit:34552/8 cnat: add single lookup | ||
gerrit:29748/5 cnat: remove rwlock on ts | ||
gerrit:32821/6 cnat: add ip/client bihash | ||
gerrit:34108/5 cnat: flag to disable rsession | ||
gerrit:31449/10 cnat: dont compute offloaded cksums | ||
gerrit:34726/3 interface: add buffer stats api | ||
------------------------------------------------------------- |
49 changes: 15 additions & 34 deletions
49
vpplink/generated/patches/0002-cnat-WIP-no-k8s-maglev-from-pods.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,30 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Nathan Skrzypczak <[email protected]> | ||
Date: Mon, 8 Mar 2021 19:00:04 +0100 | ||
Date: Fri, 7 Apr 2023 16:57:30 +0200 | ||
Subject: [PATCH 2/4] cnat: [WIP] no k8s maglev from pods | ||
|
||
Type: improvement | ||
|
||
Change-Id: If0702dbc51c308f0bb0ed16149c293d7adf9a984 | ||
Change-Id: Id262a97986b6de01a42019287377486787f2e606 | ||
Signed-off-by: Nathan Skrzypczak <[email protected]> | ||
--- | ||
src/plugins/cnat/cnat_node_feature.c | 8 +++++++- | ||
1 file changed, 7 insertions(+), 1 deletion(-) | ||
src/plugins/cnat/cnat_node_feature.c | 5 ++++- | ||
1 file changed, 4 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/plugins/cnat/cnat_node_feature.c b/src/plugins/cnat/cnat_node_feature.c | ||
index 76aa89398..fd3b90a1a 100644 | ||
index f6d4850f8..f2b65b2ff 100644 | ||
--- a/src/plugins/cnat/cnat_node_feature.c | ||
+++ b/src/plugins/cnat/cnat_node_feature.c | ||
@@ -43,6 +43,7 @@ cnat_input_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node, | ||
int session_not_found, cnat_session_t *session) | ||
{ | ||
vlib_combined_counter_main_t *cntm = &cnat_translation_counters; | ||
+ cnat_snat_policy_main_t *cpm = &cnat_snat_policy_main; | ||
const cnat_translation_t *ct = NULL; | ||
ip4_header_t *ip4 = NULL; | ||
ip_protocol_t iproto; | ||
@@ -53,6 +54,9 @@ cnat_input_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node, | ||
index_t cti; | ||
u8 trace_flags = 0; | ||
@@ -112,7 +112,10 @@ cnat_input_feature_new_flow_inline (vlib_main_t *vm, vlib_buffer_t *b, | ||
clib_host_to_net_u16 (trk0->ct_ep[VLIB_TX].ce_port) : | ||
rw->tuple.port[VLIB_TX]; | ||
|
||
- if (trk0->ct_flags & CNAT_TRK_FLAG_NO_NAT) | ||
+ u32 in_if = vnet_buffer (b)->sw_if_index[VLIB_RX]; | ||
+ int ispod; | ||
+ | ||
/* By default follow arc default next */ | ||
vnet_feature_next (&next0, b); | ||
|
||
@@ -127,7 +131,9 @@ cnat_input_feature_fn (vlib_main_t *vm, vlib_node_runtime_t *node, | ||
session->value.cs_port[VLIB_RX] = udp0->src_port; | ||
session->value.flags = 0; | ||
|
||
- if (trk0->ct_flags & CNAT_TRK_FLAG_NO_NAT) | ||
+ ispod = clib_bitmap_get ( | ||
+ cpm->interface_maps[CNAT_SNAT_IF_MAP_INCLUDE_POD], in_if); | ||
+ if (trk0->ct_flags & CNAT_TRK_FLAG_NO_NAT && !ispod) | ||
{ | ||
const dpo_id_t *dpo0; | ||
const load_balance_t *lb1; | ||
+ int ispod = clib_bitmap_get ( | ||
+ cnat_snat_policy_main.interface_maps[CNAT_SNAT_IF_MAP_INCLUDE_POD], in_if); | ||
+ if (trk0->ct_flags & CNAT_TRK_FLAG_NO_NAT && !ispod) | ||
{ | ||
const dpo_id_t *dpo0; | ||
const load_balance_t *lb1; | ||
-- | ||
2.39.2 | ||
|
This file contains 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