ASTF: Lessen L7 processing in UDP_CPS profiles
[csit.git] / GPL / traffic_profiles / trex / trex-astf-ethip4udp-1024h.py
index a010fe1..ebcf17e 100644 (file)
@@ -25,6 +25,10 @@ Traffic profile:
      on port 1
    - Destination IP address range: source IP address from packet received
      on port 1
+
+This is a profile for CPS tests, it only sets up UDP session.
+No delays, no data transfer.
+Keepalive mechanism cannot be disabled, so it is at least set to long waits.
 """
 
 from trex.astf.api import *
@@ -53,6 +57,8 @@ class TrafficProfile(TrafficProfileBaseClass):
         # Headers length
         self.headers_size = 42  # 14B l2 + 20B ipv4 + 8B udp
 
+        # No need to set keepalive, both programs end just after start&send.
+
     def define_profile(self):
         """Define profile to be used by advanced stateful traffic generator.
 
@@ -67,13 +73,18 @@ class TrafficProfile(TrafficProfileBaseClass):
 
         # client commands
         prog_c = ASTFProgram(stream=False)
-        prog_c.send_msg(self.udp_req)  # size and fill not supported in v2.73
-        prog_c.recv_msg(1)
+        # send REQ message
+        prog_c.send_msg(self.udp_req)
+        # No need to process the response, seeing L2 counter is enough.
+        # Client program can end here.
 
         # server commands
         prog_s = ASTFProgram(stream=False)
-        prog_s.recv_msg(1)
+        # When server instance is created means REQ is visible in L2 counter.
+        # No need to receive explicitly?
+        # send RES message
         prog_s.send_msg(self.udp_res)
+        # Server program can end here.
 
         # ip generators
         ip_gen_c = ASTFIPGenDist(