[V1] tests/cvl_dcf_switch_filter modify PFCP to adapt scapy2.4.4

Message ID 20201102181532.31329-1-qinx.sun@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/cvl_dcf_switch_filter modify PFCP to adapt scapy2.4.4 |

Commit Message

Sun, QinX Nov. 2, 2020, 6:15 p.m. UTC
  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(-)
  

Comments

Sun, QinX Nov. 3, 2020, 1:52 a.m. UTC | #1
Tested-by: Sun, QinX <qinx.sun@intel.com>

Regards,
Sun Qin

> -----Original Message-----
> From: sunqin <qinx.sun@intel.com>
> Sent: Tuesday, November 3, 2020 2:16 AM
> To: dts@dpdk.org
> Cc: Sun, QinX <qinx.sun@intel.com>
> Subject: [dts] [PATCH V1] tests/cvl_dcf_switch_filter 
> modify PFCP and L2TP format as byte type to adapt scapy2.4.4
  
Tu, Lijuan Nov. 3, 2020, 4:34 a.m. UTC | #2
> modify PFCP and L2TP format as byte type to adapt scapy2.4.4
> 
> Signed-off-by: sunqin <qinx.sun@intel.com>


Applied
  

Patch

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]}}