From: "Liu, Yong" <yong.liu@intel.com>
To: "Ding, HengX" <hengx.ding@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Ding, HengX" <hengx.ding@intel.com>
Subject: Re: [dts] [PATCH] dut.py: sort port list to ensure RRC nics will be configured correctly
Date: Tue, 12 Apr 2016 03:41:22 +0000 [thread overview]
Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E14EF0C60@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1460425081-7185-1-git-send-email-hengx.ding@intel.com>
Hi Heng,
I think we do not need to sort all ports in self.pci_devices_info. Only need to swap the first port and second port of RRC nic.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Ding Heng
> Sent: Tuesday, April 12, 2016 9:38 AM
> To: dts@dpdk.org
> Cc: Ding, HengX
> Subject: [dts] [PATCH] dut.py: sort port list to ensure RRC nics will be
> configured correctly
>
> Signed-off-by: Ding Heng <hengx.ding@intel.com>
>
> diff --git a/framework/dut.py b/framework/dut.py
> index bd437cb..291fef0 100644
> --- a/framework/dut.py
> +++ b/framework/dut.py
> @@ -627,6 +627,20 @@ class Dut(Crb):
> """
> Scan ports information or just read it from cache file.
> """
> + #sort ports and ensure that first port of RRC nics will be
> + #initialized first
> + sorted_ports = []
> + ports_cfg = self.conf.get_ports_config()
> + for port_cfg_all in ports_cfg.keys():
> + if 'tp_path' in ports_cfg[port_cfg_all].keys():
> + for port in self.pci_devices_info:
> + sorted_port = [port]
> + if port_cfg_all in port:
> + self.pci_devices_info.remove(port)
> + for i in self.pci_devices_info:
> + sorted_port.append(i)
> + self.pci_devices_info = sorted_port
> +
> if self.read_cache:
> self.load_serializer_ports()
> self.scan_ports_cached()
> --
> 1.9.3
prev parent reply other threads:[~2016-04-12 3:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-12 1:38 Ding Heng
2016-04-12 3:41 ` Liu, Yong [this message]
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=86228AFD5BCD8E4EBFD2B90117B5E81E14EF0C60@SHSMSX101.ccr.corp.intel.com \
--to=yong.liu@intel.com \
--cc=dts@dpdk.org \
--cc=hengx.ding@intel.com \
/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).