From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BF3EBC56A for ; Thu, 18 Jun 2015 11:16:42 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga101.fm.intel.com with ESMTP; 18 Jun 2015 02:16:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,638,1427785200"; d="scan'208";a="590127856" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 18 Jun 2015 02:16:42 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t5I9Gdcv025010; Thu, 18 Jun 2015 17:16:39 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5I9GanZ019707; Thu, 18 Jun 2015 17:16:38 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t5I9GaiK019703; Thu, 18 Jun 2015 17:16:36 +0800 From: Yong Liu To: dts@dpdk.org Date: Thu, 18 Jun 2015 17:16:35 +0800 Message-Id: <1434618995-19671-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] Support specified dut ports map in virtual scenario X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2015 09:16:43 -0000 From: Marvin Liu Signed-off-by: Marvin Liu 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