fix(astf): avoid issues in pps tput 53/36653/9
authorVratko Polak <vrpolak@cisco.com>
Wed, 20 Jul 2022 08:18:29 +0000 (10:18 +0200)
committerVratko Polak <vrpolak@cisco.com>
Wed, 20 Jul 2022 08:18:29 +0000 (10:18 +0200)
When more than 1 data packet is sent in the same chunk,
TRex is sometimes not fully deterministic
in its usage of delayed ACKs.

This changes the "application protocol" to sent
5 chunks (1 data packet each), c2s and s2c interleaved,
so each subsequent chunk acts as an ACK.

The overall packet count remains the same,
and even though this interleaved way may be more demanding
on TRex CPU, preliminary results show NAT performance
is still well below ip4base performance.

As a side effect, the interleaved way seems to work
also for 100B data frames, so we are avoiding two issues at once.

Ticket: CSIT-1846
Ticket: CSIT-1830

Change-Id: Ia4dcfa7c89f2c08fc32bd6118e2e009316b33c25
Signed-off-by: Vratko Polak <vrpolak@cisco.com>
GPL/traffic_profiles/trex/trex-astf-ethip4tcp-1024h-pps.py
GPL/traffic_profiles/trex/trex-astf-ethip4tcp-16384h-pps.py
GPL/traffic_profiles/trex/trex-astf-ethip4tcp-262144h-pps.py
GPL/traffic_profiles/trex/trex-astf-ethip4tcp-4096h-pps.py
GPL/traffic_profiles/trex/trex-astf-ethip4tcp-65536h-pps.py
docs/report/introduction/methodology_nat44.rst

index 546e11b..9c3ab87 100644 (file)
@@ -73,14 +73,20 @@ class TrafficProfile(TrafficProfileBaseClass):
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
-        prog_c.send(u"1" * data_size)
-        prog_c.recv(data_size)
+        prog_c.set_var(u"var1", self.n_data_frames)
+        prog_c.set_label(u"a1:")
+        prog_c.send(u"1" * real_mss)
+        prog_c.recv(real_mss)
+        prog_c.jmp_nz(u"var1", u"a1:")
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
-        prog_s.recv(data_size)
-        prog_s.send(u"1" * data_size)
+        prog_s.set_var(u"var2", self.n_data_frames)
+        prog_s.set_label(u"a2:")
+        prog_s.recv(real_mss)
+        prog_s.send(u"1" * real_mss)
+        prog_s.jmp_nz(u"var2", u"a2:")
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
@@ -113,11 +119,8 @@ class TrafficProfile(TrafficProfileBaseClass):
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
-        # Ensure the whole transaction is a single burst (per direction).
-        globinfo.tcp.initwnd = self.n_data_frames
-        # Ensure buffers are large enough so starting window works.
-        globinfo.tcp.txbufsize = data_size
-        globinfo.tcp.rxbufsize = data_size
+        globinfo.tcp.txbufsize = trex_mss
+        globinfo.tcp.rxbufsize = trex_mss
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
index 565ccac..ae5879a 100644 (file)
@@ -73,14 +73,20 @@ class TrafficProfile(TrafficProfileBaseClass):
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
-        prog_c.send(u"1" * data_size)
-        prog_c.recv(data_size)
+        prog_c.set_var(u"var1", self.n_data_frames)
+        prog_c.set_label(u"a1:")
+        prog_c.send(u"1" * real_mss)
+        prog_c.recv(real_mss)
+        prog_c.jmp_nz(u"var1", u"a1:")
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
-        prog_s.recv(data_size)
-        prog_s.send(u"1" * data_size)
+        prog_s.set_var(u"var2", self.n_data_frames)
+        prog_s.set_label(u"a2:")
+        prog_s.recv(real_mss)
+        prog_s.send(u"1" * real_mss)
+        prog_s.jmp_nz(u"var2", u"a2:")
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
@@ -113,11 +119,8 @@ class TrafficProfile(TrafficProfileBaseClass):
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
-        # Ensure the whole transaction is a single burst (per direction).
-        globinfo.tcp.initwnd = self.n_data_frames
-        # Ensure buffers are large enough so starting window works.
-        globinfo.tcp.txbufsize = data_size
-        globinfo.tcp.rxbufsize = data_size
+        globinfo.tcp.txbufsize = trex_mss
+        globinfo.tcp.rxbufsize = trex_mss
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
index 54b38a4..4646838 100644 (file)
@@ -73,14 +73,20 @@ class TrafficProfile(TrafficProfileBaseClass):
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
-        prog_c.send(u"1" * data_size)
-        prog_c.recv(data_size)
+        prog_c.set_var(u"var1", self.n_data_frames)
+        prog_c.set_label(u"a1:")
+        prog_c.send(u"1" * real_mss)
+        prog_c.recv(real_mss)
+        prog_c.jmp_nz(u"var1", u"a1:")
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
-        prog_s.recv(data_size)
-        prog_s.send(u"1" * data_size)
+        prog_s.set_var(u"var2", self.n_data_frames)
+        prog_s.set_label(u"a2:")
+        prog_s.recv(real_mss)
+        prog_s.send(u"1" * real_mss)
+        prog_s.jmp_nz(u"var2", u"a2:")
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
@@ -113,11 +119,8 @@ class TrafficProfile(TrafficProfileBaseClass):
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
-        # Ensure the whole transaction is a single burst (per direction).
-        globinfo.tcp.initwnd = self.n_data_frames
-        # Ensure buffers are large enough so starting window works.
-        globinfo.tcp.txbufsize = data_size
-        globinfo.tcp.rxbufsize = data_size
+        globinfo.tcp.txbufsize = trex_mss
+        globinfo.tcp.rxbufsize = trex_mss
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
index 0108edb..35e9614 100644 (file)
@@ -73,14 +73,20 @@ class TrafficProfile(TrafficProfileBaseClass):
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
-        prog_c.send(u"1" * data_size)
-        prog_c.recv(data_size)
+        prog_c.set_var(u"var1", self.n_data_frames)
+        prog_c.set_label(u"a1:")
+        prog_c.send(u"1" * real_mss)
+        prog_c.recv(real_mss)
+        prog_c.jmp_nz(u"var1", u"a1:")
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
-        prog_s.recv(data_size)
-        prog_s.send(u"1" * data_size)
+        prog_s.set_var(u"var2", self.n_data_frames)
+        prog_s.set_label(u"a2:")
+        prog_s.recv(real_mss)
+        prog_s.send(u"1" * real_mss)
+        prog_s.jmp_nz(u"var2", u"a2:")
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
@@ -113,11 +119,8 @@ class TrafficProfile(TrafficProfileBaseClass):
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
-        # Ensure the whole transaction is a single burst (per direction).
-        globinfo.tcp.initwnd = self.n_data_frames
-        # Ensure buffers are large enough so starting window works.
-        globinfo.tcp.txbufsize = data_size
-        globinfo.tcp.rxbufsize = data_size
+        globinfo.tcp.txbufsize = trex_mss
+        globinfo.tcp.rxbufsize = trex_mss
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
index 54de3e5..5dcfb70 100644 (file)
@@ -73,14 +73,20 @@ class TrafficProfile(TrafficProfileBaseClass):
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
         # client commands
         prog_c = ASTFProgram()
         prog_c.connect()
