test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] use get_port_mac() to get vf mac in testpmd
@ 2015-12-25  8:56 Yulong Pei
  2015-12-30  2:46 ` Xu, Qian Q
  2016-01-05 13:40 ` Liu, Yong
  0 siblings, 2 replies; 4+ messages in thread
From: Yulong Pei @ 2015-12-25  8:56 UTC (permalink / raw)
  To: dts

use get_port_mac() to get vf mac in testpmd

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
---
 tests/TestSuite_vf_packet_rxtx.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index e5a9aca..19bc331 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -106,8 +106,12 @@ class TestVfPacketRxtx(TestCase):
 
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
+        port_id_0 = 0
+
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        self.vm0_testpmd.execute_cmd('show port info all')
+        pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('start')
 
@@ -118,7 +122,7 @@ class TestVfPacketRxtx(TestCase):
         rx_port = self.tester.get_local_port(self.dut_ports[1])
         tgen_ports.append((tx_port, rx_port))
 
-        dst_mac = self.vm_dut_0.get_mac_address(self.vm0_dut_ports[0])
+        dst_mac = pmd_vf0_mac
         src_mac = self.tester.get_mac(tx_port)
 
         pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})]
-- 
2.1.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH] use get_port_mac() to get vf mac in testpmd
  2015-12-25  8:56 [dts] [PATCH] use get_port_mac() to get vf mac in testpmd Yulong Pei
@ 2015-12-30  2:46 ` Xu, Qian Q
  2015-12-30  3:36   ` Pei, Yulong
  2016-01-05 13:40 ` Liu, Yong
  1 sibling, 1 reply; 4+ messages in thread
From: Xu, Qian Q @ 2015-12-30  2:46 UTC (permalink / raw)
  To: Pei, Yulong, dts

+        self.vm0_testpmd.execute_cmd('show port info all')
+        pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
In fact, self.vm0_testpmd.execute_cmd('show port info all') is not needed, get_port_mac has called the function to show port info port_id

Thanks
Qian

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yulong Pei
Sent: Friday, December 25, 2015 4:56 PM
To: dts@dpdk.org
Subject: [dts] [PATCH] use get_port_mac() to get vf mac in testpmd

use get_port_mac() to get vf mac in testpmd

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
---
 tests/TestSuite_vf_packet_rxtx.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index e5a9aca..19bc331 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -106,8 +106,12 @@ class TestVfPacketRxtx(TestCase):
 
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
+        port_id_0 = 0
+
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        self.vm0_testpmd.execute_cmd('show port info all')
+        pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('start')
 
@@ -118,7 +122,7 @@ class TestVfPacketRxtx(TestCase):
         rx_port = self.tester.get_local_port(self.dut_ports[1])
         tgen_ports.append((tx_port, rx_port))
 
-        dst_mac = self.vm_dut_0.get_mac_address(self.vm0_dut_ports[0])
+        dst_mac = pmd_vf0_mac
         src_mac = self.tester.get_mac(tx_port)
 
         pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})]
-- 
2.1.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH] use get_port_mac() to get vf mac in testpmd
  2015-12-30  2:46 ` Xu, Qian Q
