test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1 1/2] tests/TestSuite_ipfrag: remove dpdk code modification.
@ 2022-02-10  7:44 Weiyuan Li
  2022-02-10  7:44 ` [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: " Weiyuan Li
  0 siblings, 1 reply; 3+ messages in thread
From: Weiyuan Li @ 2022-02-10  7:44 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Weiyuan li

From: Weiyuan li <weiyuanx.li@intel.com>

1.Remove dpdk code modification.
2.Modify port 0 receive packets and transfer to port 1 based the route table,change IPV4 100.10.0.1 to 100.20.0.1 and IPV6 101:101:101:101:101:101:101:101 to 201:101:101:101:101:101:101:101.

Signed-off-by: Weiyuan li <weiyuanx.li@intel.com>
---
 tests/TestSuite_ipfrag.py | 33 ++-------------------------------
 1 file changed, 2 insertions(+), 31 deletions(-)

diff --git a/tests/TestSuite_ipfrag.py b/tests/TestSuite_ipfrag.py
index 71e3e789..8b58bb77 100644
--- a/tests/TestSuite_ipfrag.py
+++ b/tests/TestSuite_ipfrag.py
@@ -45,17 +45,6 @@ from framework.pktgen import PacketGeneratorHelper
 from framework.settings import HEADER_SIZE
 from framework.test_case import TestCase
 
-lpm_table_ipv4 = [
-    "{RTE_IPV4(100,10,0,0), 16, P1}",
-    "{RTE_IPV4(100,20,0,0), 16, P1}",
-    "{RTE_IPV4(100,30,0,0), 16, P0}",
-    "{RTE_IPV4(100,40,0,0), 16, P0}",
-    "{RTE_IPV4(100,50,0,0), 16, P1}",
-    "{RTE_IPV4(100,60,0,0), 16, P1}",
-    "{RTE_IPV4(100,70,0,0), 16, P0}",
-    "{RTE_IPV4(100,80,0,0), 16, P0}",
-]
-
 lpm_table_ipv6 = [
     "{{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, P1}",
     "{{2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, P1}",
@@ -100,24 +89,6 @@ class TestIpfrag(TestCase):
         P0 = self.ports[0]
         P1 = self.ports[1]
 
-        pat = re.compile("P([0123])")
-
-        # Prepare long prefix match table, replace P(x) port pattern
-        lpmStr_ipv4 = "static struct l3fwd_ipv4_route " \
-                      "l3fwd_ipv4_route_array[] = {\\\n"
-        rtLpmTbl = list(lpm_table_ipv4)
-        for idx in range(len(rtLpmTbl)):
-            rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx])
-            lpmStr_ipv4 = lpmStr_ipv4 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n"
-        lpmStr_ipv4 = lpmStr_ipv4 + "};"
-        lpmStr_ipv6 = "static struct l3fwd_ipv6_route l3fwd_ipv6_route_array[] = {\\\n"
-        rtLpmTbl = list(lpm_table_ipv6)
-        for idx in range(len(rtLpmTbl)):
-            rtLpmTbl[idx] = pat.sub(self.portRepl, rtLpmTbl[idx])
-            lpmStr_ipv6 = lpmStr_ipv6 + ' ' * 4 + rtLpmTbl[idx] + ",\\\n"
-        lpmStr_ipv6 = lpmStr_ipv6 + "};"
-        self.dut.send_expect(r"sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv4, "# ")
-        self.dut.send_expect(r"sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\%s' examples/ip_fragmentation/main.c" % lpmStr_ipv6, "# ")
         # make application
         out = self.dut.build_dpdk_apps("examples/ip_fragmentation")
         self.verify("Error" not in out, "compilation error 1")
@@ -172,7 +143,7 @@ class TestIpfrag(TestCase):
                 pkt_size = pkt_sizes[pkt_sizes.index(size) + times]
                 pkt = Packet(pkt_type='UDP', pkt_len=pkt_size)
                 pkt.config_layer('ether', {'dst': '%s' % self.dmac})
-                pkt.config_layer('ipv4', {'dst': '100.10.0.1', 'src': '1.2.3.4', 'flags': val})
+                pkt.config_layer('ipv4', {'dst': '100.20.0.1', 'src': '1.2.3.4', 'flags': val})
                 pkt.send_pkt(self.tester, tx_port=self.txItf)
 
             # verify normal packet just by number, verify fragment packet by all elements
@@ -221,7 +192,7 @@ class TestIpfrag(TestCase):
                 pkt_size = pkt_sizes[pkt_sizes.index(size) + times]
                 pkt = Packet(pkt_type='IPv6_UDP', pkt_len=pkt_size)
                 pkt.config_layer('ether', {'dst': '%s' % self.dmac})
-                pkt.config_layer('ipv6', {'dst': '101:101:101:101:101:101:101:101', 'src': 'ee80:ee80:ee80:ee80:ee80:ee80:ee80:ee80'})
+                pkt.config_layer('ipv6', {'dst': '201:101:101:101:101:101:101:101', 'src': 'ee80:ee80:ee80:ee80:ee80:ee80:ee80:ee80'})
                 pkt.send_pkt(self.tester, tx_port=self.txItf)
 
             # verify normal packet just by number, verify fragment packet by all elements
-- 
2.17.1


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

* [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: remove dpdk code modification.
  2022-02-10  7:44 [dts][PATCH V1 1/2] tests/TestSuite_ipfrag: remove dpdk code modification Weiyuan Li
@ 2022-02-10  7:44 ` Weiyuan Li
  2022-02-11  3:12   ` Tu, Lijuan
  0 siblings, 1 reply; 3+ messages in thread
From: Weiyuan Li @ 2022-02-10  7:44 UTC (permalink / raw)
  To: dts, lijuan.tu; +Cc: Weiyuan li

From: Weiyuan li <weiyuanx.li@intel.com>

Sync modify the test plan remove dpdk code modification.

Signed-off-by: Weiyuan li <weiyuanx.li@intel.com>
---
 test_plans/ipfrag_test_plan.rst | 26 +-------------------------
 1 file changed, 1 insertion(+), 25 deletions(-)

diff --git a/test_plans/ipfrag_test_plan.rst b/test_plans/ipfrag_test_plan.rst
index 2178b4db..68cf01ca 100644
--- a/test_plans/ipfrag_test_plan.rst
+++ b/test_plans/ipfrag_test_plan.rst
@@ -133,31 +133,7 @@ Prerequisites
      - The set of logical cores to execute the packet forwarding task
      - Mapping of the NIC RX queues to logical cores handling them.
 
-6. Set lpm table for IPv4 & IPv6 packet::
-
-    sed -i '/l3fwd_ipv4_route_array\[\].*{/,/^\}\;/c\\static struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {\
-    {RTE_IPV4(100,10,0,0), 16, 1},\
-    {RTE_IPV4(100,20,0,0), 16, 1},\
-    {RTE_IPV4(100,30,0,0), 16, 0},\
-    {RTE_IPV4(100,40,0,0), 16, 0},\
-    {RTE_IPV4(100,50,0,0), 16, 1},\
-    {RTE_IPV4(100,60,0,0), 16, 1},\
-    {RTE_IPV4(100,70,0,0), 16, 0},\
-    {RTE_IPV4(100,80,0,0), 16, 0},\
-    };' examples/ip_fragmentation/main.c
-
-    sed -i '/l3fwd_ipv6_route_array\[\].*{/,/^\}\;/c\\static struct l3fwd_ipv6_route l3fwd_ipv6_route_array[] = {\
-    {{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\
-    {{2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\
-    {{3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\
-    {{4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\
-    {{5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\
-    {{6,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 1},\
-    {{7,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\
-    {{8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, 48, 0},\
-    };' examples/ip_fragmentation/main.c
-
-And re-compile examples/ip_fragmentation::
+6. Compile examples/ip_fragmentation::
 
     meson configure -Dexamples=ip_fragmentation x86_64-native-linuxapp-gcc
     ninja -C x86_64-native-linuxapp-gcc
-- 
2.17.1


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

* RE: [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: remove dpdk code modification.
  2022-02-10  7:44 ` [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: " Weiyuan Li
@ 2022-02-11  3:12   ` Tu, Lijuan
  0 siblings, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2022-02-11  3:12 UTC (permalink / raw)
  To: Li, WeiyuanX, dts

> -----Original Message-----
> From: Li, WeiyuanX <weiyuanx.li@intel.com>
> Sent: 2022年2月10日 15:44
> To: dts@dpdk.org; Tu, Lijuan <lijuan.tu@intel.com>
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: remove dpdk code
> modification.
> 
> From: Weiyuan li <weiyuanx.li@intel.com>
> 
> Sync modify the test plan remove dpdk code modification.
> 
> Signed-off-by: Weiyuan li <weiyuanx.li@intel.com>

Series applied, thanks

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

end of thread, other threads:[~2022-02-11  3:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-10  7:44 [dts][PATCH V1 1/2] tests/TestSuite_ipfrag: remove dpdk code modification Weiyuan Li
2022-02-10  7:44 ` [dts][PATCH V1 2/2] test_plans/ipfrag_test_plan: " Weiyuan Li
2022-02-11  3:12   ` Tu, Lijuan

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