From patchwork Tue Oct 19 15:58:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xavier Simonart X-Patchwork-Id: 1543446 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=BL61XO3G; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HYdgt59kFz9sPB for ; Wed, 20 Oct 2021 02:58:18 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id AB55480B15; Tue, 19 Oct 2021 15:58:16 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5iFi0CSUFl5Q; Tue, 19 Oct 2021 15:58:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id D863B828F8; Tue, 19 Oct 2021 15:58:14 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9F2C2C0011; Tue, 19 Oct 2021 15:58:14 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 39738C000D for ; Tue, 19 Oct 2021 15:58:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 254864069A for ; Tue, 19 Oct 2021 15:58:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gifm4lHsdDWn for ; Tue, 19 Oct 2021 15:58:12 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by smtp4.osuosl.org (Postfix) with ESMTPS id 555A440698 for ; Tue, 19 Oct 2021 15:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634659091; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q0FIbNNxRfYFWXDvEg2jA9j5uK69iLP2SZthzia1xtM=; b=BL61XO3GpJ0ud6CmmQkDTabHayJ5+Mv0gbLZL601AbsbB0duOxO6i4vAFp6ZoMhKgSBR7E uti6GCLhuOAh/0P33IvzF6IQNolsejbUIPdXXRXf7mfNiP8Y3SLwn6BbBndC3fY68e5b0U SWrbUhoNxwANZYsqwT13xPo+ZhXpeR8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-595-G6v4UkKQNDifm9wAo3PkDw-1; Tue, 19 Oct 2021 11:58:07 -0400 X-MC-Unique: G6v4UkKQNDifm9wAo3PkDw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EE2EE9126D for ; Tue, 19 Oct 2021 15:58:06 +0000 (UTC) Received: from wsfd-netdev90.ntdv.lab.eng.bos.redhat.com (wsfd-netdev90.ntdv.lab.eng.bos.redhat.com [10.19.188.196]) by smtp.corp.redhat.com (Postfix) with ESMTP id AAACD5DAA5; Tue, 19 Oct 2021 15:58:06 +0000 (UTC) From: Xavier Simonart To: xsimonar@redhat.com, dev@openvswitch.org Date: Tue, 19 Oct 2021 11:58:05 -0400 Message-Id: <20211019155805.3515655-1-xsimonar@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=xsimonar@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn] ovn.at: Fix flaky test "router - check packet length - icmp defrag" X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" This test was failing randomly, probably on slow systems. It was waiting for gratuitous ARP which were potentially generated earlier. Fixes: 1c9e46ab ("northd: add check_pkt_larger lflows for ingress traffic") Signed-off-by: Xavier Simonart --- tests/ovn.at | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/ovn.at b/tests/ovn.at index 05eac4e5f..9483e4f75 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -16895,7 +16895,6 @@ test_ip_packet_larger() { expected=${expected}000000000000000000000000000000000000 expected=${expected}000000000000000000000000000000000000 echo $expected > br_phys_n1.expected - echo $gw_ip_garp >> br_phys_n1.expected else src_ip=`ip_to_hex 10 0 0 1` dst_ip=`ip_to_hex 10 0 0 3` @@ -16916,7 +16915,9 @@ test_ip_packet_larger() { check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet if test $mtu -ge $mtu_needed; then - OVN_CHECK_PACKETS([hv1/br-phys_n1-tx.pcap], [br_phys_n1.expected]) + # Ignore gratuitous ARPs; there is no guarantee to get them here as they might + # already have been generated + OVN_CHECK_PACKETS_CONTAIN([hv1/br-phys_n1-tx.pcap], [br_phys_n1.expected]) $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap > pkts # hv1/vif1-tx.pcap can receive the GARP packet generated by ovn-controller # for the gateway router port. So ignore this packet. @@ -16953,7 +16954,9 @@ test_ip_packet_larger_ext() { orig_packet_l3=${orig_packet_l3}000000000000000000000000000000000000 packet=${packet}${orig_packet_l3} - gw_ip_garp=ffffffffffff00002020121308060001080006040001000020201213aca80064000000000000aca80064 + # A Gratuitous ARP (as shown next line) might be transmitted, but + # it is also possible that it was transmitted earlier, so do not wait for it. + # optional_gw_ip_garp=ffffffffffff00002020121308060001080006040001000020201213aca80064000000000000aca80064 ext_ip_garp=ffffffffffff00000012af110806000108000604000100000012af11aca80004000000000000aca80004 src_ip=`ip_to_hex 172 168 0 100` @@ -16967,8 +16970,6 @@ test_ip_packet_larger_ext() { icmp_reply=${icmp_reply}${orig_packet_l3} echo $icmp_reply > br-phys_n1.expected - echo $gw_ip_garp >> br-phys_n1.expected - as hv1 reset_pcap_file br-phys_n1 hv1/br-phys_n1 as hv1 reset_pcap_file hv1-vif1 hv1/vif1 @@ -16977,7 +16978,7 @@ test_ip_packet_larger_ext() { # Send packet from sw0-port1 to outside check as hv1 ovs-appctl netdev-dummy/receive br-phys_n1 $packet - OVN_CHECK_PACKETS([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected]) + OVN_CHECK_PACKETS_CONTAIN([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected]) } # IPv6 outgoing traffic generated inside the cluster @@ -17053,9 +17054,7 @@ test_ip6_packet_larger_ext() { local ip6_hdr=6000000000583afe${ipv6_src}${ipv6_dst} local packet=${eth_dst}${eth_src}86dd${ip6_hdr}9000cc7662f00001${payload} - local ns=ffffffffffff00002020121308060001080006040001000020201213aca80064000000000000aca80064 - echo $ns > br-phys_n1.expected - + # Some ** ARP ** packets might still be received - ignore them as hv1 reset_pcap_file br-phys_n1 hv1/br-phys_n1 as hv1 reset_pcap_file hv1-vif1 hv1/vif1 @@ -17078,9 +17077,9 @@ test_ip6_packet_larger_ext() { outer_packet=${outer_ip6}${outer_icmp6_and_payload} icmp6_reply=${eth_src}${eth_dst}86dd${outer_packet} - echo $icmp6_reply >> br-phys_n1.expected + echo $icmp6_reply > br-phys_n1.expected - OVN_CHECK_PACKETS([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected]) + OVN_CHECK_PACKETS_CONTAIN([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected]) } wait_for_ports_up @@ -17200,7 +17199,7 @@ OVS_WAIT_FOR_OUTPUT([ grep "check_pkt_larger(118)" ext-br-int-gw-flows-100 | wc -l], [0], [3 ]) -AS_BOX([testing ingress traffic mtu 100 for gw router - IPv6]) +AS_BOX([testing ingress traffic mtu 100 for gw router - IPv4]) test_ip_packet_larger_ext 100 AS_BOX([testing ingress traffic mtu 100 for gw router - IPv6])