summaryrefslogtreecommitdiffstats
path: root/scripts/dpdk_setup_ports.py
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-12-21 16:36:29 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-12-21 16:36:29 +0200
commitc77174ade8d36f377cfa74da4c487f04988a9679 (patch)
tree1d5e4de466b4a4445e59a163d7376a7c7d7faf2c /scripts/dpdk_setup_ports.py
parentfff19c8c2faced0972601ca9956bb36a33aa6e87 (diff)
Add affinity for scapy_daemon_server to master thread from config file
Change-Id: I83d3138b713f3448bbc649e6d7a5fabe3860285c Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'scripts/dpdk_setup_ports.py')
-rwxr-xr-xscripts/dpdk_setup_ports.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py
index 1edf8f87..3f24b244 100755
--- a/scripts/dpdk_setup_ports.py
+++ b/scripts/dpdk_setup_ports.py
@@ -543,7 +543,11 @@ Other network devices
else:
print('WARNING: Some other program is using DPDK driver.\nIf it is TRex and you did not configure it for dual run, current command will fail.')
if map_driver.parent_args.stl:
- ret = os.system('%s scapy_daemon_server restart' % sys.executable)
+ try:
+ master_core = self.m_cfg_dict[0]['platform']['master_thread_id']
+ except:
+ master_core = 0
+ ret = os.system('%s scapy_daemon_server restart -c %s' % (sys.executable, master_core))
if ret:
sys.exit(1)