From: Yong Liu <yong.liu@intel.com>
To: dts@dpdk.org
Subject: [dts] [PATCH] Support specified dut ports map in virtual scenario
Date: Thu, 18 Jun 2015 17:16:35 +0800 [thread overview]
Message-ID: <1434618995-19671-1-git-send-email-yong.liu@intel.com> (raw)
From: Marvin Liu <yong.liu@intel.com>
Signed-off-by: Marvin Liu <yong.liu@intel.com>
diff --git a/conf/ports.cfg b/conf/ports.cfg
index 43cab27..27ebfe0 100644
--- a/conf/ports.cfg
+++ b/conf/ports.cfg
@@ -4,8 +4,15 @@
# pci=Pci BDF,intf=Kernel interface;
# pci=Pci BDF,mac=Mac address,peer=Tester Pci BDF,numa=Port Numa
# pci=Pci BDF,peer=IXIA:card.port
+# [VM NAME] virtual machine name; This section is for virutal scenario
+# ports =
+# dev_idx=device index of ports info, peer=Tester Pci BDF
[DUT IP]
ports =
pci=XX:XX.X,intf=eth0;
pci=YY:YY.Y,mac=XX:XX:XX:XX:XX:XX,peer=ZZ:ZZ.Z,numa=0;
pci=ZZ:ZZ.Y,peer=IXIA:X.Y
+[VM NAME]
+ports =
+ dev_idx=0,peer=XX:XX.X;
+ dev_idx=1,peer=YY:YY.Y;
diff --git a/framework/config.py b/framework/config.py
index 5948edb..65cecd4 100644
--- a/framework/config.py
+++ b/framework/config.py
@@ -150,6 +150,14 @@ class PortConf(UserConf):
for config in confs:
port_param = self.port_conf.load_param(config)
+ # port config for vm in virtualization scenario
+ if 'dev_idx' in port_param:
+ keys = port_param.keys()
+ keys.remove('dev_idx')
+ self.ports_cfg[port_param['dev_idx']] = {
+ key: port_param[key] for key in keys}
+ continue
+
# check pci BDF validity
if 'pci' not in port_param:
print "NOT FOUND CONFIG FOR NO PCI ADDRESS!!!"
@@ -177,7 +185,6 @@ class PortConf(UserConf):
return False
-
if __name__ == '__main__':
parser = argparse.ArgumentParser(
description="Load DTS configuration files")
--
1.9.3
reply other threads:[~2015-06-18 9:16 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434618995-19671-1-git-send-email-yong.liu@intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).