From 848e9a1437e8779931c9d4593aa960fb21691292 Mon Sep 17 00:00:00 2001 From: Ben Greear Date: Fri, 9 Apr 2021 11:56:56 -0700 Subject: [PATCH] longevity: Fix parsing MTU/AUTO for PDU size. Need to convert that to -1 so that LANforge will accept the value. Signed-off-by: Ben Greear --- py-scripts/test_l3_longevity.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/py-scripts/test_l3_longevity.py b/py-scripts/test_l3_longevity.py index 31c83a92..c38289f4 100755 --- a/py-scripts/test_l3_longevity.py +++ b/py-scripts/test_l3_longevity.py @@ -516,6 +516,7 @@ class L3VariableTime(Realm): # stations, so allow skipping it. # Do clean cx lists so that when we re-apply them we get same endp name # as we had previously + #print("rebuild: Clearing cx profile lists.\n") self.cx_profile.clean_cx_lists() self.multicast_profile.clean_mc_lists() @@ -538,7 +539,7 @@ class L3VariableTime(Realm): self.multicast_profile.create_mc_rx(etype, side_rx=station_profile.station_names) else: for _tos in self.tos: - print("Creating connections for endpoint type: %s TOS: %s"%(etype, _tos)) + print("Creating connections for endpoint type: %s TOS: %s cx-count: %s"%(etype, _tos, self.cx_profile.get_cx_count())) self.cx_profile.create(endp_type=etype, side_a=station_profile.station_names, side_b=self.side_b, sleep_time=0, tos=_tos) self.cx_count = self.cx_profile.get_cx_count() @@ -584,6 +585,12 @@ class L3VariableTime(Realm): ul = str(int(int(ul) / self.cx_count)) dl = str(int(int(dl) / self.cx_count)) + if (ul_pdu == "AUTO" or ul_pdu == "MTU"): + ul_pdu = "-1" + + if (dl_pdu == "AUTO" or dl_pdu == "MTU"): + dl_pdu = "-1" + print("ul: %s dl: %s cx-count: %s rates-are-totals: %s\n"%(ul, dl, self.cx_count, self.rates_are_totals)) # Set rate and pdu size config