* [dts] fix queue start stop case failed for fovtille nic
@ 2015-07-06 6:55 huilongx,xu
2015-07-06 7:06 ` Liu, Yong
0 siblings, 1 reply; 5+ messages in thread
From: huilongx,xu @ 2015-07-06 6:55 UTC (permalink / raw)
To: dts
From: huilong xu <huilongx.xu@intel.com>
Signed-off-by: huilong xu <huilongx.xu@intel.com>
---
tests/TestSuite_queue_start_stop.py | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py
index 41777ac..3692aca 100644
--- a/tests/TestSuite_queue_start_stop.py
+++ b/tests/TestSuite_queue_start_stop.py
@@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase):
self.tester.scapy_foreground()
- if self.nic in ["fortville_eagle", "fortville_spirit",
- "fortville_spirit_single", "bartonhills",
- "powerville", "springville", "hartwell"]:
- pktlen = pktSize - 22
- else:
- pktlen = pktSize - 18
+ pktlen = pktSize - 14
padding = pktlen - 20
- self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="\x50"*%s)], iface="%s")' % (mac, padding, txitf))
+ self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="P"*%s)], iface="%s")' % (mac, padding, txitf))
self.tester.scapy_execute()
time.sleep(3)
out = self.tester.scapy_get_result()
if received:
- self.verify('\x50\x50\x50' in out, "start queue failed")
+ self.verify('PPP' in out, "start queue failed")
else:
- self.verify('\x50\x50\x50' not in out, "stop queue failed")
+ self.verify('PPP' not in out, "stop queue failed")
def add_code_to_dpdk(self, file_name, standard_row, add_rows, offset=0):
"""
@@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase):
"""
queue start/stop test for fortville nic
"""
- fwdmac_file = os.getcwd() + r'/dep/dpdk/app/test-pmd/macfwd.c'
+ self.dut.session.copy_file_from(r'/root/dpdk/app/test-pmd/macfwd.c')
+ fwdmac_file = 'macfwd.c'
printf_lines = ['printf("ports %u queue %u revice %u packages", fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"]
sourcelines = self.add_code_to_dpdk(fwdmac_file, r'(unlikely(nb_rx == 0)', printf_lines, 2)
self.dut.session.copy_file_to(fwdmac_file)
self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test-pmd/macfwd.c', "#")
self.dut.build_dpdk_apps('./app/test-pmd')
- self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i", "testpmd>", 120)
+ self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i --portmask=0x3", "testpmd>", 120)
self.dut.send_expect("set fwd mac", "testpmd>")
self.dut.send_expect("start", "testpmd>")
self.check_forwarding([0, 1], self.nic)
@@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase):
self.dut.send_expect("port 1 txq 0 start", "testpmd>")
self.dut.send_expect("start", "testpmd>")
self.check_forwarding([0, 1], self.nic)
+ self.dut.send_expect("quit", "testpmd>")
# recover testpmd changed
file_handel = open(fwdmac_file, "w")
file_handel.writelines(sourcelines)
file_handel.close()
+ self.dut.session.copy_file_to(fwdmac_file)
+ self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test-pmd/macfwd.c', "#")
def tear_down(self):
"""
--
1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] fix queue start stop case failed for fovtille nic
2015-07-06 6:55 [dts] fix queue start stop case failed for fovtille nic huilongx,xu
@ 2015-07-06 7:06 ` Liu, Yong
2015-07-06 7:14 ` Xu, HuilongX
0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2015-07-06 7:06 UTC (permalink / raw)
To: Xu, HuilongX, dts
Huilong,
We'd better not change the dpdk code directly. If this case need to check whether receive packets as expected, we can use "set fwd rxonly; set verbose=1" for replacement.
Also dpdk code may be not in /root/dpdk, we can change base dir and test suite can operate on dpdk extracted to "self.dut.base_dir".
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> Sent: Monday, July 06, 2015 2:55 PM
> To: dts@dpdk.org
> Subject: [dts] fix queue start stop case failed for fovtille nic
>
> From: huilong xu <huilongx.xu@intel.com>
>
>
> Signed-off-by: huilong xu <huilongx.xu@intel.com>
> ---
> tests/TestSuite_queue_start_stop.py | 21 ++++++++++-----------
> 1 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/tests/TestSuite_queue_start_stop.py
> b/tests/TestSuite_queue_start_stop.py
> index 41777ac..3692aca 100644
> --- a/tests/TestSuite_queue_start_stop.py
> +++ b/tests/TestSuite_queue_start_stop.py
> @@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase):
>
> self.tester.scapy_foreground()
>
> - if self.nic in ["fortville_eagle", "fortville_spirit",
> - "fortville_spirit_single", "bartonhills",
> - "powerville", "springville", "hartwell"]:
> - pktlen = pktSize - 22
> - else:
> - pktlen = pktSize - 18
> + pktlen = pktSize - 14
> padding = pktlen - 20
> -
> self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="\x50"*%s)],
> iface="%s")' % (mac, padding, txitf))
> +
> self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="P"*%s)],
> iface="%s")' % (mac, padding, txitf))
>
> self.tester.scapy_execute()
> time.sleep(3)
>
> out = self.tester.scapy_get_result()
> if received:
> - self.verify('\x50\x50\x50' in out, "start queue failed")
> + self.verify('PPP' in out, "start queue failed")
> else:
> - self.verify('\x50\x50\x50' not in out, "stop queue failed")
> + self.verify('PPP' not in out, "stop queue failed")
>
> def add_code_to_dpdk(self, file_name, standard_row, add_rows,
> offset=0):
> """
> @@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase):
> """
> queue start/stop test for fortville nic
> """
> - fwdmac_file = os.getcwd() + r'/dep/dpdk/app/test-pmd/macfwd.c'
> + self.dut.session.copy_file_from(r'/root/dpdk/app/test-
> pmd/macfwd.c')
> + fwdmac_file = 'macfwd.c'
> printf_lines = ['printf("ports %u queue %u revice %u packages",
> fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"]
> sourcelines = self.add_code_to_dpdk(fwdmac_file,
> r'(unlikely(nb_rx == 0)', printf_lines, 2)
> self.dut.session.copy_file_to(fwdmac_file)
> self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test-
> pmd/macfwd.c', "#")
> self.dut.build_dpdk_apps('./app/test-pmd')
>
> - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i",
> "testpmd>", 120)
> + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i --
> portmask=0x3", "testpmd>", 120)
> self.dut.send_expect("set fwd mac", "testpmd>")
> self.dut.send_expect("start", "testpmd>")
> self.check_forwarding([0, 1], self.nic)
> @@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase):
> self.dut.send_expect("port 1 txq 0 start", "testpmd>")
> self.dut.send_expect("start", "testpmd>")
> self.check_forwarding([0, 1], self.nic)
> + self.dut.send_expect("quit", "testpmd>")
>
> # recover testpmd changed
> file_handel = open(fwdmac_file, "w")
> file_handel.writelines(sourcelines)
> file_handel.close()
> + self.dut.session.copy_file_to(fwdmac_file)
> + self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test-
> pmd/macfwd.c', "#")
>
> def tear_down(self):
> """
> --
> 1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] fix queue start stop case failed for fovtille nic
2015-07-06 7:06 ` Liu, Yong
@ 2015-07-06 7:14 ` Xu, HuilongX
2015-07-06 7:17 ` Liu, Yong
0 siblings, 1 reply; 5+ messages in thread
From: Xu, HuilongX @ 2015-07-06 7:14 UTC (permalink / raw)
To: Liu, Yong, dts
Hi yong,
This is a temp test function, when development provide test function, I will update test code again.
Queue star/stop not only test rx queue, it need test tx queue also, so can't used rxonly fwd model.
Thanks a lot
> -----Original Message-----
> From: Liu, Yong
> Sent: Monday, July 06, 2015 3:07 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: RE: [dts] fix queue start stop case failed for fovtille nic
>
> Huilong,
> We'd better not change the dpdk code directly. If this case need to check
> whether receive packets as expected, we can use "set fwd rxonly; set
> verbose=1" for replacement.
>
> Also dpdk code may be not in /root/dpdk, we can change base dir and test
> suite can operate on dpdk extracted to "self.dut.base_dir".
>
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> > Sent: Monday, July 06, 2015 2:55 PM
> > To: dts@dpdk.org
> > Subject: [dts] fix queue start stop case failed for fovtille nic
> >
> > From: huilong xu <huilongx.xu@intel.com>
> >
> >
> > Signed-off-by: huilong xu <huilongx.xu@intel.com>
> > ---
> > tests/TestSuite_queue_start_stop.py | 21 ++++++++++-----------
> > 1 files changed, 10 insertions(+), 11 deletions(-)
> >
> > diff --git a/tests/TestSuite_queue_start_stop.py
> > b/tests/TestSuite_queue_start_stop.py
> > index 41777ac..3692aca 100644
> > --- a/tests/TestSuite_queue_start_stop.py
> > +++ b/tests/TestSuite_queue_start_stop.py
> > @@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase):
> >
> > self.tester.scapy_foreground()
> >
> > - if self.nic in ["fortville_eagle", "fortville_spirit",
> > - "fortville_spirit_single", "bartonhills",
> > - "powerville", "springville", "hartwell"]:
> > - pktlen = pktSize - 22
> > - else:
> > - pktlen = pktSize - 18
> > + pktlen = pktSize - 14
> > padding = pktlen - 20
> > -
> >
> self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="\x50"*%s)],
> > iface="%s")' % (mac, padding, txitf))
> > +
> > self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="P"*%s)],
> > iface="%s")' % (mac, padding, txitf))
> >
> > self.tester.scapy_execute()
> > time.sleep(3)
> >
> > out = self.tester.scapy_get_result()
> > if received:
> > - self.verify('\x50\x50\x50' in out, "start queue failed")
> > + self.verify('PPP' in out, "start queue failed")
> > else:
> > - self.verify('\x50\x50\x50' not in out, "stop queue failed")
> > + self.verify('PPP' not in out, "stop queue failed")
> >
> > def add_code_to_dpdk(self, file_name, standard_row, add_rows,
> > offset=0):
> > """
> > @@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase):
> > """
> > queue start/stop test for fortville nic
> > """
> > - fwdmac_file = os.getcwd() + r'/dep/dpdk/app/test-pmd/macfwd.c'
> > + self.dut.session.copy_file_from(r'/root/dpdk/app/test-
> > pmd/macfwd.c')
> > + fwdmac_file = 'macfwd.c'
> > printf_lines = ['printf("ports %u queue %u revice %u packages",
> > fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"]
> > sourcelines = self.add_code_to_dpdk(fwdmac_file,
> > r'(unlikely(nb_rx == 0)', printf_lines, 2)
> > self.dut.session.copy_file_to(fwdmac_file)
> > self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test-
> > pmd/macfwd.c', "#")
> > self.dut.build_dpdk_apps('./app/test-pmd')
> >
> > - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i",
> > "testpmd>", 120)
> > + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -i
> --
> > portmask=0x3", "testpmd>", 120)
> > self.dut.send_expect("set fwd mac", "testpmd>")
> > self.dut.send_expect("start", "testpmd>")
> > self.check_forwarding([0, 1], self.nic)
> > @@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase):
> > self.dut.send_expect("port 1 txq 0 start", "testpmd>")
> > self.dut.send_expect("start", "testpmd>")
> > self.check_forwarding([0, 1], self.nic)
> > + self.dut.send_expect("quit", "testpmd>")
> >
> > # recover testpmd changed
> > file_handel = open(fwdmac_file, "w")
> > file_handel.writelines(sourcelines)
> > file_handel.close()
> > + self.dut.session.copy_file_to(fwdmac_file)
> > + self.dut.send_expect('scp /root/macfwd.c /root/dpdk/app/test-
> > pmd/macfwd.c', "#")
> >
> > def tear_down(self):
> > """
> > --
> > 1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] fix queue start stop case failed for fovtille nic
2015-07-06 7:14 ` Xu, HuilongX
@ 2015-07-06 7:17 ` Liu, Yong
2015-07-06 7:21 ` Xu, HuilongX
0 siblings, 1 reply; 5+ messages in thread
From: Liu, Yong @ 2015-07-06 7:17 UTC (permalink / raw)
To: Xu, HuilongX, dts
OK, that make sense. Please change all dpdk directory to "self.dut.base_dir".
> -----Original Message-----
> From: Xu, HuilongX
> Sent: Monday, July 06, 2015 3:15 PM
> To: Liu, Yong; dts@dpdk.org
> Subject: RE: [dts] fix queue start stop case failed for fovtille nic
>
> Hi yong,
> This is a temp test function, when development provide test function, I
> will update test code again.
> Queue star/stop not only test rx queue, it need test tx queue also, so
> can't used rxonly fwd model.
> Thanks a lot
>
> > -----Original Message-----
> > From: Liu, Yong
> > Sent: Monday, July 06, 2015 3:07 PM
> > To: Xu, HuilongX; dts@dpdk.org
> > Subject: RE: [dts] fix queue start stop case failed for fovtille nic
> >
> > Huilong,
> > We'd better not change the dpdk code directly. If this case need to
> check
> > whether receive packets as expected, we can use "set fwd rxonly; set
> > verbose=1" for replacement.
> >
> > Also dpdk code may be not in /root/dpdk, we can change base dir and test
> > suite can operate on dpdk extracted to "self.dut.base_dir".
> >
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> > > Sent: Monday, July 06, 2015 2:55 PM
> > > To: dts@dpdk.org
> > > Subject: [dts] fix queue start stop case failed for fovtille nic
> > >
> > > From: huilong xu <huilongx.xu@intel.com>
> > >
> > >
> > > Signed-off-by: huilong xu <huilongx.xu@intel.com>
> > > ---
> > > tests/TestSuite_queue_start_stop.py | 21 ++++++++++-----------
> > > 1 files changed, 10 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_queue_start_stop.py
> > > b/tests/TestSuite_queue_start_stop.py
> > > index 41777ac..3692aca 100644
> > > --- a/tests/TestSuite_queue_start_stop.py
> > > +++ b/tests/TestSuite_queue_start_stop.py
> > > @@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase):
> > >
> > > self.tester.scapy_foreground()
> > >
> > > - if self.nic in ["fortville_eagle", "fortville_spirit",
> > > - "fortville_spirit_single", "bartonhills",
> > > - "powerville", "springville", "hartwell"]:
> > > - pktlen = pktSize - 22
> > > - else:
> > > - pktlen = pktSize - 18
> > > + pktlen = pktSize - 14
> > > padding = pktlen - 20
> > > -
> > >
> >
> self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="\x50"*%s)],
> > > iface="%s")' % (mac, padding, txitf))
> > > +
> > >
> self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="P"*%s)],
> > > iface="%s")' % (mac, padding, txitf))
> > >
> > > self.tester.scapy_execute()
> > > time.sleep(3)
> > >
> > > out = self.tester.scapy_get_result()
> > > if received:
> > > - self.verify('\x50\x50\x50' in out, "start queue failed")
> > > + self.verify('PPP' in out, "start queue failed")
> > > else:
> > > - self.verify('\x50\x50\x50' not in out, "stop queue
> failed")
> > > + self.verify('PPP' not in out, "stop queue failed")
> > >
> > > def add_code_to_dpdk(self, file_name, standard_row, add_rows,
> > > offset=0):
> > > """
> > > @@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase):
> > > """
> > > queue start/stop test for fortville nic
> > > """
> > > - fwdmac_file = os.getcwd() + r'/dep/dpdk/app/test-
> pmd/macfwd.c'
> > > + self.dut.session.copy_file_from(r'/root/dpdk/app/test-
> > > pmd/macfwd.c')
> > > + fwdmac_file = 'macfwd.c'
> > > printf_lines = ['printf("ports %u queue %u revice %u
> packages",
> > > fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"]
> > > sourcelines = self.add_code_to_dpdk(fwdmac_file,
> > > r'(unlikely(nb_rx == 0)', printf_lines, 2)
> > > self.dut.session.copy_file_to(fwdmac_file)
> > > self.dut.send_expect('scp /root/macfwd.c
> /root/dpdk/app/test-
> > > pmd/macfwd.c', "#")
> > > self.dut.build_dpdk_apps('./app/test-pmd')
> > >
> > > - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -
> i",
> > > "testpmd>", 120)
> > > + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 -- -
> i
> > --
> > > portmask=0x3", "testpmd>", 120)
> > > self.dut.send_expect("set fwd mac", "testpmd>")
> > > self.dut.send_expect("start", "testpmd>")
> > > self.check_forwarding([0, 1], self.nic)
> > > @@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase):
> > > self.dut.send_expect("port 1 txq 0 start", "testpmd>")
> > > self.dut.send_expect("start", "testpmd>")
> > > self.check_forwarding([0, 1], self.nic)
> > > + self.dut.send_expect("quit", "testpmd>")
> > >
> > > # recover testpmd changed
> > > file_handel = open(fwdmac_file, "w")
> > > file_handel.writelines(sourcelines)
> > > file_handel.close()
> > > + self.dut.session.copy_file_to(fwdmac_file)
> > > + self.dut.send_expect('scp /root/macfwd.c
> /root/dpdk/app/test-
> > > pmd/macfwd.c', "#")
> > >
> > > def tear_down(self):
> > > """
> > > --
> > > 1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dts] fix queue start stop case failed for fovtille nic
2015-07-06 7:17 ` Liu, Yong
@ 2015-07-06 7:21 ` Xu, HuilongX
0 siblings, 0 replies; 5+ messages in thread
From: Xu, HuilongX @ 2015-07-06 7:21 UTC (permalink / raw)
To: Liu, Yong, dts
Thanks a lot for your comments , I will send v2 patch for update dpdk path.
> -----Original Message-----
> From: Liu, Yong
> Sent: Monday, July 06, 2015 3:17 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: RE: [dts] fix queue start stop case failed for fovtille nic
>
> OK, that make sense. Please change all dpdk directory to
> "self.dut.base_dir".
>
> > -----Original Message-----
> > From: Xu, HuilongX
> > Sent: Monday, July 06, 2015 3:15 PM
> > To: Liu, Yong; dts@dpdk.org
> > Subject: RE: [dts] fix queue start stop case failed for fovtille nic
> >
> > Hi yong,
> > This is a temp test function, when development provide test function, I
> > will update test code again.
> > Queue star/stop not only test rx queue, it need test tx queue also, so
> > can't used rxonly fwd model.
> > Thanks a lot
> >
> > > -----Original Message-----
> > > From: Liu, Yong
> > > Sent: Monday, July 06, 2015 3:07 PM
> > > To: Xu, HuilongX; dts@dpdk.org
> > > Subject: RE: [dts] fix queue start stop case failed for fovtille nic
> > >
> > > Huilong,
> > > We'd better not change the dpdk code directly. If this case need to
> > check
> > > whether receive packets as expected, we can use "set fwd rxonly; set
> > > verbose=1" for replacement.
> > >
> > > Also dpdk code may be not in /root/dpdk, we can change base dir and
> test
> > > suite can operate on dpdk extracted to "self.dut.base_dir".
> > >
> > > > -----Original Message-----
> > > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of huilongx,xu
> > > > Sent: Monday, July 06, 2015 2:55 PM
> > > > To: dts@dpdk.org
> > > > Subject: [dts] fix queue start stop case failed for fovtille nic
> > > >
> > > > From: huilong xu <huilongx.xu@intel.com>
> > > >
> > > >
> > > > Signed-off-by: huilong xu <huilongx.xu@intel.com>
> > > > ---
> > > > tests/TestSuite_queue_start_stop.py | 21 ++++++++++-----------
> > > > 1 files changed, 10 insertions(+), 11 deletions(-)
> > > >
> > > > diff --git a/tests/TestSuite_queue_start_stop.py
> > > > b/tests/TestSuite_queue_start_stop.py
> > > > index 41777ac..3692aca 100644
> > > > --- a/tests/TestSuite_queue_start_stop.py
> > > > +++ b/tests/TestSuite_queue_start_stop.py
> > > > @@ -92,23 +92,18 @@ class TestQueueStartStop(TestCase):
> > > >
> > > > self.tester.scapy_foreground()
> > > >
> > > > - if self.nic in ["fortville_eagle", "fortville_spirit",
> > > > - "fortville_spirit_single", "bartonhills",
> > > > - "powerville", "springville", "hartwell"]:
> > > > - pktlen = pktSize - 22
> > > > - else:
> > > > - pktlen = pktSize - 18
> > > > + pktlen = pktSize - 14
> > > > padding = pktlen - 20
> > > > -
> > > >
> > >
> >
> self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="\x50"*%s)],
> > > > iface="%s")' % (mac, padding, txitf))
> > > > +
> > > >
> > self.tester.scapy_append('sendp([Ether(dst="%s")/IP()/Raw(load="P"*%s)],
> > > > iface="%s")' % (mac, padding, txitf))
> > > >
> > > > self.tester.scapy_execute()
> > > > time.sleep(3)
> > > >
> > > > out = self.tester.scapy_get_result()
> > > > if received:
> > > > - self.verify('\x50\x50\x50' in out, "start queue failed")
> > > > + self.verify('PPP' in out, "start queue failed")
> > > > else:
> > > > - self.verify('\x50\x50\x50' not in out, "stop queue
> > failed")
> > > > + self.verify('PPP' not in out, "stop queue failed")
> > > >
> > > > def add_code_to_dpdk(self, file_name, standard_row, add_rows,
> > > > offset=0):
> > > > """
> > > > @@ -148,14 +143,15 @@ class TestQueueStartStop(TestCase):
> > > > """
> > > > queue start/stop test for fortville nic
> > > > """
> > > > - fwdmac_file = os.getcwd() + r'/dep/dpdk/app/test-
> > pmd/macfwd.c'
> > > > + self.dut.session.copy_file_from(r'/root/dpdk/app/test-
> > > > pmd/macfwd.c')
> > > > + fwdmac_file = 'macfwd.c'
> > > > printf_lines = ['printf("ports %u queue %u revice %u
> > packages",
> > > > fs->rx_port, fs->rx_queue, nb_rx);\n', r'printf("\n");',"\n"]
> > > > sourcelines = self.add_code_to_dpdk(fwdmac_file,
> > > > r'(unlikely(nb_rx == 0)', printf_lines, 2)
> > > > self.dut.session.copy_file_to(fwdmac_file)
> > > > self.dut.send_expect('scp /root/macfwd.c
> > /root/dpdk/app/test-
> > > > pmd/macfwd.c', "#")
> > > > self.dut.build_dpdk_apps('./app/test-pmd')
> > > >
> > > > - self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 --
> -
> > i",
> > > > "testpmd>", 120)
> > > > + self.dut.send_expect("./app/test-pmd/testpmd -c 0xf -n 4 --
> -
> > i
> > > --
> > > > portmask=0x3", "testpmd>", 120)
> > > > self.dut.send_expect("set fwd mac", "testpmd>")
> > > > self.dut.send_expect("start", "testpmd>")
> > > > self.check_forwarding([0, 1], self.nic)
> > > > @@ -185,11 +181,14 @@ class TestQueueStartStop(TestCase):
> > > > self.dut.send_expect("port 1 txq 0 start", "testpmd>")
> > > > self.dut.send_expect("start", "testpmd>")
> > > > self.check_forwarding([0, 1], self.nic)
> > > > + self.dut.send_expect("quit", "testpmd>")
> > > >
> > > > # recover testpmd changed
> > > > file_handel = open(fwdmac_file, "w")
> > > > file_handel.writelines(sourcelines)
> > > > file_handel.close()
> > > > + self.dut.session.copy_file_to(fwdmac_file)
> > > > + self.dut.send_expect('scp /root/macfwd.c
> > /root/dpdk/app/test-
> > > > pmd/macfwd.c', "#")
> > > >
> > > > def tear_down(self):
> > > > """
> > > > --
> > > > 1.7.4.4
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-07-06 7:22 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-06 6:55 [dts] fix queue start stop case failed for fovtille nic huilongx,xu
2015-07-06 7:06 ` Liu, Yong
2015-07-06 7:14 ` Xu, HuilongX
2015-07-06 7:17 ` Liu, Yong
2015-07-06 7:21 ` Xu, HuilongX
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).