test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/cvl_dcf_switch_filter modify PFCP to adapt scapy2.4.4
@ 2020-11-02 18:15 sunqin
  2020-11-03  1:52 ` Sun, QinX
  2020-11-03  4:34 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: sunqin @ 2020-11-02 18:15 UTC (permalink / raw)
  To: dts; +Cc: sunqin

modify PFCP and L2TP format as byte type to adapt scapy2.4.4

Signed-off-by: sunqin <qinx.sun@intel.com>
---
 tests/TestSuite_cvl_dcf_switch_filter.py | 64 ++++++++++++------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py
index 245e9df..3a304f1 100644
--- a/tests/TestSuite_cvl_dcf_switch_filter.py
+++ b/tests/TestSuite_cvl_dcf_switch_filter.py
@@ -531,13 +531,13 @@ tv_vlan_filter = {
 tv_mac_ipv4_l2tpv3 = {
     "name":"tv_mac_ipv4_l2tpv3",
     "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end",
-    "matched":{"scapy_str":["Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\\x00\\x00\\x00\\x01')/('X'*480)"],
+    "matched":{"scapy_str":["Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":1}},
-    "mismatched":{"scapy_str":["Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\\x00\\x00\\x00\\x02')/('X'*480)",
-                               "Ether(dst='00:11:22:33:44:12')/IP(src='192.168.1.2', proto=115)/L2TP('\\x00\\x00\\x00\\x01')/('X'*480)",
-                               "Ether(dst='00:11:22:33:44:12')/IP(dst='192.168.0.2', proto=115)/L2TP('\\x00\\x00\\x00\\x01')/('X'*480)"],
+    "mismatched":{"scapy_str":["Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x02')/('X'*480)",
+                               "Ether(dst='00:11:22:33:44:12')/IP(src='192.168.1.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)",
+                               "Ether(dst='00:11:22:33:44:12')/IP(dst='192.168.0.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -546,13 +546,13 @@ tv_mac_ipv4_l2tpv3 = {
 tv_mac_ipv6_l2tpv3 = {
     "name":"tv_mac_ipv6_l2tpv3",
     "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / l2tpv3oip session_id is 1 / end actions vf id 1 / end",
-    "matched":{"scapy_str":["Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\\x00\\x00\\x00\\x01')/('X'*480)"],
+    "matched":{"scapy_str":["Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":1}},
-    "mismatched":{"scapy_str":["Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\\x00\\x00\\x00\\x02')/('X'*480)",
-                               "Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:9999', nh=115)/L2TP('\\x00\\x00\\x00\\x01')/('X'*480)",
-                               "Ether(dst='00:11:22:33:44:13')/IPv6(src='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\\x00\\x00\\x00\\x01')/('X'*480)"],
+    "mismatched":{"scapy_str":["Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP(b'\\x00\\x00\\x00\\x02')/('X'*480)",
+                               "Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:9999', nh=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)",
+                               "Ether(dst='00:11:22:33:44:13')/IPv6(src='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -749,13 +749,13 @@ tv_max_rule_number = {
 tv_mac_ipv4_pfcp_node = {
     "name":"tv_mac_ipv4_pfcp_node",
     "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end",
-    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0)'],
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)'],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":1}},
-    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -764,13 +764,13 @@ tv_mac_ipv4_pfcp_node = {
 tv_mac_ipv4_pfcp_session = {
     "name":"tv_mac_ipv4_pfcp_session",
     "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 1 / end",
-    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)'],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":1}},
-    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -779,13 +779,13 @@ tv_mac_ipv4_pfcp_session = {
 tv_mac_ipv6_pfcp_node = {
     "name":"tv_mac_ipv6_pfcp_node",
     "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 / end actions vf id 1 / end",
-    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0)'],
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)'],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":1}},
-    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -794,13 +794,13 @@ tv_mac_ipv6_pfcp_node = {
 tv_mac_ipv6_pfcp_session = {
     "name":"tv_mac_ipv6_pfcp_session",
     "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end",
-    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":1}},
-    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0)'],
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)'],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -810,13 +810,13 @@ tv_add_two_rules_with_different_input_set_same_vf_id = {
     "name":"tv_add_two_rules_with_different_input_set_same_vf_id",
     "rte_flow_pattern":["flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end",
                         "flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 1 / end"],
-    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0)',
-                            'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',
+                            'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)'],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":1, "expect_queues":"null"}},
                "expect_results":{"expect_pkts":2}},
-    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":1, "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":0}}
@@ -826,13 +826,13 @@ tv_add_two_rules_with_different_input_set_different_vf_id = {
     "name":"tv_add_two_rules_with_different_input_set_different_vf_id",
     "rte_flow_pattern":["flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end",
                         "flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 2 / end"],
-    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0)',
-                            'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',
+                            'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)'],
                "check_func":{"func":rfc.check_vf_rx_packets_number,
                              "param":{"expect_port":[1, 2], "expect_queues":"null"}},
                "expect_results":{"expect_pkts":[1, 1]}},
-    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0)',
-                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1)'],
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)',
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],
                   "check_func":{"func":rfc.check_vf_rx_packets_number,
                                 "param":{"expect_port":[1, 2], "expect_queues":"null"}},
                   "expect_results":{"expect_pkts":[0, 0]}}
-- 
2.17.1


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

end of thread, other threads:[~2020-11-03  4:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 18:15 [dts] [PATCH V1] tests/cvl_dcf_switch_filter modify PFCP to adapt scapy2.4.4 sunqin
2020-11-03  1:52 ` Sun, QinX
2020-11-03  4:34 ` 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).