@ 2015-12-30  3:36   ` Pei, Yulong
  0 siblings, 0 replies; 4+ messages in thread
From: Pei, Yulong @ 2015-12-30  3:36 UTC (permalink / raw)
  To: Xu, Qian Q, dts

+        self.vm0_testpmd.execute_cmd('show port info all')

It can show "all"  the port info that bind to testpmd and print the info to the log, it can help to debug when bump into issues.


-----Original Message-----
From: Xu, Qian Q 
Sent: Wednesday, December 30, 2015 10:46 AM
To: Pei, Yulong <yulong.pei@intel.com>; dts@dpdk.org
Subject: RE: [dts] [PATCH] use get_port_mac() to get vf mac in testpmd

+        self.vm0_testpmd.execute_cmd('show port info all')
+        pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
In fact, self.vm0_testpmd.execute_cmd('show port info all') is not needed, get_port_mac has called the function to show port info port_id

Thanks
Qian

-----Original Message-----
From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yulong Pei
Sent: Friday, December 25, 2015 4:56 PM
To: dts@dpdk.org
Subject: [dts] [PATCH] use get_port_mac() to get vf mac in testpmd

use get_port_mac() to get vf mac in testpmd

Signed-off-by: Yulong Pei <yulong.pei@intel.com>
---
 tests/TestSuite_vf_packet_rxtx.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
index e5a9aca..19bc331 100644
--- a/tests/TestSuite_vf_packet_rxtx.py
+++ b/tests/TestSuite_vf_packet_rxtx.py
@@ -106,8 +106,12 @@ class TestVfPacketRxtx(TestCase):
 
         self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
 
+        port_id_0 = 0
+
         self.vm0_testpmd = PmdOutput(self.vm_dut_0)
         self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
+        self.vm0_testpmd.execute_cmd('show port info all')
+        pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
         self.vm0_testpmd.execute_cmd('set fwd mac')
         self.vm0_testpmd.execute_cmd('start')
 
@@ -118,7 +122,7 @@ class TestVfPacketRxtx(TestCase):
         rx_port = self.tester.get_local_port(self.dut_ports[1])
         tgen_ports.append((tx_port, rx_port))
 
-        dst_mac = self.vm_dut_0.get_mac_address(self.vm0_dut_ports[0])
+        dst_mac = pmd_vf0_mac
         src_mac = self.tester.get_mac(tx_port)
 
         pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})]
-- 
2.1.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dts] [PATCH] use get_port_mac() to get vf mac in testpmd
  2015-12-25  8:56 [dts] [PATCH] use get_port_mac() to get vf mac in testpmd Yulong Pei
  2015-12-30  2:46 ` Xu, Qian Q
@ 2016-01-05 13:40 ` Liu, Yong
  1 sibling, 0 replies; 4+ messages in thread
From: Liu, Yong @ 2016-01-05 13:40 UTC (permalink / raw)
  To: Yulong Pei, dts

Applied. Thanks.

On 12/25/2015 04:56 PM, Yulong Pei wrote:
> use get_port_mac() to get vf mac in testpmd
>
> Signed-off-by: Yulong Pei <yulong.pei@intel.com>
> ---
>   tests/TestSuite_vf_packet_rxtx.py | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/tests/TestSuite_vf_packet_rxtx.py b/tests/TestSuite_vf_packet_rxtx.py
> index e5a9aca..19bc331 100644
> --- a/tests/TestSuite_vf_packet_rxtx.py
> +++ b/tests/TestSuite_vf_packet_rxtx.py
> @@ -106,8 +106,12 @@ class TestVfPacketRxtx(TestCase):
>   
>           self.vm0_dut_ports = self.vm_dut_0.get_ports('any')
>   
> +        port_id_0 = 0
> +
>           self.vm0_testpmd = PmdOutput(self.vm_dut_0)
>           self.vm0_testpmd.start_testpmd(VM_CORES_MASK)
> +        self.vm0_testpmd.execute_cmd('show port info all')
> +        pmd_vf0_mac = self.vm0_testpmd.get_port_mac(port_id_0)
>           self.vm0_testpmd.execute_cmd('set fwd mac')
>           self.vm0_testpmd.execute_cmd('start')
>   
> @@ -118,7 +122,7 @@ class TestVfPacketRxtx(TestCase):
>           rx_port = self.tester.get_local_port(self.dut_ports[1])
>           tgen_ports.append((tx_port, rx_port))
>   
> -        dst_mac = self.vm_dut_0.get_mac_address(self.vm0_dut_ports[0])
> +        dst_mac = pmd_vf0_mac
>           src_mac = self.tester.get_mac(tx_port)
>   
>           pkt_param=[("ether", {'dst': dst_mac, 'src': src_mac})]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-05 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-25  8:56 [dts] [PATCH] use get_port_mac() to get vf mac in testpmd Yulong Pei
2015-12-30  2:46 ` Xu, Qian Q
2015-12-30  3:36   ` Pei, Yulong
2016-01-05 13:40 ` Liu, Yong

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).