From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Mo, YufengX" <yufengx.mo@intel.com>,
"dts@dpdk.org" <dts@dpdk.org>, "Yao, Lei A" <lei.a.yao@intel.com>
Cc: "Mo, YufengX" <yufengx.mo@intel.com>
Subject: Re: [dts] [PATCH V1 1/1] power_branch_ratio: fix port release issue
Date: Mon, 20 Jul 2020 07:01:17 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC821F9@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20200707053854.13787-2-yufengx.mo@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of yufengmx
> Sent: 2020年7月7日 13:39
> To: dts@dpdk.org; Yao, Lei A <lei.a.yao@intel.com>
> Cc: Mo, YufengX <yufengx.mo@intel.com>
> Subject: [dts] [PATCH V1 1/1] power_branch_ratio: fix port release issue
>
>
> #. fix port release issue.
>
> Signed-off-by: yufengmx <yufengx.mo@intel.com>
> ---
> tests/TestSuite_power_branch_ratio.py | 17 +++++++++++++++--
> 1 file changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/tests/TestSuite_power_branch_ratio.py
> b/tests/TestSuite_power_branch_ratio.py
> index 8bd82d4..b45ebcb 100644
> --- a/tests/TestSuite_power_branch_ratio.py
> +++ b/tests/TestSuite_power_branch_ratio.py
> @@ -303,10 +303,12 @@ class TestPowerBranchRatio(TestCase):
> self.dut.build_install_dpdk(self.target)
>
> @contextmanager
> - def restore_compilation(self):
> + def restore_environment(self):
> try:
> yield
> finally:
> + time.sleep(10)
> + self.restore_port_drv()
> sw_table = [
> "CONFIG_RTE_LIBRTE_POWER",
> "CONFIG_RTE_LIBRTE_POWER_DEBUG", @@ -319,6 +321,17 @@
> class TestPowerBranchRatio(TestCase):
> # re-compile dpdk source code
> self.dut.build_install_dpdk(self.target)
>
> + def restore_port_drv(self):
> + driver = self.drivername
> + for port in self.dut.ports_info:
> + netdev = port.get('port')
> + if not netdev:
> + continue
> + cur_drv = netdev.get_nic_driver()
> + if cur_drv == driver:
> + continue
> + netdev.bind_driver(driver)
> +
> def init_vm_power_mgr(self):
> self.vm_power_mgr = self.prepare_binary('vm_power_manager')
>
> @@ -652,7 +665,7 @@ class TestPowerBranchRatio(TestCase):
> """
> Run after each test suite.
> """
> - with self.restore_compilation():
> + with self.restore_environment():
> self.close_vm()
>
> def set_up(self):
> --
> 2.21.0
prev parent reply other threads:[~2020-07-20 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-07 5:38 [dts] [PATCH V1 0/1] " yufengmx
2020-07-07 5:38 ` [dts] [PATCH V1 1/1] " yufengmx
2020-07-20 7:01 ` Tu, Lijuan [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=8CE3E05A3F976642AAB0F4675D0AD20E0BC821F9@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=lei.a.yao@intel.com \
--cc=yufengx.mo@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).