aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/test
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2020-12-15 18:47:05 +0100
committerOle Tr�an <otroan@employees.org>2021-01-18 08:36:26 +0000
commit4881cb4c6f0d9c6276eb7a45ed355f9fc3d729b3 (patch)
tree07959eb6fc99b88b30e6f81f4620d8d6c70110e2 /src/plugins/nat/test
parent4a58e49cfe03150034a65e147a2ffe8d24391b86 (diff)
nat: deal with flows instead of sessions
This change introduces flow concept to endpoint-dependent NAT. Instead of having a session and a plethora of special cases in code for e.g. hairpinning, twice-nat and others, figure all this out and store it in flow logic. Every flow has a match and a rewrite part. This unifies all the NAT packet processing cases into one - match a flow and rewrite the packet based on that flow. It also provides a cure for hairpinning dilemma where one part of the flow is on one worker and another on a different one. These cases are also sped up by not requiring destination adress lookup every single time to be able to rewrite source nat as this is now part of flow rewrite logic. Type: improvement Change-Id: Ib60c992e16792ea4d4129bc10202ebb99a73b5be Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/plugins/nat/test')
-rw-r--r--src/plugins/nat/test/test_nat44_ed.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/nat/test/test_nat44_ed.py b/src/plugins/nat/test/test_nat44_ed.py
index 0f4a7371048..3d8921790ee 100644
--- a/src/plugins/nat/test/test_nat44_ed.py
+++ b/src/plugins/nat/test/test_nat44_ed.py
@@ -2004,7 +2004,7 @@ class TestNAT44EDMW(TestNAT44ED):
# out2in
tc1 = self.get_stats_counter('/nat44/ed/out2in/fastpath/tcp')
uc1 = self.get_stats_counter('/nat44/ed/out2in/fastpath/udp')
- ic1 = self.get_stats_counter('/nat44/ed/out2in/slowpath/icmp')
+ ic1 = self.get_stats_counter('/nat44/ed/out2in/fastpath/icmp')
dc1 = self.get_stats_counter('/nat44/ed/out2in/fastpath/drops')
pkts = self.create_stream_out(self.pg1)
@@ -2017,7 +2017,7 @@ class TestNAT44EDMW(TestNAT44ED):
if_idx = self.pg1.sw_if_index
tc2 = self.get_stats_counter('/nat44/ed/out2in/fastpath/tcp')
uc2 = self.get_stats_counter('/nat44/ed/out2in/fastpath/udp')
- ic2 = self.get_stats_counter('/nat44/ed/out2in/slowpath/icmp')
+ ic2 = self.get_stats_counter('/nat44/ed/out2in/fastpath/icmp')
dc2 = self.get_stats_counter('/nat44/ed/out2in/fastpath/drops')
self.assertEqual(tc2[if_idx] - tc1[if_idx], 2)
@@ -3364,7 +3364,7 @@ class TestNAT44EDMW(TestNAT44ED):
udpn = self.get_stats_counter(
'/nat44/ed/out2in/fastpath/udp')
icmpn = self.get_stats_counter(
- '/nat44/ed/out2in/slowpath/icmp')
+ '/nat44/ed/out2in/fastpath/icmp')
drops = self.get_stats_counter(
'/nat44/ed/out2in/fastpath/drops')
@@ -3383,7 +3383,7 @@ class TestNAT44EDMW(TestNAT44ED):
'/nat44/ed/out2in/fastpath/udp')
self.assertEqual(cnt[if_idx] - udpn[if_idx], 1)
cnt = self.get_stats_counter(
- '/nat44/ed/out2in/slowpath/icmp')
+ '/nat44/ed/out2in/fastpath/icmp')
self.assertEqual(cnt[if_idx] - icmpn[if_idx], 1)
cnt = self.get_stats_counter(
'/nat44/ed/out2in/fastpath/drops')