From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by dpdk.org (Postfix) with ESMTP id 00250567F for ; Mon, 10 Apr 2017 19:10:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Ip75/qtOCP06b6h9CMdDwQaYulueHHvlqfLYUjsUTUM=; b=AdcQz71mXpbz4gxALkYoykGPRyR846MjZtrbDeGYy7YfoDFR16zmWEQEu45t9HH40nla1sfntz7XHHaHVyr7+jSOXeoycUSgTVwvcs1Cuqcbx3FHEwiGNwcD4WUo5KyfQvlw033vVRh4aiU4jt767upr/Ju7pCAMNrwwGXIwGGI= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from angela-H81M-S1.semihalf.local (31.172.191.173) by DM2PR0701MB812.namprd07.prod.outlook.com (10.242.127.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Mon, 10 Apr 2017 17:10:00 +0000 From: Angela Czubak To: dts@dpdk.org Cc: Angela Czubak Date: Mon, 10 Apr 2017 19:09:18 +0200 Message-Id: <1491844162-16300-25-git-send-email-aczubak@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491844162-16300-1-git-send-email-aczubak@caviumnetworks.com> References: <1491501092-14278-1-git-send-email-aczubak@caviumnetworks.com> <1491844162-16300-1-git-send-email-aczubak@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: DB6PR05CA0010.eurprd05.prod.outlook.com (10.170.218.23) To DM2PR0701MB812.namprd07.prod.outlook.com (10.242.127.26) X-MS-Office365-Filtering-Correlation-Id: dc5abc0e-abb2-483f-3345-08d480346c86 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DM2PR0701MB812; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB812; 3:gOzOFA7BVjaQhDYAU8DWQwlPOEmaJXgzINZ0JEkr5cPfvSc2igjUHiMAgSdilTpnxPHTCqWYoWHHErkx6Avtoo59wAzfTFrrvYBupZQYNFhGP8zstfHZxQ5BBm9OSrGWeKW9iALhbV3f5BJNH4y1Fn62YPywg8lXO2DGbsfH5rFlcfok6wr0uNinMEnUdVHLOoAYM+VISbYmoCXzUbFduqfrLqfvOGMCvwsUHSXDpnerBiEt/LcohAJfYIl46sLzhW8oKRIcswKCL8xIheX1cnqjqK58fG4TIPoWygMt1r1TxDGRmIU5O5pzz2THjy9i+1ZYPlAZ4KX7AF6YEc1zXw==; 25:4CPH4GYAh0a1fv0gOL6yBMQmcEY5U9Ol6dEgl6u6S52i8Bvs3LMH19YQOo7WMtzDxTz4eI+EQU61KZzeyKLRk3kEC7/s2z6iOhkXkZ2Ryk1JqOdT5b7J3tDLguq3l9aA0Zvt3msGrlE6bgsgjHTuZbbtv/AG1h+s5jHFEN9uZVjfvu9aPKiwkoigMAOba6w3R4NtREyZDt1lelWFGZHK9mo6l2QVUTQSVCmsfeZWfPnj4Xx2D6sYmhLc50jTGVL9slqjoy2U18II/AXzkI+i3oBobw6VQ4dsfM7JbFDed+jVbtxRbm4p5hQykf1CQerslILuwQ6rbOmJ76NQh95wYnlYyzv6L/2F2CSZZfXf/MUP9ZBNM5rKqLiwRWeJYnaUmDHx1X/K1IjCGrNyHjnxqNujWb3F9ya5FoDa6v/l82tu9p7sE8wV/Qq1dMlN7Omt86TAJB74pylOxUoh3EDILA== X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB812; 31:+3oYev7CVUNI2qt3+Rm60SqMnnwQx3UYnrkqqko+soexeV0zb04lDDGtVDVW2ng2l9KGrZgUswdPTPhaWXqbZQTVuS4xY+OpPTD76wfIEvx2OICTOs9tGw3vAoN6hW7egZAa30Z8Lo5JMU9P+mUylkVBp2qezW7JGSnowV2DtoZPoah1tAyz0sRB0TjXzVbVi/daQ8vAo7O5u5PjXhZ5avpHJhqseOneph1smOOJT6NLmd3HOWzCztDExiSkW6Ih; 20:pON+TKhuFk9qXVC40b62K/ARBwBTSu0DFS1RoUY0gz5OysomY6VU6FRcAXNr5XT00WoFTpQu9Ph4gPklBxfsdAAXlNlFb+zrvmmlvNt6+8bcqFa0m04qn6FsocQoWtyHKxMSVD39fjRdTtux8R1DXHxwJGsRQvTTp4JnEGBNNmhaiK45q4hGf+wEjyZhTvd2RONMdDKH4VoR9mc1ZDldn4YWFO1J4BitMmyHufT/rnOjgV1YGBfQT+yKCFxGQmjxwF19ZvDGbmUwTPrSZhxheevQAv2GF136cJH9KMC9KJM5wAFZ+nzN38X0aMTZtaomfodnJoKrSFUewCh9JS5KXTqxALYIwczpbMx6Hrp4gzZfPKWJXxORrSaB8L5+GTQ2P1oXlffVNzWMNd0jrxQN6coY5pyQne9ixLfTXwts25zMBGLjqbN5xIWoR0GNVFx9zYbO5IAvLBb1+LDOUOqMPh4ZLAEOT4T5IgS7YX5sAfSp06erhjIyJoZoqPcq534+9ficsAJcm46apDID+PtiM4cag1FgvrDPaJzdtHw+Odj/Sjp2Glj1AnoYweH88jfmgCRAx8kPOkkW6MCubXrSEHTTnEIVQ+3PvsTLIjaRyfA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(278428928389397); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148); SRVR:DM2PR0701MB812; BCL:0; PCL:0; RULEID:; SRVR:DM2PR0701MB812; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB812; 4:N5bTRlXTVDI5lWOJjig10UGzrZxNySzASSv8es+iZOZ5G3HYIZhVG+vs4mOjOz71G7G9HMvLdvlOjXoAVRM1PDjER3G9+JvbzNUgMZLU2I+32lb+nIZLY+pzDNbyVak8ZXUEb7LBbH+UDM8vEcivsNzKpUv2qtc9cAZ4V2Ab/AR0EWLRynRu4sbe/Z3MlYR8BGXZj10K7+l2MiCtlJ7PNpqDyLKm+VApyHneZ9kTZj03XwOpqJiv4WkzAD0X1FVwgBp6JXoxgN7UqpuBZzlVm2HSBffIA4MKz2KOgpkXDwlZcxjNlXvgXCsmo1avIG0X2GxhFfCCKvE+Q/q39RdWv00xNVSntK5ehnMwP2yz6Kj3XvR/0atzjpAecskk7dIF/hZ4jt5Op7sUfDnHc/zASorxpjpymJ9PIDgS4PyHo+4jvVyweC0xReuNHosjI99Oex0pwN0yJ4AK4Em3vPjciOQf+qqAU4Xw/Lfgz5Mc5+hIez6EYkn9igF+mtBsoBD2Y8MrfqwGvzPNnFsSO9rOKDPWc48F1UkNSrBcnBaifIemyR90pPup9yf9GdiAB/BnbCpXTbcPg9/S4AbV1l1pp1uCo8KgBU/Tnk2mgRV3wWF2R7E7ZxW6R6RvcmTmx/qG+d658es0ZD/nWm+W2FkpteEnKPzo6BJS1dfBXe7eAfh8AHpe8kEFs3Pm8QG14fVxpvNLcyxp7h57ODZJ2jmXpjw34n66OOHIMt/bmCQcmQR4F15bU9VSpqcQKnNDRsN1 X-Forefront-PRVS: 027367F73D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39850400002)(39840400002)(39410400002)(39450400003)(39400400002)(8676002)(81166006)(2950100002)(15650500001)(305945005)(6512007)(7736002)(42882006)(6916009)(50226002)(48376002)(47776003)(6506006)(2906002)(53936002)(66066001)(6666003)(189998001)(6116002)(110136004)(33646002)(36756003)(38730400002)(107886003)(2361001)(5003940100001)(575784001)(4326008)(3846002)(2351001)(5660300001)(6486002)(50466002)(50986999)(76176999)(42186005)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR0701MB812; H:angela-H81M-S1.semihalf.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR0701MB812; 23:Ho2lKTOk/wRbe1l35AgHvsNuPcfFxbLIds2Bhv0Z?= =?us-ascii?Q?dPCQFRodiVttZF9uwNvMEBeZSQa9TYgBcO5OViXI7oOO0w7u0tBxOH2GWkWs?= =?us-ascii?Q?nqPuK8F98GUzKDyJ7Rt2P1tI3xEBTRnUzARfKC7JyAfCarDo8gOfWd+JCn2W?= =?us-ascii?Q?zQkjo2hijmkHFo2pM/Vq82wcLu3Q0P/Kc+TRWwQH46yMnXwjx2rYFX+TFtVs?= =?us-ascii?Q?WtpxQOVFhdWPCIQjkj8UIXbZaiwflZyKWn5d16hGrTBHgu8nolJj85Jrz0n5?= =?us-ascii?Q?eKFYpzkP7DdJRD24EFo2HA4rRKV5vveOE6x2DspToiMfVYlPGyGA3RrLvRFK?= =?us-ascii?Q?uQwdWaG1lf7Dr2CBXShufhOSuFiVc+aJ4f69MGBHaAEhNR24JmozNlYj3pOX?= =?us-ascii?Q?KButKLkUhqOXbpwAUjx9MxYfdBszuf8jusV9Q/yfkpOf6J3OjHlq+6jEnSHE?= =?us-ascii?Q?5834r1L95VCtWD3mVjGPbyJAJVd55jRV0hWsKLeye9UyDePv5fKiGw7ArVrk?= =?us-ascii?Q?cfz70sMZ0dClaU3WGuphtP06RbjxxAKQ9k6a9rNLt+wUNrS5wj9U2T0FF+/q?= =?us-ascii?Q?h/Gv/KuiT0e/PEiTXu9Y9jGt6wKZcujkQ0Aos4vzlDsgXp30Gz6/i+od9CqY?= =?us-ascii?Q?wI7I2jrV0D+o1bsOX/wP9NUHcDxMM5ZvHwJk1TuNOcvbxntWWQsIfz8989Qd?= =?us-ascii?Q?JDjmg7zei23mk20YH1xTn2bsYeRYvUC3ev8R95KV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j2f1OM46ktdI1BKoy9yJ3FrcQBa2Ov4Sd5+oxsn4BI0qP86mRLJSVKDTI66aCfNBKeN7URZtiACTNEHHimfeX5c/LsVzw==; 24:UMf4qivDYfmtngNPu9ONGeTxMODtddPwHQZz+BZgU2GxW8wjW31XMKNa6LrDJQQLly0HhAtxc6aorwGuWxl503a7B2eHlwJskTGc/rV+rJY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR0701MB812; 7:XZkhTpLMYP3Vt6uxtcy2HVkKja84wYCQR6ossvD5B8xqYV+DoOTwdbe0M+CEWITpIMwHnJ2ckFwf6yL/Sjrfle86zPc3l+KRhdQqOsKyUJ95rSE3IWVq3ANbxfuMyasrFRCvypiFSlsBHMmhdr6O49GY4yHKVf7210GXEZbJHP9+kiDa1hEliOxZImOWgkQ86/p0k7+5QHcBvz+ZNSna7uzK8FeySI77n1m0NvC5j4u0Ypc6oeKn1HDxmh77m7KwJEBoItG8fAmsFz5BRHmg/zHlqruCYX/8D6zTr3ttQFVioOAE8L3D0sVNoLqDKEnZLN8xsX0sulV833LPrN1hWw== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Apr 2017 17:10:00.7377 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0701MB812 Subject: [dts] [PATCH v2 24/28] tests: uni_pkt - taking into account cavium NICs 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: Mon, 10 Apr 2017 17:10:05 -0000 Enabling following uni_pkt test cases by modifying conf/dpdk_support_test_case.xls: - NVGRE_tunnel - NVGRE_in_IPv6_tunnel - NVGRE_tunnel Testpmd must be run with hardware VLAN filter disabled as thunder driver does not support this feature - --disable-hw-vlan-filter is appended if NIC is Cavium device. What is more, Cavium has hardware packet type detection only for L3 and L4, therefore L2 is never checked and inner layers are skipped as well. Signed-off-by: Angela Czubak --- conf/dpdk_support_test_case.xls | Bin 25600 -> 8704 bytes tests/TestSuite_uni_pkt.py | 219 +++++++++++++++++++++++++++------------- 2 files changed, 147 insertions(+), 72 deletions(-) diff --git a/conf/dpdk_support_test_case.xls b/conf/dpdk_support_test_case.xls index 8f38c84ce8ff3338394944fa67c478d711ebe56a..2d8a342baf869d782921ad32e5c11cfa46f06a48 100644 GIT binary patch literal 8704 zcmeHMU2IfE6h3$VdJB}@@~0LdHz@xrwiE$_Ncp!3lnMwhBxSq3g@x_zX1lFmG%gBn zkYIT5g+xhs(3pTmgAbZmUW^YI4GD=DABrLVL?0HTQ4*kj-^{(;yGt8(kr=^FduHaG znfd0-Id{&?-TU=d^@FEAXt*L}X@&UZ)=;g4JaPl|i7p=z8IL+;w}ys>TrsL+={~Z+ zO-ENh92fuvLG*bI$OP4b#)0T#Qk_!|JLP?})G<{@u)tPH<1Z(ctd|tZtQ>@AD^Jt# z#CTyV8R?A|mGr+;pRxIi7PynG*zUD|t%*P$3d$#S7r5os-oGL~c|UL-xybjRU6NsJ zSQ|^mt$!=6Q98s7>M(#qW~C9rS>wa0bQ1YQIjdSeRryMpgkDH3Vl7t{L$3H+&`;!; z%4ey3B634MR%5}EbYd?gq)8g&3p5SAs(PRnG*+t? z_PU3ynA?jyGcZ9;GYW6CQ+76%9F!@T`?UNqWTAA^fJHe~SMuL0lhZCE^&d@6)RFo> zxboAmsm0|v$+h!BZHGd+eEul%=qU09qsVJVlm}hEd;ELChaH)hA(oN6UzPRwkSZtT z1FD>yuTkZcd=O=wOy!B*md^IXlGftgY8xEER{G1?_}li{cCLw%aXjS_3Y26qB}di0 z&yh4AML00Y<3X9VCF-hKSd%pq`|)k@&*uk$78*=m5TM)K;E(qux+ht zaf`{tvU}_t+IK#0we|IM+F2MNp6=vE%LpYL^hGTP0-PsNTK87#IrK7_reFcbTl?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m00a^=-4m)0+ub^Z~||J#1_bfemaVi>i}F2;JU!$INfysJ%696%7a|;dkKJclUjA&d+s$1vt6Q zn}6Gjf0~PbS&M%di&Jy{&j1_W%WyX1Y{9u4=L(!Faq@X9zE|U1gL5s;Hk|8lV%M>H z{t@ypU-kIOHE;)B7U262Hr`g_pNHTZYLy)GC8lMl+z0$yCpcnqr+RgQuOPDSd>Lv`$wW%wolTv) s_}U8oY(s26%j7&aapG5G|z@g30->_4UjDwAjPPf-6=WSrywzkQe=82|tP diff --git a/tests/TestSuite_uni_pkt.py b/tests/TestSuite_uni_pkt.py index 6975f2d..882b758 100644 --- a/tests/TestSuite_uni_pkt.py +++ b/tests/TestSuite_uni_pkt.py @@ -46,9 +46,19 @@ user applications import utils from test_case import TestCase from exception import VerifyFailure -from packet import Packet import time +# so as to bind GRE for GRE testing +from scapy.packet import * +from scapy.fields import * +from scapy.layers.inet import UDP,IP +from scapy.layers.inet6 import IPv6 +from scapy.layers.l2 import Ether +from scapy.layers.l2 import GRE +IPPROTO_GRE=47 + +# to override the one from scapy +from packet import Packet class TestUniPacket(TestCase): @@ -63,8 +73,10 @@ class TestUniPacket(TestCase): self.dut_port = valports[0] tester_port = self.tester.get_local_port(self.dut_port) self.tester_iface = self.tester.get_interface(tester_port) - self.dut.send_expect( - "./%s/app/testpmd -c f -n 4 -- -i --txqflags=0x0" % self.target, "testpmd>", 20) + cmd = "./%s/app/testpmd -c f -n 4 -- -i --txqflags=0x0" + if "cavium" in self.dut.nic_type: + cmd += " --disable-hw-vlan-filter" + self.dut.send_expect(cmd % self.target, "testpmd>", 20) self.dut.send_expect("set fwd rxonly", "testpmd>") self.dut.send_expect("set verbose 1", "testpmd>") self.dut.send_expect("start", "testpmd>") @@ -121,6 +133,9 @@ class TestUniPacket(TestCase): elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): outerL4Type = "" ipv4_default_packet_type = ["L2_ETHER", "L3_IPV4"] + elif "cavium" in self.dut.nic_type: + outerL4Type = "" + ipv4_default_packet_type = ["L3_IPV4"] pktType = { "MAC_IP_PKT": ipv4_default_packet_type + [outerL4Type], "MAC_IP_UDP_PKT": ipv4_default_packet_type + ["L4_UDP"], @@ -139,6 +154,8 @@ class TestUniPacket(TestCase): elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): pktType.pop("MAC_IP_ICMP_PKT") pktType.pop("MAC_IPFRAG_TCP_PKT") + elif "cavium" in self.dut.nic_type: + pktType.pop("MAC_IP_ICMP_PKT") self.run_test(pktType) @@ -152,6 +169,9 @@ class TestUniPacket(TestCase): elif "niantic" in self.nic.lower() or "i350" in self.nic.lower(): outerL4Type = "" ipv6_default_packet_type = ["L2_ETHER", "L3_IPV6"] + elif "cavium" in self.dut.nic_type: + outerL4Type = "" + ipv6_default_packet_type = ["L3_IPV6"] pktType = { "MAC_IPv6_PKT": ipv6_default_packet_type + [outerL4Type], @@ -245,36 +265,55 @@ class TestUniPacket(TestCase): checked that whether NVGRE tunnel packet can be normally detected by Fortville. """ - self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic), + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic or "cavium" in self.dut.nic_type), "NVGRE tunnel packet type detect only support by Fortville") - nvgre_base_packet_type = ["L2_ETHER", "L3_IPV4_EXT_UNKNOWN", "TUNNEL_GRENAT"] - # INNER IPV4 not with vlan - nvgre_ipv4_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV4_EXT_UNKNOWN"] - # INNER IPV6 not with vlan - nvgre_ipv6_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV6_EXT_UNKNOWN"] - # INNER IPV4 with vlan - nvgre_ipv4_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV4_EXT_UNKNOWN"] - # INNER IPV6 with vlan - nvgre_ipv6_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV6_EXT_UNKNOWN"] - - - pktType = { - "MAC_IP_NVGRE_MAC_IPFRAG_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_FRAG"], - "MAC_IP_NVGRE_MAC_IP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IP_NVGRE_MAC_VLAN_PKT": nvgre_base_packet_type + ["INNER_L2_ETHER"], - "MAC_IP_NVGRE_MAC_VLAN_IPFRAG_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_FRAG"], - "MAC_IP_NVGRE_MAC_VLAN_IP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IP_NVGRE_MAC_VLAN_IP_UDP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_UDP"], - "MAC_IP_NVGRE_MAC_VLAN_IP_TCP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_TCP"], - "MAC_IP_NVGRE_MAC_VLAN_IP_SCTP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_SCTP"], - "MAC_IP_NVGRE_MAC_VLAN_IP_ICMP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_ICMP"], - "MAC_IP_NVGRE_MAC_VLAN_IPv6FRAG_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_FRAG"], - "MAC_IP_NVGRE_MAC_VLAN_IPv6_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IP_NVGRE_MAC_VLAN_IPv6_UDP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_UDP"], - "MAC_IP_NVGRE_MAC_VLAN_IPv6_TCP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_TCP"], - "MAC_IP_NVGRE_MAC_VLAN_IPv6_SCTP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_SCTP"], - "MAC_IP_NVGRE_MAC_VLAN_IPv6_ICMP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_ICMP"] - } + if "cavium" in self.dut.nic_type: + nvgre_base_packet_type = ["L3_IPV4", "TUNNEL_NVGRE"] + pktType = { + "MAC_IP_NVGRE_MAC_IPFRAG_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_IP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPFRAG_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IP_UDP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IP_TCP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IP_SCTP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IP_ICMP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPv6FRAG_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPv6_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPv6_UDP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPv6_TCP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPv6_SCTP_PKT": nvgre_base_packet_type, + "MAC_IP_NVGRE_MAC_VLAN_IPv6_ICMP_PKT": nvgre_base_packet_type + } + else: + nvgre_base_packet_type = ["L2_ETHER", "L3_IPV4_EXT_UNKNOWN", "TUNNEL_GRENAT"] + # INNER IPV4 not with vlan + nvgre_ipv4_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV4"] + # INNER IPV6 not with vlan + nvgre_ipv6_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV6"] + # INNER IPV4 with vlan + nvgre_ipv4_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV4"] + # INNER IPV6 with vlan + nvgre_ipv6_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV6"] + + pktType = { + "MAC_IP_NVGRE_MAC_IPFRAG_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_FRAG"], + "MAC_IP_NVGRE_MAC_IP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IP_NVGRE_MAC_VLAN_PKT": nvgre_base_packet_type + ["INNER_L2_ETHER"], + "MAC_IP_NVGRE_MAC_VLAN_IPFRAG_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_FRAG"], + "MAC_IP_NVGRE_MAC_VLAN_IP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IP_NVGRE_MAC_VLAN_IP_UDP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_UDP"], + "MAC_IP_NVGRE_MAC_VLAN_IP_TCP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_TCP"], + "MAC_IP_NVGRE_MAC_VLAN_IP_SCTP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_SCTP"], + "MAC_IP_NVGRE_MAC_VLAN_IP_ICMP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_ICMP"], + "MAC_IP_NVGRE_MAC_VLAN_IPv6FRAG_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_FRAG"], + "MAC_IP_NVGRE_MAC_VLAN_IPv6_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IP_NVGRE_MAC_VLAN_IPv6_UDP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_UDP"], + "MAC_IP_NVGRE_MAC_VLAN_IPv6_TCP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_TCP"], + "MAC_IP_NVGRE_MAC_VLAN_IPv6_SCTP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_SCTP"], + "MAC_IP_NVGRE_MAC_VLAN_IPv6_ICMP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_ICMP"] + } self.run_test(pktType) def test_NVGRE_in_IPv6_tunnel(self): @@ -282,45 +321,76 @@ class TestUniPacket(TestCase): checked that whether NVGRE in IPv6 tunnel packet can be normally detected by Fortville. """ - self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic), + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic or "cavium" in self.dut.nic_type), "NVGRE in IPv6 detect only support by Fortville") - nvgre_base_packet_type = ["L2_ETHER", "L3_IPV6_EXT_UNKNOWN", "TUNNEL_GRENAT"] - # INNER IPV4 not with vlan - nvgre_ipv4_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV4_EXT_UNKNOWN"] - # INNER IPV6 not with vlan - nvgre_ipv6_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV6_EXT_UNKNOWN"] - # INNER IPV4 with vlan - nvgre_ipv4_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV4_EXT_UNKNOWN"] - # INNER IPV6 with vlan - nvgre_ipv6_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV6_EXT_UNKNOWN"] - - pkt_types = { - "MAC_IPv6_NVGRE_MAC_PKT": nvgre_base_packet_type + ["INNER_L2_ETHER"], - "MAC_IPv6_NVGRE_MAC_IPFRAG_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_FRAG"], - "MAC_IPv6_NVGRE_MAC_IP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_IP_UDP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_UDP"], - "MAC_IPv6_NVGRE_MAC_IP_TCP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_TCP"], - "MAC_IPv6_NVGRE_MAC_IP_SCTP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_SCTP"], - "MAC_IPv6_NVGRE_MAC_IP_ICMP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_ICMP"], - "MAC_IPv6_NVGRE_MAC_IPv6FRAG_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_FRAG"], - "MAC_IPv6_NVGRE_MAC_IPv6_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_IPv6_UDP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_UDP"], - "MAC_IPv6_NVGRE_MAC_IPv6_TCP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_TCP"], - "MAC_IPv6_NVGRE_MAC_IPv6_SCTP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_IPv6_ICMP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPFRAG_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_FRAG"], - "MAC_IPv6_NVGRE_MAC_VLAN_IP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_VLAN_IP_UDP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_UDP"], - "MAC_IPv6_NVGRE_MAC_VLAN_IP_TCP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_TCP"], - "MAC_IPv6_NVGRE_MAC_VLAN_IP_SCTP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_SCTP"], - "MAC_IPv6_NVGRE_MAC_VLAN_IP_ICMP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_ICMP"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPv6FRAG_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_FRAG"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_UDP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_UDP"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_TCP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_TCP"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_SCTP_PKT":nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"], - "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_ICMP_PKT":nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"] - } + if "cavium" in self.dut.nic_type: + #cavium recognizes only L3 and L4 by hardware + nvgre_base_packet_type = ["L3_IPV6", "TUNNEL_NVGRE"] + pkt_types = { + "MAC_IPv6_NVGRE_MAC_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPFRAG_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IP_UDP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IP_TCP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IP_SCTP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IP_ICMP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPv6FRAG_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPv6_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPv6_UDP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPv6_TCP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPv6_SCTP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_IPv6_ICMP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPFRAG_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IP_UDP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IP_TCP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IP_SCTP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IP_ICMP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6FRAG_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_UDP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_TCP_PKT": nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_SCTP_PKT":nvgre_base_packet_type, + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_ICMP_PKT":nvgre_base_packet_type + } + else: + nvgre_base_packet_type = ["L2_ETHER", "L3_IPV6_EXT_UNKNOWN", "TUNNEL_GRENAT"] + # INNER IPV4 not with vlan + nvgre_ipv4_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV4_EXT_UNKNOWN"] + # INNER IPV6 not with vlan + nvgre_ipv6_default_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER", "INNER_L3_IPV6_EXT_UNKNOWN"] + # INNER IPV4 with vlan + nvgre_ipv4_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV4_EXT_UNKNOWN"] + # INNER IPV6 with vlan + nvgre_ipv6_vlan_packet_type = nvgre_base_packet_type + ["INNER_L2_ETHER_VLAN", "INNER_L3_IPV6_EXT_UNKNOWN"] + + pkt_types = { + "MAC_IPv6_NVGRE_MAC_PKT": nvgre_base_packet_type + ["INNER_L2_ETHER"], + "MAC_IPv6_NVGRE_MAC_IPFRAG_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_FRAG"], + "MAC_IPv6_NVGRE_MAC_IP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_IP_UDP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_UDP"], + "MAC_IPv6_NVGRE_MAC_IP_TCP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_TCP"], + "MAC_IPv6_NVGRE_MAC_IP_SCTP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_SCTP"], + "MAC_IPv6_NVGRE_MAC_IP_ICMP_PKT": nvgre_ipv4_default_packet_type + ["INNER_L4_ICMP"], + "MAC_IPv6_NVGRE_MAC_IPv6FRAG_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_FRAG"], + "MAC_IPv6_NVGRE_MAC_IPv6_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_IPv6_UDP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_UDP"], + "MAC_IPv6_NVGRE_MAC_IPv6_TCP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_TCP"], + "MAC_IPv6_NVGRE_MAC_IPv6_SCTP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_IPv6_ICMP_PKT": nvgre_ipv6_default_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPFRAG_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_FRAG"], + "MAC_IPv6_NVGRE_MAC_VLAN_IP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_VLAN_IP_UDP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_UDP"], + "MAC_IPv6_NVGRE_MAC_VLAN_IP_TCP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_TCP"], + "MAC_IPv6_NVGRE_MAC_VLAN_IP_SCTP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_SCTP"], + "MAC_IPv6_NVGRE_MAC_VLAN_IP_ICMP_PKT": nvgre_ipv4_vlan_packet_type + ["INNER_L4_ICMP"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6FRAG_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_FRAG"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_UDP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_UDP"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_TCP_PKT": nvgre_ipv6_vlan_packet_type + ["INNER_L4_TCP"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_SCTP_PKT":nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"], + "MAC_IPv6_NVGRE_MAC_VLAN_IPv6_ICMP_PKT":nvgre_ipv6_vlan_packet_type + ["INNER_L4_NONFRAG"] + } self.run_test(pkt_types) @@ -328,9 +398,13 @@ class TestUniPacket(TestCase): """ checked that whether GRE tunnel packet can be normally detected by Fortville. """ - self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic), + bind_layers(IP, GRE, frag=0, proto=IPPROTO_GRE) + self.verify(("fortville" in self.nic or "fortpark_TLV" in self.nic or "cavium" in self.dut.nic_type), "GRE tunnel packet type detect only support by Fortville") - IPv4_packet_type = [" L2_ETHER", " L3_IPV4_EXT_UNKNOWN", "L4_NONFRAG"] + if "cavium" in self.dut.nic_type: + IPv4_packet_type = ["L3_IPV4", "TUNNEL_GRE"] + else: + IPv4_packet_type = [" L2_ETHER", " L3_IPV4_EXT_UNKNOWN", "L4_NONFRAG"] pktType = { "MAC_IP_GRE_IPFRAG_PKT": IPv4_packet_type, @@ -342,6 +416,7 @@ class TestUniPacket(TestCase): "MAC_IP_GRE_PKT": IPv4_packet_type } self.run_test(pktType) + split_layers(IP, GRE, frag=0, proto=IPPROTO_GRE) def test_Vxlan_tunnel(self): """ -- 2.7.4