test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] update send_pakcet method to disperse pkts to all queues
@ 2019-07-02  9:41 xiao,qimai
  2019-07-03  5:36 ` Tu, Lijuan
  2019-07-03  7:19 ` Zhang, YanX A
  0 siblings, 2 replies; 3+ messages in thread
From: xiao,qimai @ 2019-07-02  9:41 UTC (permalink / raw)
  To: dts; +Cc: xiao,qimai

update send_pakcet method to disperse pkts to all queues

Signed-off-by: xiao,qimai <qimaix.xiao@intel.com>
---
 tests/TestSuite_runtime_vf_queue_number_kernel.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_runtime_vf_queue_number_kernel.py b/tests/TestSuite_runtime_vf_queue_number_kernel.py
index 0dfac52..4232253 100644
--- a/tests/TestSuite_runtime_vf_queue_number_kernel.py
+++ b/tests/TestSuite_runtime_vf_queue_number_kernel.py
@@ -133,9 +133,11 @@ class TestRuntimeVfQueueNumberKernel(TestCase):
 
     def send_packet2different_queue(self, dts, src, iface, count):
         self.tester.scapy_foreground()
-        for i in range(count):
-            pkt = 'sendp([Ether(dst="%s", src="%s")/IP(src="10.0.0.1",dst="192.168.13.%d")/("test"*10)],iface="%s")' % (
-                dts, src, (i % 254) + 1, iface)
+        for i in range(1,count+1):
+            j = (i//255)%255
+            k = i%255
+            pkt = 'sendp([Ether(dst="%s", src="%s")/IP(src="192.168.%d.%d",dst="192.168.13.%d")/("test"*10)],iface="%s")' % (
+                dts, src, j,k,k, iface)
             self.tester.scapy_append(pkt)
         self.tester.scapy_execute()
 
-- 
2.17.1


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

end of thread, other threads:[~2019-07-03  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02  9:41 [dts] [PATCH V1] update send_pakcet method to disperse pkts to all queues xiao,qimai
2019-07-03  5:36 ` Tu, Lijuan
2019-07-03  7:19 ` Zhang, YanX A

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