From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BEDDBA04E7; Mon, 2 Nov 2020 10:37:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4DBDFBE47; Mon, 2 Nov 2020 10:37:46 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 27A3CBBBA for ; Mon, 2 Nov 2020 10:37:43 +0100 (CET) IronPort-SDR: ANRU2Yx+WqpYMZ3lbCEzfZgI/Bzl9ABY8Z2q8sRV1JjTkvwBez8qUzrx2cmubSGGuFRFYWsyZ+ XaUsRdC1B0TA== X-IronPort-AV: E=McAfee;i="6000,8403,9792"; a="148141105" X-IronPort-AV: E=Sophos;i="5.77,444,1596524400"; d="scan'208";a="148141105" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 01:37:35 -0800 IronPort-SDR: q4aG67IWvxBr7sLoLVqVuAdJpkxB1ofC/vVzF/wWDnzjcgnV7zAd/i5ipV+CAYoHRZEmGW+mjS ECvWN42OcXPw== X-IronPort-AV: E=Sophos;i="5.77,444,1596524400"; d="scan'208";a="305389238" Received: from unknown (HELO localhost.localdomain) ([10.240.183.105]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 01:37:28 -0800 From: sunqin To: dts@dpdk.org Cc: sunqin Date: Mon, 2 Nov 2020 18:15:32 +0000 Message-Id: <20201102181532.31329-1-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/cvl_dcf_switch_filter modify PFCP to adapt scapy2.4.4 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" modify PFCP and L2TP format as byte type to adapt scapy2.4.4 Signed-off-by: sunqin --- 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