From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id ACC852B9C for ; Wed, 4 Jan 2017 04:40:53 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 03 Jan 2017 19:40:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="1089614590" Received: from unknown (HELO dpdk-fedora20.icx.intel.com) ([10.240.176.135]) by fmsmga001.fm.intel.com with ESMTP; 03 Jan 2017 19:40:52 -0800 From: yufengmx To: dts@dpdk.org Cc: yufengmx Date: Wed, 4 Jan 2017 11:41:56 +0800 Message-Id: <1483501316-25374-2-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1483501316-25374-1-git-send-email-yufengx.mo@intel.com> References: <1483501316-25374-1-git-send-email-yufengx.mo@intel.com> Subject: [dts] [PATCH V1]Ipgre: upload automation testing script 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: , X-List-Received-Date: Wed, 04 Jan 2017 03:40:54 -0000 *. change checksum offload ip local increase to none increase *. change testpmd output message check string format Signed-off-by: yufengmx --- tests/TestSuite_ipgre.py | 61 ++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 31 deletions(-) diff --git a/tests/TestSuite_ipgre.py b/tests/TestSuite_ipgre.py index c79b4ad..520a974 100644 --- a/tests/TestSuite_ipgre.py +++ b/tests/TestSuite_ipgre.py @@ -47,7 +47,6 @@ import os from packet import Packet, sniff_packets, load_sniff_packets, NVGRE, IPPROTO_NVGRE from scapy.utils import wrpcap, rdpcap -from packet import IncreaseIP from scapy.packet import split_layers,bind_layers from scapy.layers.inet import Ether, IP, TCP, UDP from scapy.layers.sctp import SCTP @@ -177,12 +176,12 @@ class TestIpgre(TestCase): Send packet as table listed and packet type match each layer """ pkt_types = { - "MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP"], - "MAC_IP_GRE_IPv4-TUNNEL_TCP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: TCP"], - "MAC_IP_GRE_IPv4-TUNNEL_SCTP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: SCTP"], - "MAC_VLAN_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP"], - "MAC_VLAN_IP_GRE_IPv4-TUNNEL_TCP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: TCP"], - "MAC_VLAN_IP_GRE_IPv4-TUNNEL_SCTP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: SCTP"] + "MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP"], + "MAC_IP_GRE_IPv4-TUNNEL_TCP_PKT": ["TUNNEL_GRENAT", "INNER_L4_TCP"], + "MAC_IP_GRE_IPv4-TUNNEL_SCTP_PKT": ["TUNNEL_GRENAT", "INNER_L4_SCTP"], + "MAC_VLAN_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP"], + "MAC_VLAN_IP_GRE_IPv4-TUNNEL_TCP_PKT": ["TUNNEL_GRENAT", "INNER_L4_TCP"], + "MAC_VLAN_IP_GRE_IPv4-TUNNEL_SCTP_PKT": ["TUNNEL_GRENAT", "INNER_L4_SCTP"] } config_layers = {'ether': {'src': self.outer_mac_src}, 'ipv4': {'proto': 'gre'}} @@ -205,24 +204,24 @@ class TestIpgre(TestCase): Send packet as table listed and packet type match each layer """ pkt_types_ipv6_ip = { - "MAC_IPv6_GRE_IPv4-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP"], - "MAC_IPv6_GRE_IPv4-TUNNEL_TCP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: TCP"], - "MAC_IPv6_GRE_IPv4-TUNNEL_SCTP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: SCTP"], - "MAC_VLAN_IPv6_GRE_IPv4-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP", "PKT_RX_VLAN_PKT"], - "MAC_VLAN_IPv6_GRE_IPv4-TUNNEL_TCP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: TCP", "PKT_RX_VLAN_PKT"], - "MAC_VLAN_IPv6_GRE_IPv4-TUNNEL_SCTP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: SCTP", "PKT_RX_VLAN_PKT"] + "MAC_IPv6_GRE_IPv4-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP"], + "MAC_IPv6_GRE_IPv4-TUNNEL_TCP_PKT": ["TUNNEL_GRENAT", "INNER_L4_TCP"], + "MAC_IPv6_GRE_IPv4-TUNNEL_SCTP_PKT": ["TUNNEL_GRENAT", "INNER_L4_SCTP"], + "MAC_VLAN_IPv6_GRE_IPv4-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP", "PKT_RX_VLAN_PKT"], + "MAC_VLAN_IPv6_GRE_IPv4-TUNNEL_TCP_PKT": ["TUNNEL_GRENAT", "INNER_L4_TCP", "PKT_RX_VLAN_PKT"], + "MAC_VLAN_IPv6_GRE_IPv4-TUNNEL_SCTP_PKT": ["TUNNEL_GRENAT", "INNER_L4_SCTP", "PKT_RX_VLAN_PKT"] } pkt_types_ipv6_ipv6 = { - "MAC_IPv6_GRE_IPv6-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP"], - "MAC_IPv6_GRE_IPv6-TUNNEL_TCP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: TCP"], - "MAC_VLAN_IPv6_GRE_IPv6-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP", "PKT_RX_VLAN_PKT"], - "MAC_VLAN_IPv6_GRE_IPv6-TUNNEL_TCP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: TCP", "PKT_RX_VLAN_PKT"] + "MAC_IPv6_GRE_IPv6-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP"], + "MAC_IPv6_GRE_IPv6-TUNNEL_TCP_PKT": ["TUNNEL_GRENAT", "INNER_L4_TCP"], + "MAC_VLAN_IPv6_GRE_IPv6-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP", "PKT_RX_VLAN_PKT"], + "MAC_VLAN_IPv6_GRE_IPv6-TUNNEL_TCP_PKT": ["TUNNEL_GRENAT", "INNER_L4_TCP", "PKT_RX_VLAN_PKT"] } pkt_types_ipv6_ipv6_SCTP = { - "MAC_IPv6_GRE_IPv6-TUNNEL_SCTP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: SCTP"], - "MAC_VLAN_IPv6_GRE_IPv6-TUNNEL_SCTP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: SCTP", "PKT_RX_VLAN_PKT"] + "MAC_IPv6_GRE_IPv6-TUNNEL_SCTP_PKT": ["TUNNEL_GRENAT", "INNER_L4_SCTP"], + "MAC_VLAN_IPv6_GRE_IPv6-TUNNEL_SCTP_PKT": ["TUNNEL_GRENAT", "INNER_L4_SCTP", "PKT_RX_VLAN_PKT"] } # Start testpmd and enable rxonly forwarding mode @@ -277,7 +276,7 @@ class TestIpgre(TestCase): self.dut.send_expect( cmd, "testpmd>") # Send packet inner ip address matched and check packet recevied by queue 3 - pkt_types = {"MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP"]} + pkt_types = {"MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP"]} config_layers = {'ether': {'src': self.outer_mac_src}, 'ipv4': {'dst': "0.0.0.0", 'proto': 'gre'}} self.check_packet_transmission(pkt_types, config_layers) @@ -291,7 +290,7 @@ class TestIpgre(TestCase): self.dut.send_expect( cmd, "testpmd>") # Send packet outer ip address matched and check packet recevied by queue 3. - pkt_types = {"MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["Tunnel type: GRENAT", "Inner L4 type: UDP"]} + pkt_types = {"MAC_IP_GRE_IPv4-TUNNEL_UDP_PKT": ["TUNNEL_GRENAT", "INNER_L4_UDP"]} config_layers = {'ether': {'src': self.outer_mac_src}, 'ipv4': {'dst': "0.0.0.0", 'proto': 'gre'}} self.check_packet_transmission(pkt_types, config_layers) @@ -325,9 +324,9 @@ class TestIpgre(TestCase): config_layers = {'ether': {'src': self.outer_mac_src, 'dst': self.outer_mac_dst}, 'ipv4': {'proto': 'gre', - 'src': IncreaseIP(self.outer_ip_src), + 'src': self.outer_ip_src, 'dst': self.outer_ip_dst}, - 'inner_ipv4':{'src':IncreaseIP(self.inner_ip_src), + 'inner_ipv4':{'src':self.inner_ip_src, 'dst':self.inner_ip_dst}} self.save_ref_packet(pkt_types, config_layers) config_layers = {'ether': {'src': self.outer_mac_src, @@ -346,9 +345,9 @@ class TestIpgre(TestCase): config_layers = {'ether': {'src': self.outer_mac_src, 'dst': self.outer_mac_dst}, 'ipv4': {'proto': 'gre', - 'src': IncreaseIP(self.outer_ip_src), + 'src': self.outer_ip_src, 'dst': self.outer_ip_dst}, - 'inner_ipv4':{'src':IncreaseIP(self.inner_ip_src), + 'inner_ipv4':{'src':self.inner_ip_src, 'dst':self.inner_ip_dst}} self.save_ref_packet(pkt_types, config_layers) config_layers = {'ether': {'src': self.outer_mac_src, @@ -367,9 +366,9 @@ class TestIpgre(TestCase): config_layers = {'ether': {'src': self.outer_mac_src, 'dst': self.outer_mac_dst}, 'ipv4': {'proto': 'gre', - 'src': IncreaseIP(self.outer_ip_src), + 'src': self.outer_ip_src, 'dst': self.outer_ip_dst}, - 'inner_ipv4':{'src':IncreaseIP(self.inner_ip_src), + 'inner_ipv4':{'src':self.inner_ip_src, 'dst':self.inner_ip_dst}, 'tcp': {'src': 53, 'dst': 53}} @@ -390,9 +389,9 @@ class TestIpgre(TestCase): config_layers = {'ether': {'src': self.outer_mac_src, 'dst': self.outer_mac_dst}, 'ipv4': {'proto': 'gre', - 'src': IncreaseIP(self.outer_ip_src), + 'src': self.outer_ip_src, 'dst': self.outer_ip_dst}, - 'inner_ipv4':{'src':IncreaseIP(self.inner_ip_src), + 'inner_ipv4':{'src':self.inner_ip_src, 'dst':self.inner_ip_dst}} self.save_ref_packet(pkt_types, config_layers) config_layers = {'ether': {'src': self.outer_mac_src, @@ -411,9 +410,9 @@ class TestIpgre(TestCase): config_layers = {'ether': {'src': self.outer_mac_src, 'dst': self.outer_mac_dst}, 'ipv4': {'proto': 'gre', - 'src': IncreaseIP(self.outer_ip_src), + 'src': self.outer_ip_src, 'dst': self.outer_ip_dst}, - 'inner_ipv4':{'src':IncreaseIP(self.inner_ip_src), + 'inner_ipv4':{'src':self.inner_ip_src, 'dst':self.inner_ip_dst}, 'sctp': {'src': 53, 'dst': 53}} -- 1.9.3