aboutsummaryrefslogtreecommitdiffstats
path: root/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py
diff options
context:
space:
mode:
authorJan Gelety <jgelety@cisco.com>2020-08-06 03:34:31 +0200
committerJan Gelety <jgelety@cisco.com>2020-08-07 22:03:19 +0200
commitff1f49d9ba97ddfee3229907e3a344503e072578 (patch)
tree44897453f4cddb795ea8adb4cb05af2d12a6f975 /GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py
parent42d1016e92cf2b8ba4e493d878c475de325a447a (diff)
Perf: NAT44 endpoint-dependent mode - udp, part I
- continuation of https://gerrit.fd.io/r/c/csit/+/26898 as there was reached limit of changes (1000) Jira: CSIT-1711 - udp synthetic profiles w/o data packets - udp cps perf tests, phase I (no special "search cps" KW) Part I means that we are using MRR tests to collect traffic data until there is ready new CPS test type with corresponding algorithm. Change-Id: I0d30feb9ecf1d0bff937152656f8eb422f831378 Signed-off-by: Jan Gelety <jgelety@cisco.com>
Diffstat (limited to 'GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py')
-rw-r--r--GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py
index a010fe1613..c2a004bc52 100644
--- a/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py
+++ b/GPL/traffic_profiles/trex/trex-astf-ethip4udp-1024h.py
@@ -53,6 +53,9 @@ 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)
+
def define_profile(self):
"""Define profile to be used by advanced stateful traffic generator.
@@ -67,12 +70,22 @@ 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
+ # 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)
# 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)
+ # send RES message
prog_s.send_msg(self.udp_res)
# ip generators