From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "Mei, JianweiX" <jianweix.mei@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Cc: "Mei, JianweiX" <jianweix.mei@intel.com>
Subject: Re: [dts] [PATCH V6] tests/etag:add vf driver vfio-pci
Date: Thu, 18 Apr 2019 23:37:45 +0000 [thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA63E28@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1555478675-4581-1-git-send-email-jianweix.mei@intel.com>
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jianwei Mei
> Sent: Tuesday, April 16, 2019 10:25 PM
> To: dts@dpdk.org
> Cc: Mei, JianweiX <jianweix.mei@intel.com>
> Subject: [dts] [PATCH V6] tests/etag:add vf driver vfio-pci
>
> Signed-off-by: Jianwei Mei <jianweix.mei@intel.com>
> ---
> tests/TestSuite_etag.py | 24 ++++++++++++++++++------
> 1 file changed, 18 insertions(+), 6 deletions(-)
>
> diff --git a/tests/TestSuite_etag.py b/tests/TestSuite_etag.py index
> 7cf93eb..45c5163 100644
> --- a/tests/TestSuite_etag.py
> +++ b/tests/TestSuite_etag.py
> @@ -51,9 +51,10 @@ from packet import Packet VM_CORES_MASK = 'all'
>
> class TestEtag(TestCase):
> + supported_vf_driver = ['pci-stub', 'vfio-pci']
> def set_up_all(self):
> self.dut_ports = self.dut.get_ports(self.nic)
> - self.verify(self.nic in ['sagepond'], '802.1BR only support by sagepond')
> + self.verify(self.nic in ['sagepond','sageville'], '802.1BR only
> + support by sagepond and sageville')
> self.verify(len(self.dut_ports) >= 1, 'Insufficient ports')
> self.src_intf = self.tester.get_interface(self.tester.get_local_port(0))
> self.src_mac = self.tester.get_mac(self.tester.get_local_port(0))
> @@ -78,9 +79,20 @@ class TestEtag(TestCase):
> self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 2,
> driver=driver)
> self.sriov_vfs_port_0 =
> self.dut.ports_info[self.used_dut_port_0]['vfs_port']
>
> + # set vf assign method and vf driver
> + self.vf_driver = self.get_suite_cfg()['vf_driver']
> + if self.vf_driver is None:
> + self.vf_driver = 'pci-stub'
> + self.verify(self.vf_driver in self.supported_vf_driver, "Unspported vf
> driver")
> + if self.vf_driver == 'pci-stub':
> + self.vf_assign_method = 'pci-assign'
> + else:
> + self.vf_assign_method = 'vfio-pci'
> + self.dut.send_expect('modprobe vfio-pci', '#')
> +
> try:
> for port in self.sriov_vfs_port_0:
> - port.bind_driver('pci-stub')
> + port.bind_driver(self.vf_driver)
>
> time.sleep(1)
> vf0_prop = {'opt_host': self.sriov_vfs_port_0[0].pci} @@ -91,12
> +103,12 @@ class TestEtag(TestCase):
> eal_param = '-b %(vf0)s -b %(vf1)s' % {'vf0': self.sriov_vfs_port_0[0].pci,
> 'vf1': self.sriov_vfs_port_0[1].pci}
>
> - self.preset_host_testpmd('1S/2C/2T', eal_param)
> + self.preset_host_testpmd(VM_CORES_MASK, eal_param)
>
> # set up VM0 ENV
> self.vm0 = QEMUKvm(self.dut, 'vm0', 'vf_etag')
> - self.vm0.set_vm_device(driver='pci-assign', **vf0_prop)
> - self.vm0.set_vm_device(driver='pci-assign', **vf1_prop)
> + self.vm0.set_vm_device(driver=self.vf_assign_method, **vf0_prop)
> + self.vm0.set_vm_device(driver=self.vf_assign_method,
> + **vf1_prop)
> self.vm_dut_0 = self.vm0.start()
> if self.vm_dut_0 is None:
> raise Exception('Set up VM0 ENV failed!') @@ -290,7 +302,7 @@
> class TestEtag(TestCase):
> else:
> # Same E-tag forwarding to VF0, Send 802.1BR packet with
> broadcast mac and
> # check packet only received on VF0 or VF1
> - host_cmds = [['E-tag set filter add e-tag-id 1000 dst-pool %d port
> 0'%test_type[-1:]],
> + host_cmds = [['E-tag set filter add e-tag-id 1000
> + dst-pool %d port 0'% int(test_type[-1:])],
> ['set fwd rxonly'],
> ['set verbose 1'],
> ['start']]
> --
> 2.17.2
prev parent reply other threads:[~2019-04-18 23:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 5:24 Jianwei Mei
2019-04-17 5:22 ` Zhu, ShuaiX
2019-04-18 23:37 ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BA63E28@SHSMSX101.ccr.corp.intel.com \
--to=lijuan.tu@intel.com \
--cc=dts@dpdk.org \
--cc=jianweix.mei@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).