summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdoc/TRexDataAnalysisV2.py10
-rwxr-xr-xscripts/automation/regression/CPlatform.py18
-rwxr-xr-xscripts/dpdk_nic_bind.py2
3 files changed, 22 insertions, 8 deletions
diff --git a/doc/TRexDataAnalysisV2.py b/doc/TRexDataAnalysisV2.py
index f154efbe..e57b7017 100755
--- a/doc/TRexDataAnalysisV2.py
+++ b/doc/TRexDataAnalysisV2.py
@@ -128,13 +128,19 @@ class Setup:
self.all_tests_data_table = reduce(lambda x, y: pd.merge(x, y, how='outer'), all_tests_trend_data)
def plot_trend_graph_all_tests(self, save_path='', file_name='_trend_graph.png'):
- time_format = '%d-%m-%Y-%H:%M'
+ time_format1 = '%d-%m-%Y-%H:%M'
+ time_format2 = '%Y-%m-%d-%H:%M'
for test in self.tests:
test_data = test.results_df[test.results_df.columns[2]].tolist()
test_time_stamps = test.results_df[test.results_df.columns[3]].tolist()
test_time_stamps.append(self.end_date+'-23:59')
test_data.append(test_data[-1])
- float_test_time_stamps = [matdates.date2num(datetime.strptime(x, time_format)) for x in test_time_stamps]
+ float_test_time_stamps = []
+ for ts in test_time_stamps:
+ try:
+ float_test_time_stamps.append(matdates.date2num(datetime.strptime(ts, time_format1)))
+ except:
+ float_test_time_stamps.append(matdates.date2num(datetime.strptime(ts, time_format2)))
plt.plot_date(x=float_test_time_stamps, y=test_data, label=test.name, fmt='-', xdate=True)
plt.legend(fontsize='small', loc='best')
plt.ylabel('MPPS/Core (Norm)')
diff --git a/scripts/automation/regression/CPlatform.py b/scripts/automation/regression/CPlatform.py
index 79712e71..262dba2a 100755
--- a/scripts/automation/regression/CPlatform.py
+++ b/scripts/automation/regression/CPlatform.py
@@ -75,19 +75,26 @@ class CPlatform(object):
self.cmd_link.run_single_command(cache)
self.config_history['basic_if_config'] = True
- def configure_basic_filtered_interfaces(self, intf_list, mtu = 9050):
+ def configure_basic_filtered_interfaces(self, intf_list, mtu = 9050, vlan = False):
cache = CCommandCache()
for intf in intf_list:
if_command_set = []
+ if_command_set_vlan = []
if_command_set.append ('mac-address {mac}'.format( mac = intf.get_src_mac_addr()) )
if_command_set.append ('mtu %s' % mtu)
+ ip_commands = ['ip address {ip} 255.255.255.0'.format( ip = intf.get_ipv4_addr() ),
+ 'ipv6 address {ip}/64'.format( ip = intf.get_ipv6_addr() )]
if vlan:
- if_command_set.append ('ip address {ip} 255.255.255.0'.format( ip = intf.get_ipv4_addr() ))
- if_command_set.append ('ipv6 address {ip}/64'.format( ip = intf.get_ipv6_addr() ))
+ if_command_set_vlan.extend(ip_commands)
+ else:
+ if_command_set.extend(ip_commands)
cache.add('IF', if_command_set, intf.get_name())
+ if vlan:
+ if_name = intf.get_name() + '.' + (self.client_vlan if intf.is_client() else self.server_vlan)
+ cache.add('IF', if_command_set_vlan, if_name)
self.cmd_link.run_single_command(cache)
@@ -104,6 +111,7 @@ class CPlatform(object):
if i < 4:
continue
raise Exception('Could not load clean config, response: %s' % res)
+ break
def config_pbr (self, mode = 'config', vlan = False):
idx = 1
@@ -223,7 +231,7 @@ class CPlatform(object):
if self.config_history['basic_if_config']:
# in this case, duplicated interfaces will lose its ip address.
# re-config IPv4 addresses
- self.configure_basic_filtered_interfaces(self.if_mngr.get_duplicated_if() )
+ self.configure_basic_filtered_interfaces(self.if_mngr.get_duplicated_if(), vlan = vlan)
def config_no_pbr (self, vlan = False):
self.config_pbr(mode = 'unconfig', vlan = vlan)
@@ -346,7 +354,7 @@ class CPlatform(object):
if self.config_history['basic_if_config']:
# in this case, duplicated interfaces will lose its ip address.
# re-config IPv4 addresses
- self.configure_basic_filtered_interfaces(self.if_mngr.get_duplicated_if() )
+ self.configure_basic_filtered_interfaces(self.if_mngr.get_duplicated_if(), vlan = vlan)
def config_no_static_routing (self, stat_route_obj = None):
diff --git a/scripts/dpdk_nic_bind.py b/scripts/dpdk_nic_bind.py
index 6dec60cb..44d618b5 100755
--- a/scripts/dpdk_nic_bind.py
+++ b/scripts/dpdk_nic_bind.py
@@ -625,7 +625,7 @@ def show_table(get_macs = True):
get_nic_details()
dpdk_drv = []
for d in devices.keys():
- if devices[d].get("Driver_str") in (dpdk_drivers+dpdk_and_kernel):
+ if devices[d].get("Driver_str") in dpdk_drivers:
dpdk_drv.append(d)
if get_macs: