X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=GPL%2Ftraffic_profiles%2Ftrex%2Ftrex-astf-ethip4udp-262144h.py;h=8149a27cb9e44ac5c7e6d68a0bd0bd7fe7703033;hb=d818ea2fcc9f644a1a3483007a4648266c16b7dc;hp=43ca0cba48c15c8559abe775fddddb9795b5acda;hpb=ff1f49d9ba97ddfee3229907e3a344503e072578;p=csit.git diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py index 43ca0cba48..8149a27cb9 100644 --- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py +++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-262144h.py @@ -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,8 +57,7 @@ class TrafficProfile(TrafficProfileBaseClass): # Headers length self.headers_size = 42 # 14B l2 + 20B ipv4 + 8B udp - # Required UDP keepalive value for T-Rex - self.udp_keepalive = 2000 # 2s (2,000 msec) + # 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. @@ -70,23 +73,18 @@ class TrafficProfile(TrafficProfileBaseClass): # client commands prog_c = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange - prog_c.set_keepalive_msg(self.udp_keepalive) # send REQ message prog_c.send_msg(self.udp_req) - # receive RES message - prog_c.recv_msg(1) + # No need to process the response, seeing L2 counter is enough. + # Client program can end here. # server commands prog_s = ASTFProgram(stream=False) - # set the keepalive timer for UDP flows to not close udp session - # immediately after packet exchange - prog_c.set_keepalive_msg(self.udp_keepalive) - # receive REQ message - 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(