From 2dab6b6d09f9f1474d2ade6b465ebfa5ce3b3f5e Mon Sep 17 00:00:00 2001 From: Yaroslav Brustinov Date: Sat, 22 Oct 2016 10:38:27 +0200 Subject: dpdk_setup_ports.py: fix add of help in case of "t-rex-64 --help" dpdk_setup_ports.py: fix warning of TRex is already running if different NICs are being used singleton_daemon.py: fix error socket in use immediately after check if in use trex-console: fix crash in case of "tui --help" trex-console: try-catch commands instead of crashing add async notification on port status/atttibutes change add port xstats support add description of interfaces main_dpdk.cpp: fix --client_cfg not working with Python API Signed-off-by: Yaroslav Brustinov --- .../stl/trex_stl_lib/utils/constants.py | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/constants.py (limited to 'scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/constants.py') diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/constants.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/constants.py new file mode 100755 index 00000000..a4942094 --- /dev/null +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/utils/constants.py @@ -0,0 +1,26 @@ +from collections import OrderedDict + +ON_OFF_DICT = OrderedDict([ + ('on', True), + ('off', False), +]) + +UP_DOWN_DICT = OrderedDict([ + ('up', True), + ('down', False), +]) + +FLOW_CTRL_DICT = OrderedDict([ + ('none', 0), # Disable flow control + ('tx', 1), # Enable flowctrl on TX side (RX pause frames) + ('rx', 2), # Enable flowctrl on RX side (TX pause frames) + ('full', 3), # Enable flow control on both sides +]) + + + +# generate reverse dicts + +for var_name in list(vars().keys()): + if var_name.endswith('_DICT'): + exec('{0}_REVERSED = OrderedDict([(val, key) for key, val in {0}.items()])'.format(var_name)) -- cgit 1.2.3-korg