Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5984605iob; Tue, 10 May 2022 08:00:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzskLQa9u/4DKKgqgO9mUV67lz9oNlA+h8ECHOHMO8oCMyZSRbwylMcklMtFug2cMX+OHXF X-Received: by 2002:a05:6a00:b41:b0:50d:35fa:476d with SMTP id p1-20020a056a000b4100b0050d35fa476dmr21102137pfo.33.1652194800385; Tue, 10 May 2022 08:00:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652194800; cv=none; d=google.com; s=arc-20160816; b=ZvWSKvUThPlatkQfzcBJN5HDLkyH1Oa4kgFemnof9W+biVERbvkr1ecuOVoOUwQEnq yah6MFkWu+Vw5wRjBT2BZtb4v14QCasdlkcOj3WRFeZCIPXp1ITtK1Thtl2MO6ERvwjc N4qJMSLOFi2y1SMYoOnr1BNaWFVROH6lZ7PXrBB0hJnor0CKJwvmW86rLbKNA8W2GKke teYNQqhPKWcnk7JmsvK7ffFZBu6panf/106Rx1I2bZ/ri2SEQ6pvFrer3za8kmJsfvf3 omF5E/D3wjeV0ax3K8HAQ5GY7vE2sj2BoCFCwOmZHRUhhvp+d92bwKFiESeolhK79Rf4 rNTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4MeVlHoIzjtDRQGJMhp+jGb0FP+Zk8/l05RCF6nbJ2w=; b=S5mwuowSpBakOPGZ7WKHAVtijcynd/gH7HY3PjT3J7gQ3qYrbRnVRdfvngNxypl3s0 gWsbyGnqwWS4NexvcvszbSCOqfg60C88W17EA4u2kAQlK2CrfXPTpLET0fQJ1I0bFILg +Mnd6vDxrTD4ID2icspY/ZJgokHZpT8Ly9WHwiwhO2uh9YszaF3sZoClkzrjsXb+A7Na AAP4fPbBg1KqPtGeCVkOlygSNaRyGmahuMBK6cY64hwPu6MlK/tTmTXna6310avwKs5P puk7H2Uhxhc834Sr+7OUIIBkrqBdz7o1TiC2c2Gt36hLTFlgvrPGnyfx1jHXhIeolVsm Oe1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YcZn49jz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mw5-20020a17090b4d0500b001dce12d08edsi3266394pjb.51.2022.05.10.07.59.44; Tue, 10 May 2022 08:00:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YcZn49jz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242382AbiEJOAk (ORCPT + 99 others); Tue, 10 May 2022 10:00:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245068AbiEJNi2 (ORCPT ); Tue, 10 May 2022 09:38:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAE211C764C; Tue, 10 May 2022 06:27:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 254C360C1C; Tue, 10 May 2022 13:27:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EBA2C385C2; Tue, 10 May 2022 13:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652189220; bh=FxIhdZqIw91pbHMbO5gwTOdjHrJnWK2rh0Rb9gXuISc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcZn49jzG8LR0MJXP6XXHn9X6kvspPzxz4YfDT8E8FG3HEQfCTze3NlQMOYEoaFcQ l8WrgMM0bXXLy5Ka1rhBEXwhq8moQ+E79zi+zfhjY1yg1OOgOnXeUWPWMGngzPsDXE zA5o3uVfpiSyNc/e9oBpLUfYmp5mD4W3ZkU24Zj4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ido Schimmel , Petr Machata , Paolo Abeni Subject: [PATCH 5.10 51/70] selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational Date: Tue, 10 May 2022 15:08:10 +0200 Message-Id: <20220510130734.355010102@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220510130732.861729621@linuxfoundation.org> References: <20220510130732.861729621@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ido Schimmel commit 3122257c02afd9f199a8fc84ae981e1fc4958532 upstream. In emulated environments, the bridge ports enslaved to br1 get a carrier before changing br1's PVID. This means that by the time the PVID is changed, br1 is already operational and configured with an IPv6 link-local address. When the test is run with netdevs registered by mlxsw, changing the PVID is vetoed, as changing the VID associated with an existing L3 interface is forbidden. This restriction is similar to the 8021q driver's restriction of changing the VID of an existing interface. Fix this by taking br1 down and bringing it back up when it is fully configured. With this fix, the test reliably passes on top of both the SW and HW data paths (emulated or not). Fixes: 239e754af854 ("selftests: forwarding: Test mirror-to-gretap w/ UL 802.1q") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Link: https://lore.kernel.org/r/20220502084507.364774-1-idosch@nvidia.com Signed-off-by: Paolo Abeni Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh | 3 +++ 1 file changed, 3 insertions(+) --- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh @@ -61,9 +61,12 @@ setup_prepare() vrf_prepare mirror_gre_topo_create + # Avoid changing br1's PVID while it is operational as a L3 interface. + ip link set dev br1 down ip link set dev $swp3 master br1 bridge vlan add dev br1 vid 555 pvid untagged self + ip link set dev br1 up ip address add dev br1 192.0.2.129/28 ip address add dev br1 2001:db8:2::1/64