From 9dba32c9a8c026a98993c32bdbc01f6454a79720 Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Thu, 3 Nov 2016 15:17:49 +0200 Subject: dpdk_setup_ports.py: config creation - don't run TRex if IP config is wanted Signed-off-by: Yaroslav Brustinov --- scripts/dpdk_nic_bind.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'scripts/dpdk_nic_bind.py') diff --git a/scripts/dpdk_nic_bind.py b/scripts/dpdk_nic_bind.py index a85ecb71..36d123f1 100755 --- a/scripts/dpdk_nic_bind.py +++ b/scripts/dpdk_nic_bind.py @@ -609,7 +609,7 @@ def get_info_from_trex(pci_addr_list): pci_info_dict[pci]['TRex_Driver'] = match.group(3) return pci_info_dict -def show_table(): +def show_table(get_macs = True): '''Function called when the script is passed the "--table" option. Similar to show_status() function, but shows more info: NUMA etc.''' global dpdk_drivers @@ -620,12 +620,13 @@ def show_table(): if devices[d].get("Driver_str") in dpdk_drivers: dpdk_drv.append(d) - for pci, info in get_info_from_trex(dpdk_drv).items(): - if pci not in dpdk_drv: # sanity check, should not happen - print('Internal error while getting MACs of DPDK bound interfaces, unknown PCI: %s' % pci) - return - devices[pci].update(info) - + if get_macs: + for pci, info in get_info_from_trex(dpdk_drv).items(): + if pci not in dpdk_drv: # sanity check, should not happen + print('Internal error while getting MACs of DPDK bound interfaces, unknown PCI: %s' % pci) + return + devices[pci].update(info) + table = texttable.Texttable(max_width=-1) table.header(['ID', 'NUMA', 'PCI', 'MAC', 'Name', 'Driver', 'Linux IF', 'Active']) for id, pci in enumerate(sorted(devices.keys())): -- cgit 1.2.3-korg