diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/__init__.py | 1 | ||||
-rwxr-xr-x | src/dpdk/Makefile | 4 | ||||
-rw-r--r-- | src/dpdk/dpdk.py | 4 | ||||
-rw-r--r-- | src/dpdk/testpmd_proc.py | 6 | ||||
-rw-r--r-- | src/ovs/dpctl.py | 2 | ||||
-rw-r--r-- | src/ovs/ofctl.py | 37 | ||||
-rw-r--r-- | src/package-list.mk | 10 | ||||
-rw-r--r-- | src/trex/Makefile | 2 |
8 files changed, 29 insertions, 37 deletions
diff --git a/src/__init__.py b/src/__init__.py index 9293b4f8..c784ea3c 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -18,4 +18,3 @@ No functionality is expected for this package and its purpose is just to keep Python package structure intact without extra requirements for PYTHONPATH. """ - diff --git a/src/dpdk/Makefile b/src/dpdk/Makefile index 4b4330d7..1a1521db 100755 --- a/src/dpdk/Makefile +++ b/src/dpdk/Makefile @@ -82,13 +82,13 @@ endif # CentOS 7.3 specific config changes to compile ifeq ($(ID),"centos") ifeq ($(VERSION_ID),"7") - $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/lib/librte_eal/linuxapp/kni/Makefile + $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/kernel/linux/kni/Makefile endif endif # RHEL 7.3 specific config changes to compile ifeq ($(ID),"rhel") ifeq ($(VERSION_ID),"7.3") - $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/lib/librte_eal/linuxapp/kni/Makefile + $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/kernel/linux/kni/Makefile endif endif $(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=./CONFIG_RTE_LIBRTE_VHOST=y/g' $(CONFIG_FILE_LINUXAPP) diff --git a/src/dpdk/dpdk.py b/src/dpdk/dpdk.py index 2f120129..c2e656ef 100644 --- a/src/dpdk/dpdk.py +++ b/src/dpdk/dpdk.py @@ -140,7 +140,7 @@ def _vhost_user_cleanup(): def _bind_nics(): """Bind NICs using the bind tool specified in the configuration. """ - if not len(_NICS_PCI): + if not _NICS_PCI: _LOGGER.info('NICs are not configured - nothing to bind') return try: @@ -171,7 +171,7 @@ def _bind_nics(): def _unbind_nics(): """Unbind NICs using the bind tool specified in the configuration. """ - if not len(_NICS_PCI): + if not _NICS_PCI: _LOGGER.info('NICs are not configured - nothing to unbind') return try: diff --git a/src/dpdk/testpmd_proc.py b/src/dpdk/testpmd_proc.py index a8fa8eee..b89bcec2 100644 --- a/src/dpdk/testpmd_proc.py +++ b/src/dpdk/testpmd_proc.py @@ -27,8 +27,12 @@ from tools import tasks _TESTPMD_PROMPT = 'Done' +_NAME, _EXT = os.path.splitext(settings.getValue('LOG_FILE_VSWITCHD')) _LOG_FILE_VSWITCHD = os.path.join( - settings.getValue('LOG_DIR'), settings.getValue('LOG_FILE_VSWITCHD')) + settings.getValue('LOG_DIR'), + ("{name}_{uid}{ex}".format(name=_NAME, uid=settings.getValue( + 'LOG_TIMESTAMP'), ex=_EXT))) + class TestPMDProcess(tasks.Process): """Class wrapper for controlling a TestPMD instance. diff --git a/src/ovs/dpctl.py b/src/ovs/dpctl.py index 015fb38c..5030223e 100644 --- a/src/ovs/dpctl.py +++ b/src/ovs/dpctl.py @@ -60,5 +60,5 @@ class DPCtl(object): :return: None """ - self.logger.debug('delete datapath ' + dp_name) + self.logger.debug('delete datapath %s', dp_name) self.run_dpctl(['del-dp', dp_name]) diff --git a/src/ovs/ofctl.py b/src/ovs/ofctl.py index 64d54466..21da850a 100644 --- a/src/ovs/ofctl.py +++ b/src/ovs/ofctl.py @@ -25,10 +25,10 @@ import re import netaddr from tools import tasks -from conf import settings +from conf import settings as S -_OVS_BRIDGE_NAME = settings.getValue('VSWITCH_BRIDGE_NAME') -_OVS_CMD_TIMEOUT = settings.getValue('OVS_CMD_TIMEOUT') +_OVS_BRIDGE_NAME = S.getValue('VSWITCH_BRIDGE_NAME') +_OVS_CMD_TIMEOUT = S.getValue('OVS_CMD_TIMEOUT') _CACHE_FILE_NAME = '/tmp/vsperf_flows_cache' @@ -62,9 +62,11 @@ class OFBase(object): :return: None """ if self.timeout == -1: - cmd = ['sudo', settings.getValue('TOOLS')['ovs-vsctl'], '--no-wait'] + args + cmd = ['sudo', S.getValue('TOOLS')['ovs-vsctl'], '--no-wait'] + \ + S.getValue('OVS_VSCTL_ARGS') + args else: - cmd = ['sudo', settings.getValue('TOOLS')['ovs-vsctl'], '--timeout', str(self.timeout)] + args + cmd = ['sudo', S.getValue('TOOLS')['ovs-vsctl'], '--timeout', + str(self.timeout)] + S.getValue('OVS_VSCTL_ARGS') + args return tasks.run_task( cmd, self.logger, 'Running ovs-vsctl...', check_error) @@ -77,9 +79,9 @@ class OFBase(object): :return: None """ - cmd = ['sudo', settings.getValue('TOOLS')['ovs-appctl'], + cmd = ['sudo', S.getValue('TOOLS')['ovs-appctl'], '--timeout', - str(self.timeout)] + args + str(self.timeout)] + S.getValue('OVS_APPCTL_ARGS') + args return tasks.run_task( cmd, self.logger, 'Running ovs-appctl...', check_error) @@ -154,21 +156,6 @@ class OFBridge(OFBase): self._ports = {} self._cache_file = None - # context manager - - def __enter__(self): - """Create datapath - - :returns: self - """ - return self - - def __exit__(self, type_, value, traceback): - """Remove datapath. - """ - if not traceback: - self.destroy() - # helpers def run_ofctl(self, args, check_error=False, timeout=None): @@ -180,8 +167,8 @@ class OFBridge(OFBase): :return: None """ tmp_timeout = self.timeout if timeout is None else timeout - cmd = ['sudo', settings.getValue('TOOLS')['ovs-ofctl'], '-O', - 'OpenFlow13', '--timeout', str(tmp_timeout)] + args + cmd = ['sudo', S.getValue('TOOLS')['ovs-ofctl'], '--timeout', + str(tmp_timeout)] + S.getValue('OVS_OFCTL_ARGS') + args return tasks.run_task( cmd, self.logger, 'Running ovs-ofctl...', check_error) @@ -467,4 +454,4 @@ def flow_match(flow_dump, flow_src): for rule in flow_src_list: if rule in flow_dump_list: flow_src_ctrl.remove(rule) - return True if not len(flow_src_ctrl) else False + return True if not flow_src_ctrl else False diff --git a/src/package-list.mk b/src/package-list.mk index 7b82ee6f..1e40a60d 100644 --- a/src/package-list.mk +++ b/src/package-list.mk @@ -13,20 +13,20 @@ # dpdk section # DPDK_URL ?= git://dpdk.org/dpdk DPDK_URL ?= http://dpdk.org/git/dpdk -DPDK_TAG ?= v17.08 +DPDK_TAG ?= v18.11-rc2 # OVS section OVS_URL ?= https://github.com/openvswitch/ovs -OVS_TAG ?= v2.8.1 +OVS_TAG ?= v2.12.0 # VPP section VPP_URL ?= https://git.fd.io/vpp -VPP_TAG ?= v17.07 +VPP_TAG ?= v19.08.1 # QEMU section QEMU_URL ?= https://github.com/qemu/qemu.git -QEMU_TAG ?= v2.9.1 +QEMU_TAG ?= v3.1.1 # TREX section TREX_URL ?= https://github.com/cisco-system-traffic-generator/trex-core.git -TREX_TAG ?= 8bf9c16556843e55c232b64d9a5061bf588fad42 +TREX_TAG ?= v2.86 diff --git a/src/trex/Makefile b/src/trex/Makefile index 41eb52ab..fd5c47bb 100644 --- a/src/trex/Makefile +++ b/src/trex/Makefile @@ -29,6 +29,8 @@ all: force_pull force_pull: $(TAG_DONE_FLAG) $(AT)cd $(WORK_DIR) && git pull $(TREX_URL) $(TREX_TAG) @echo "git pull done" +# $(AT)wget https://raw.githubusercontent.com/phaethon/scapy/v0.18/scapy/layers/all.py -O $(WORK_DIR)/scripts/external_libs/scapy-2.3.1/python3/scapy/layers/all.py +# @echo "orignal SCAPY 2.3.1 layers/all.py was restored" $(WORK_DIR): $(AT)git clone $(TREX_URL) $(WORK_DIR) |