-        prog_c.send(u"1" * data_size)
-        prog_c.recv(data_size)
+        prog_c.set_var(u"var1", self.n_data_frames)
+        prog_c.set_label(u"a1:")
+        prog_c.send(u"1" * real_mss)
+        prog_c.recv(real_mss)
+        prog_c.jmp_nz(u"var1", u"a1:")
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
 
         # server commands
         prog_s = ASTFProgram()
         prog_s.accept()
-        prog_s.recv(data_size)
-        prog_s.send(u"1" * data_size)
+        prog_s.set_var(u"var2", self.n_data_frames)
+        prog_s.set_label(u"a2:")
+        prog_s.recv(real_mss)
+        prog_s.send(u"1" * real_mss)
+        prog_s.jmp_nz(u"var2", u"a2:")
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(
@@ -113,11 +119,8 @@ class TrafficProfile(TrafficProfileBaseClass):
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
         globinfo = ASTFGlobalInfo()
         # Ensure correct data frame size.
         globinfo.tcp.mss = trex_mss
-        # Ensure the whole transaction is a single burst (per direction).
-        globinfo.tcp.initwnd = self.n_data_frames
-        # Ensure buffers are large enough so starting window works.
-        globinfo.tcp.txbufsize = data_size
-        globinfo.tcp.rxbufsize = data_size
+        globinfo.tcp.txbufsize = trex_mss
+        globinfo.tcp.rxbufsize = trex_mss
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
         kwargs = dict(
             default_c_glob_info=globinfo,
             default_s_glob_info=globinfo,
index fb4cbd0..1b00ef2 100644 (file)
@@ -416,6 +416,9 @@ TCP TPUT
 This profile uses a small transaction of "request-response" type,
 with some data amount to be transferred both ways.
 
 This profile uses a small transaction of "request-response" type,
 with some data amount to be transferred both ways.
 
+In CSIT release 22.06, TRex behavior changed, so we needed to edit
+the traffic profile. Let us describe the pre-22.06 profile first.
+
 Client connects, sends 5 data packets worth of data,
 receives 5 data packets worth of data and closes its side of the connection.
 Server accepts connection, reads 5 data packets worth of data,
 Client connects, sends 5 data packets worth of data,
 receives 5 data packets worth of data and closes its side of the connection.
 Server accepts connection, reads 5 data packets worth of data,
@@ -449,6 +452,19 @@ and somehow uneven rate of packets sent. This makes it hard to interpret
 MRR results (frequently MRR is below NDR for this reason),
 but NDR and PDR results tend to be stable enough.
 
 MRR results (frequently MRR is below NDR for this reason),
 but NDR and PDR results tend to be stable enough.
 
+In 22.06, the "ACK from the receiving side" behavior changed,
+the receiving side started sending ACK sometimes
+also before receiving the full set of 5 data packets.
+If the previous profile is understood as a "single challenge, single response"
+where challenge (and also response) is sent as a burst of 5 data packets,
+the new profile uses "bursts" of 1 packet instead, but issues
+the challenge-response part 5 times sequentially
+(waiting for receiving the response before sending next challenge).
+This new profile happens to have the same overall packet count
+(when no re-transmissions are needed).
+Although it is possibly more taxing for TRex CPU,
+the results are comparable to the old traffic profile.
+
 Ip4base tests
 ^^^^^^^^^^^^^
 
 Ip4base tests
 ^^^^^^^^^^^^^