From patchwork Wed Jul 12 07:22:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zoltan Balogh X-Patchwork-Id: 787037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3x6r5T6ftLz9s7g for ; Wed, 12 Jul 2017 17:23:09 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ericsson.onmicrosoft.com header.i=@ericsson.onmicrosoft.com header.b="IbINN2L3"; dkim-atps=neutral Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id C8387A88; Wed, 12 Jul 2017 07:23:06 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id D7CFCA88 for ; Wed, 12 Jul 2017 07:23:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from sesbmg23.ericsson.net (sesbmg23.ericsson.net [193.180.251.37]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id ED42386 for ; Wed, 12 Jul 2017 07:23:02 +0000 (UTC) X-AuditID: c1b4fb25-607ff70000001eeb-f8-5965ce54c735 Received: from ESESSHC003.ericsson.se (Unknown_Domain [153.88.183.27]) by sesbmg23.ericsson.net (Symantec Mail Security) with SMTP id 27.B6.07915.45EC5695; Wed, 12 Jul 2017 09:23:01 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.27) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 12 Jul 2017 09:23:00 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.onmicrosoft.com; s=selector1-ericsson-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UdRDB+50MxJOrSH2EfDdTSonimmmqUbDCX4oK1znEIE=; b=IbINN2L3OJiLkGafeuJVfOU71oe+m3bdg4H6Egs0AIt67IAd8hWF5Z8TzqdTyIEgDfjpjNLIeVwUA6NW9gsa0A47Bl3nLWaH0LgOki98yCEuM67NLpw1s/VKYRlRa6JxZyfM+qJqEhJnZ7JxShio2BKTjGxgDXQfFJIDR5lBp2Y= Received: from AM2PR07MB1042.eurprd07.prod.outlook.com (10.162.37.27) by AM2PR07MB0881.eurprd07.prod.outlook.com (10.161.71.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.4; Wed, 12 Jul 2017 07:22:59 +0000 Received: from AM2PR07MB1042.eurprd07.prod.outlook.com ([fe80::24fe:c1d2:514c:dcb7]) by AM2PR07MB1042.eurprd07.prod.outlook.com ([fe80::24fe:c1d2:514c:dcb7%14]) with mapi id 15.01.1261.012; Wed, 12 Jul 2017 07:22:59 +0000 From: =?iso-8859-1?Q?Zolt=E1n_Balogh?= To: "'dev@openvswitch.org'" Thread-Topic: [PATCH v2] tests: fix PTAP system test to check only OF stats Thread-Index: AdL63llkgENyr/ZGRkWBsDNNmbWqZw== Date: Wed, 12 Jul 2017 07:22:58 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: openvswitch.org; dkim=none (message not signed) header.d=none;openvswitch.org; dmarc=none action=none header.from=ericsson.com; x-originating-ip: [91.82.100.59] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM2PR07MB0881; 7:e43jmutVeI80yvBMCD27S3DTBdGUGvaL9Z7fPzaHJSB0qIxoiT6hIVzJ7ONhwqrrt9Si/3uw8QKHqZ6pRx9GYVYc4JKlJFWQES0Pd3RKQvXFycN4joOHTM3TMnKtqm5ctzsGBpWnGEF/B/yxYZCDJrnsQjzRDYb0F3cGqKF3wA3CwrRCXOck0QwrzhA91HBP7nrcjl1NBTsiQ9oHlfpXNz8ThNdl/NE24B9WT/2LGaxHJX82RdTMFT6AnAbYmf+AXuLhBz+Fcvitp1xDT0fPVZUvR7cEw8WLrSqHd/jsa2kU4KufDTlo4HQinVN3taUdFuMEvK8lGbVjap8Z5dulCwpxMMaOBzF45LQOaOi3b1/0ZskHL1qzpxyM/7r4piJu/4gFu6ITcFgqYXqOBkNsDFkOZ2nFF9efWVZ9yGEpVnpIKHcFugRtRRulUgHeu5Gqz2ewLCeuK5cwtgguHUFQzcldJL7FTSHGd5Nv/VGTLYumbbbGimETgWj8qrfEHVq9hsMC25hqTF2nvsJ7ba/SD71qynFOsDNWX15ebxloDdtuMW29PenVkm1rNKOeXp7z486oolYI0ukqIHkyzSmPttyOjyogOKea4fW7xxs9nipxXrJqeURachrgIG9OEs7ZXi1zNnyxSCC6lpdvQRmiCZZZWtzK1r3WMdE2Vpyqtf7lN58LR5cU5xSNqHp1dY1MR3mZLew6gCOFVXk/qEXa8+GKZipVsZH/Q/xQgYvwQ7zmnbfLTrTAVAv9b8u653hh/RTGsUb00FyfMMlYDv0/RjsUuggxgq6Kwi63vmXHijU= x-ms-office365-filtering-correlation-id: da625bbc-eeaf-4845-0163-08d4c8f6d2e7 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254075)(300000503095)(300135400095)(2017052603031)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:AM2PR07MB0881; x-ms-traffictypediagnostic: AM2PR07MB0881: x-exchange-antispam-report-test: UriScan:(37575265505322)(61668805478150)(236129657087228); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(2017060910075)(10201501046)(93006095)(93001095)(3002001)(100000703101)(100105400095)(6041248)(20161123562025)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM2PR07MB0881; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM2PR07MB0881; x-forefront-prvs: 036614DD9C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(189998001)(478600001)(53936002)(2906002)(81166006)(53946003)(25786009)(9686003)(7736002)(5250100002)(99286003)(8936002)(7696004)(2900100001)(55016002)(110136004)(38730400002)(33656002)(305945005)(6506006)(3846002)(74316002)(5660300001)(6916009)(8676002)(66066001)(14454004)(3280700002)(6436002)(3660700001)(50986999)(54356999)(102836003)(6116002)(86362001)(491001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR07MB0881; H:AM2PR07MB1042.eurprd07.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2017 07:22:58.9447 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR07MB0881 X-OriginatorOrg: ericsson.com X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrHIsWRmVeSWpSXmKPExsUyM2K7tG7oudRIg6+PuS2Ont7D7MDo8ezm f8YAxigum5TUnMyy1CJ9uwSujONvt7IWrOtlrNi0+gZLA+Okui5GTg4JAROJU+dPs3YxcnEI CRxhlPi97QCUc4JR4lfXIhYQh0Wgl1niyIpLjBCZqUwSG+90MUM4jxklmk59YwEZxibgLHF9 90s2EFtEwFDi0qSTrCC2sICbxK9vzUDdHEBxb4neY1kQJXoS15e3gZWzCKhKTP3RB1bOKxAj 0XdjEthIRgExie+n1jCB2MwC4hK3nsxngrhbQGLJnvPMELaoxMvH/8DOZhSYzSjxd2cLVJGC xKYF79khbFmJS/O7wT6QEHjAJvFjcRNUwlfi4NW/LBCJR0wScxe8Ywe5VEJAS+LzYX6ImmiJ H2dB3gexsyXO7lrKClF/kVXixqwrrBAJGYnVq7ZDJV6zSJz9+J0R4n0pibtXOqFsGYkXd/ay QvyjJ3Fj6hS2CYwas5C8NwtJCsLWlli28DXzLHDQCEqcnPmEZQEjyypG0eLU4qTcdCNjvdSi zOTi4vw8vbzUkk2MwFRxcMtv1R2Ml984HmIU4GBU4uHt2pcaKcSaWFZcmXuIUYKDWUmEt/Qw UIg3JbGyKrUoP76oNCe1+BCjNAeLkjiv474LEUIC6YklqdmpqQWpRTBZJg5OqQZGV/Pwa3tO ujv13ttzb96lqj+p1zizzgoenNq5W0AmbD/7U9VepqZHm75OnfH1xxvO+2wiD/5utm9fWzo/ bVvNr005USE/HWqkC9bMmxFszfPcl5lNV2Hxk4m5u/4s+ay5eKntk+uVW7qU1ldxSOTw6O3X +ucrYK63kTlxjxv7qYXbjp1z9Sx2V2Ipzkg01GIuKk4EAP5JWoQRAwAA X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH v2] tests: fix PTAP system test to check only OF stats X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org It turned out, checking datapath flow statistics during system-userspace test is not reliable. Unwanted packets can be injected depending on system configuration. As a workaround, this commit removes checking statistics of datapath flows and does check OpenFlow statistics of the integrator bridges. Datapath flows can be checked in normal PTAP unit tests by running 'make check'. Reported-by: Darrell Ball Suggested-by: Jan Scheurich Tested-by: Darrell Ball Signed-off-by: Zoltán Balogh --- tests/system-userspace-packet-type-aware.at | 127 +++++++++++++++------------- 1 file changed, 67 insertions(+), 60 deletions(-) diff --git a/tests/system-userspace-packet-type-aware.at b/tests/system-userspace-packet-type-aware.at index 65d81ce8e..24a7698ab 100644 --- a/tests/system-userspace-packet-type-aware.at +++ b/tests/system-userspace-packet-type-aware.at @@ -33,9 +33,9 @@ AT_SETUP([ptap - triangle bridge setup with L2 and L3 GRE tunnels]) # 1030 br-in1 gre-13 l2 br-in3 3010 (l2) # 2010 br-in2 gre-21 ptap br-in1 1020 (l2), 1021 (l3) # 2030 br-in2 gre-23 ptap br-in3 3020 (l2), 3021 (l3) -# 3010 br-in1 gre-31 l2 br-in1 1030 (l2) -# 3020 br-in1 gre-32 l2 br-in2 2010 (ptap) -# 3021 br-in1 gre-32_l3 l3 same +# 3010 br-in3 gre-31 l2 br-in1 1030 (l2) +# 3020 br-in3 gre-32 l2 br-in2 2010 (ptap) +# 3021 br-in3 gre-32_l3 l3 same AT_SKIP_IF([test $HAVE_NC = no]) @@ -176,15 +176,15 @@ AT_CHECK([ ### Flows in br-pto twist TEP IP addresses in tunnel IP headers AT_CHECK([ - ovs-ofctl add-flow br-p1 in_port:LOCAL,actions=2 + ovs-ofctl add-flow br-p1 in_port:LOCAL,ip,actions=2 ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:20.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL ovs-ofctl add-flow br-p1 in_port:2,ip,nw_dst:30.0.0.1,actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL - ovs-ofctl add-flow br-p2 in_port:LOCAL,actions=2 + ovs-ofctl add-flow br-p2 in_port:LOCAL,ip,actions=2 ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:10.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL ovs-ofctl add-flow br-p2 in_port:2,ip,nw_dst:30.0.0.2,actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL - ovs-ofctl add-flow br-p3 in_port:LOCAL,actions=2 + ovs-ofctl add-flow br-p3 in_port:LOCAL,ip,actions=2 ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:10.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL ovs-ofctl add-flow br-p3 in_port:2,ip,nw_dst:20.0.0.3,actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL ], [0]) @@ -204,15 +204,15 @@ AT_CHECK([ ovs-ofctl dump-flows br-p2 | ofctl_strip | strip_n_packets | strip_n_bytes | sort | grep actions ovs-ofctl dump-flows br-p3 | ofctl_strip | strip_n_packets | strip_n_bytes | sort | grep actions ], [0], [dnl - in_port=LOCAL actions=output:2 ip,in_port=2,nw_dst=20.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.2,LOCAL ip,in_port=2,nw_dst=30.0.0.1 actions=mod_nw_dst:10.0.0.1,mod_nw_src:10.0.0.3,LOCAL - in_port=LOCAL actions=output:2 + ip,in_port=LOCAL actions=output:2 ip,in_port=2,nw_dst=10.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.1,LOCAL ip,in_port=2,nw_dst=30.0.0.2 actions=mod_nw_dst:20.0.0.2,mod_nw_src:20.0.0.3,LOCAL - in_port=LOCAL actions=output:2 + ip,in_port=LOCAL actions=output:2 ip,in_port=2,nw_dst=10.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.1,LOCAL ip,in_port=2,nw_dst=20.0.0.3 actions=mod_nw_dst:30.0.0.3,mod_nw_src:30.0.0.2,LOCAL + ip,in_port=LOCAL actions=output:2 ]) ### Setup test ports for traffic injection @@ -331,9 +331,6 @@ AT_CHECK([ ]) -# Clear up megaflow cache -sleep 10 - # Ping between N1 and N3, via the L2 GRE tunnel between br-in1 and br-in3 NS_CHECK_EXEC([ns1], [ping -q -c 3 -i 0.3 -w 2 $N3_IP | FORMAT_PING], [0], [dnl 3 packets transmitted, 3 received, 0% packet loss, time 0ms @@ -342,26 +339,25 @@ NS_CHECK_EXEC([ns1], [ping -q -c 3 -i 0.3 -w 2 $N3_IP | FORMAT_PING], [0], [dnl sleep 1 AT_CHECK([ - ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | grep -v arp |sort -], [0], [flow-dump from non-dpdk interfaces: -recirc_id(0),in_port(10),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,frag=no), packets:2, bytes:272, used:0.0s, actions:set(ipv4(src=30.0.0.1,dst=30.0.0.3)),tnl_pop(14) -recirc_id(0),in_port(11),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:13 -recirc_id(0),in_port(12),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:01),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:11 -recirc_id(0),in_port(13),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:12 -recirc_id(0),in_port(15),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,tos=0/0x3,frag=no), packets:2, bytes:196, used:0.0s, actions:tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(5)) -recirc_id(0),in_port(17),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:2, bytes:196, used:0.0s, actions:pop_eth,tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:03,dl_type=0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(7)) -recirc_id(0),in_port(5),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:8 -recirc_id(0),in_port(6),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:9 -recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:10 -recirc_id(0),in_port(8),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:01),eth_type(0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,frag=no), packets:2, bytes:244, used:0.0s, actions:set(ipv4(src=10.0.0.2,dst=10.0.0.1)),tnl_pop(14) -recirc_id(0),in_port(9),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_type(0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,frag=no), packets:2, bytes:244, used:0.0s, actions:set(ipv4(src=20.0.0.3,dst=20.0.0.2)),tnl_pop(14) -tunnel(src=10.0.0.2,dst=10.0.0.1,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=1,id=0x800),ipv4(dst=192.168.10.10,frag=no), packets:2, bytes:168, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=aa:55:aa:55:00:01),15 -tunnel(src=20.0.0.3,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=1,id=0x800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:2, bytes:168, used:0.0s, actions:tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:01,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(6)) -tunnel(src=30.0.0.1,dst=30.0.0.3,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=0,id=0),eth(dst=aa:55:aa:55:00:03),eth_type(0x0800),ipv4(dst=192.168.10.30,frag=no), packets:2, bytes:196, used:0.0s, actions:17 + ovs-ofctl dump-flows br-in1 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=252, ip,nw_dst=192.168.10.10 actions=mod_dl_dst:aa:55:aa:55:00:01,output:10 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.30 actions=output:1030 +]) + +AT_CHECK([ + ovs-ofctl dump-flows br-in2 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=252, packet_type=(1,0x800),nw_dst=192.168.10.10 actions=output:2010 +]) + +AT_CHECK([ + ovs-ofctl dump-flows br-in3 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.10 actions=output:3021 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.30 actions=mod_dl_dst:aa:55:aa:55:00:03,output:30 ]) -# Clear up megaflow cache -sleep 10 # Ping between N1 and N2, via the L2 GRE tunnel between br-in1 and br-in2 NS_CHECK_EXEC([ns1], [ping -q -c 3 -i 0.3 -w 2 $N2_IP | FORMAT_PING], [0], [dnl @@ -371,22 +367,28 @@ NS_CHECK_EXEC([ns1], [ping -q -c 3 -i 0.3 -w 2 $N2_IP | FORMAT_PING], [0], [dnl sleep 1 AT_CHECK([ - ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | grep -v arp | sort -], [0], [flow-dump from non-dpdk interfaces: -recirc_id(0),in_port(11),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:12 -recirc_id(0),in_port(12),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:01),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:11 -recirc_id(0),in_port(15),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.20,tos=0/0x3,frag=no), packets:2, bytes:196, used:0.0s, actions:tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(5)) -recirc_id(0),in_port(16),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:2, bytes:196, used:0.0s, actions:tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:01,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(6)) -recirc_id(0),in_port(5),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:8 -recirc_id(0),in_port(6),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:9 -recirc_id(0),in_port(8),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:01),eth_type(0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,frag=no), packets:2, bytes:272, used:0.0s, actions:set(ipv4(src=10.0.0.2,dst=10.0.0.1)),tnl_pop(14) -recirc_id(0),in_port(9),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.2,proto=47,frag=no), packets:2, bytes:272, used:0.0s, actions:set(ipv4(src=20.0.0.1,dst=20.0.0.2)),tnl_pop(14) -tunnel(src=10.0.0.2,dst=10.0.0.1,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=0,id=0),eth(dst=aa:55:aa:55:00:01),eth_type(0x0800),ipv4(dst=192.168.10.10,frag=no), packets:2, bytes:196, used:0.0s, actions:15 -tunnel(src=20.0.0.1,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=0,id=0),eth(dst=aa:55:aa:55:00:02),eth_type(0x0800),ipv4(dst=192.168.10.20,frag=no), packets:2, bytes:196, used:0.0s, actions:16 + ovs-ofctl dump-flows br-in1 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.20 actions=output:1020 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.30 actions=output:1030 + n_packets=6, n_bytes=546, ip,nw_dst=192.168.10.10 actions=mod_dl_dst:aa:55:aa:55:00:01,output:10 +]) + +AT_CHECK([ + ovs-ofctl dump-flows br-in2 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=252, packet_type=(1,0x800),nw_dst=192.168.10.10 actions=output:2010 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.10 actions=output:2010 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.20 actions=mod_dl_dst:aa:55:aa:55:00:02,output:20 +]) + +AT_CHECK([ + ovs-ofctl dump-flows br-in3 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.10 actions=output:3021 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.30 actions=mod_dl_dst:aa:55:aa:55:00:03,output:30 ]) -# Clear up megaflow cache -sleep 10 # Ping between N3 and N2, via the L3 GRE tunnel between br-in3 and br-in2 NS_CHECK_EXEC([ns3], [ping -q -c 3 -i 0.3 -w 2 $N1_IP | FORMAT_PING], [0], [dnl @@ -396,23 +398,28 @@ NS_CHECK_EXEC([ns3], [ping -q -c 3 -i 0.3 -w 2 $N1_IP | FORMAT_PING], [0], [dnl sleep 1 AT_CHECK([ - ovs-appctl dpctl/dump-flows | strip_used | grep -v ipv6 | grep -v arp | sort -], [0], [flow-dump from non-dpdk interfaces: -recirc_id(0),in_port(10),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,frag=no), packets:2, bytes:272, used:0.0s, actions:set(ipv4(src=30.0.0.1,dst=30.0.0.3)),tnl_pop(14) -recirc_id(0),in_port(11),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:03),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:13 -recirc_id(0),in_port(12),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:01),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:11 -recirc_id(0),in_port(13),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:12 -recirc_id(0),in_port(15),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.30,tos=0/0x3,frag=no), packets:2, bytes:196, used:0.0s, actions:tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:03,src=aa:55:00:00:00:01,dl_type=0x0800),ipv4(src=10.0.0.1,dst=10.0.0.3,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x6558))),out_port(5)) -recirc_id(0),in_port(17),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:2, bytes:196, used:0.0s, actions:pop_eth,tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:02,src=aa:55:00:00:00:03,dl_type=0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(7)) -recirc_id(0),in_port(5),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:272, used:0.0s, actions:8 -recirc_id(0),in_port(6),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:9 -recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(frag=no), packets:2, bytes:244, used:0.0s, actions:10 -recirc_id(0),in_port(8),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:01),eth_type(0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,frag=no), packets:2, bytes:244, used:0.0s, actions:set(ipv4(src=10.0.0.2,dst=10.0.0.1)),tnl_pop(14) -recirc_id(0),in_port(9),packet_type(ns=0,id=0),eth(dst=aa:55:00:00:00:02),eth_type(0x0800),ipv4(src=30.0.0.3,dst=30.0.0.2,proto=47,frag=no), packets:2, bytes:244, used:0.0s, actions:set(ipv4(src=20.0.0.3,dst=20.0.0.2)),tnl_pop(14) -tunnel(src=10.0.0.2,dst=10.0.0.1,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=1,id=0x800),ipv4(dst=192.168.10.10,frag=no), packets:2, bytes:168, used:0.0s, actions:push_eth(src=00:00:00:00:00:00,dst=aa:55:aa:55:00:01),15 -tunnel(src=20.0.0.3,dst=20.0.0.2,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=1,id=0x800),ipv4(dst=192.168.10.10,tos=0/0x3,frag=no), packets:2, bytes:168, used:0.0s, actions:tnl_push(tnl_port(14),header(size=38,type=3,eth(dst=aa:55:00:00:00:01,src=aa:55:00:00:00:02,dl_type=0x0800),ipv4(src=20.0.0.2,dst=20.0.0.1,proto=47,tos=0,ttl=64,frag=0x4000),gre((flags=0x0,proto=0x800))),out_port(6)) -tunnel(src=30.0.0.1,dst=30.0.0.3,flags(-df-csum)),recirc_id(0),in_port(14),packet_type(ns=0,id=0),eth(dst=aa:55:aa:55:00:03),eth_type(0x0800),ipv4(dst=192.168.10.30,frag=no), packets:2, bytes:196, used:0.0s, actions:17 + ovs-ofctl dump-flows br-in1 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.20 actions=output:1020 + n_packets=6, n_bytes=588, ip,nw_dst=192.168.10.30 actions=output:1030 + n_packets=9, n_bytes=798, ip,nw_dst=192.168.10.10 actions=mod_dl_dst:aa:55:aa:55:00:01,output:10 +]) + +AT_CHECK([ + ovs-ofctl dump-flows br-in2 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.10 actions=output:2010 + n_packets=3, n_bytes=294, ip,nw_dst=192.168.10.20 actions=mod_dl_dst:aa:55:aa:55:00:02,output:20 + n_packets=6, n_bytes=504, packet_type=(1,0x800),nw_dst=192.168.10.10 actions=output:2010 ]) +AT_CHECK([ + ovs-ofctl dump-flows br-in3 | ofctl_strip | sort | grep n_packets +], [0], [dnl + n_packets=6, n_bytes=588, ip,nw_dst=192.168.10.10 actions=output:3021 + n_packets=6, n_bytes=588, ip,nw_dst=192.168.10.30 actions=mod_dl_dst:aa:55:aa:55:00:03,output:30 +]) + + OVS_TRAFFIC_VSWITCHD_STOP AT_CLEANUP