Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3636547rwb; Tue, 20 Sep 2022 02:27:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7OcPRauU0ifEVfZUHJUNFKIdpzW53cxouiKCJpUrvWlbM1h69hqtQgX++c30gMoY/IKfC4 X-Received: by 2002:a05:6402:2694:b0:450:d537:f6d6 with SMTP id w20-20020a056402269400b00450d537f6d6mr19639262edd.344.1663666068791; Tue, 20 Sep 2022 02:27:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663666068; cv=none; d=google.com; s=arc-20160816; b=jVEF/u+UPyoywyifdtuYmKsDI0bVAvkyRXPCFNQRv/846zKf+0uzktllJvKyYME0ks SFejy8CqcF3gWFL4gpgIgd7AxYW1yNnFFDF59Fr0Ay9sns05F2rXNb9C4TXGCCE/z7G5 Zeq60UKmz39bPdT8Npy8+Cxg+GvUoGumrtBIwdabVtNPvGvrTkrYrjkXCyuz/FlnCTYd XUHcHiUAGgXC1tCOJjiUH8QU2y/Wawo4MsfJEGKaWwU+PX+Bipf6W0q9x3g8ML2A1j2C TgerHPpmLl6ek8YN5/u37HPjPTY6J63ZRdNGUd4fU0m4tMyk9itTH519vS0eeew8iRPv AxIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=v6Fmj83hx1h9EOaSFrL3lfhYXbz4XGnMveaMkf6jjPQ=; b=tkUStxGEG1hCwq+wHENXbQBuH0jRf75gAg0UCWgJ2MEfMFm/uJxnvMDG+MI+DbABAo ZkSjGW8DX3rodMarHbosSqTKrmxPtgXoNgzAkaTb3kXR1rutE/6582p2HJgOY+DOutO+ 5wFuaFgoLnLvlzzWcdli+2xGQbSNPBsDSM1ZRfzOT2I4D1GK/eZ5EztcDV81YrC7JExP jsie0xwaSrkYAKy4+LGoUx74Ibh1viKbFIwNt05b9pnj0JKi83Zpj63xcLNioNG/FkxU KAxDouOSJYl1t5ERI8Vd+bnUww/yqO1g1ivWCILw6AIZhUwt5pijpY0vaP9KOCS/gY39 kvWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@blackwall-org.20210112.gappssmtp.com header.s=20210112 header.b=oWXQ6TZy; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs40-20020a1709073ea800b00780ec2af6e4si1116293ejc.67.2022.09.20.02.27.22; Tue, 20 Sep 2022 02:27:48 -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=@blackwall-org.20210112.gappssmtp.com header.s=20210112 header.b=oWXQ6TZy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbiITJQu (ORCPT + 99 others); Tue, 20 Sep 2022 05:16:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230438AbiITJQb (ORCPT ); Tue, 20 Sep 2022 05:16:31 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD6E0E18 for ; Tue, 20 Sep 2022 02:16:29 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id hy2so890419ejc.8 for ; Tue, 20 Sep 2022 02:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=blackwall-org.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=v6Fmj83hx1h9EOaSFrL3lfhYXbz4XGnMveaMkf6jjPQ=; b=oWXQ6TZyU38Tt6B0tB5xoeC2txaV/i23+XquBsZIHUlTTdtqpu/uE5zzD2jzVvE+Vf WzCR1/U7ZsjhW8WtBnrtoJiP70wvf0AuxhL3i9qedEDUVGMWVGw4N9gRiiUDXYjS3++/ 4flXzd2anBcOIY2h7liTEQb2eNCop6Ymvn29azgWeIx4F8b7viSUyVrZ89YRgpSM35pU b4j5EA/AO4GanUxm7eAIIVGMfAWHXxpxTav64KglJnpoMOA3ALHlJpHHmpacUrTkl1po wY19mQYdyX7TiiTOKtCqM21IGN5fvYkzdlcnPb8kdOD4eD7PBvqDYiq3siRnzbUhf64t eENg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=v6Fmj83hx1h9EOaSFrL3lfhYXbz4XGnMveaMkf6jjPQ=; b=RHytAec7/pRwFCeBmrEVvS97lWBYS87MAiMnk0LaGezsHJK517LKHepSt5QZlYD21Y 98dEIARqE/tKsVnrgAOp78CibNKpE8YZEbUcdIMGkOXsDYGYy8eIzFxXtO9PDzk1KThM 0zaNsqlSFlRXO/7UxYq6mlRfqYb35jiJ2q8WUdVhOpKGafKPWoHBDEhBc3hE211oj5NH WLpTZLSGcii40CtBfRk1wGX+T9fkX6jv7iwmpo7HYaUUBSkqd+ChO9QSyc0WnQY6nNE2 bYF+F1m0eXK514G9YSn5rWN2ZLQFo5fJA0f4G4nDbcnpCJCJYwKm0ZknPmrkfs/ydx2Q UsVQ== X-Gm-Message-State: ACrzQf2CG1C3hIslebf/pQmWeHuRVLTA+D+ZUbuWxjPpodU6wdyv9EVL 2M/tEOaL9shURB606xAjDmXCSp9ORctYiHPj X-Received: by 2002:a17:907:628f:b0:72f:58fc:3815 with SMTP id nd15-20020a170907628f00b0072f58fc3815mr16179909ejc.719.1663665387996; Tue, 20 Sep 2022 02:16:27 -0700 (PDT) Received: from [192.168.0.111] (87-243-81-1.ip.btc-net.bg. [87.243.81.1]) by smtp.gmail.com with ESMTPSA id u9-20020aa7d0c9000000b0043ba7df7a42sm912888edo.26.2022.09.20.02.16.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Sep 2022 02:16:27 -0700 (PDT) Message-ID: <78bd0e54-4ee3-bd3c-2154-9eb8b9a70497@blackwall.org> Date: Tue, 20 Sep 2022 12:16:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 Subject: Re: [PATCH RFC net-next 0/5] net: vlan: fix bridge binding behavior and add selftests Content-Language: en-US To: Sevinj Aghayeva , netdev@vger.kernel.org Cc: "David S. Miller" , aroulin@nvidia.com, sbrivio@redhat.com, roopa@nvidia.com, Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org References: From: Nikolay Aleksandrov In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE 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 On 17/09/2022 23:17, Sevinj Aghayeva wrote: > When bridge binding is enabled for a vlan interface, it is expected > that the link state of the vlan interface will track the subset of the > ports that are also members of the corresponding vlan, rather than > that of all ports. > > Currently, this feature works as expected when a vlan interface is > created with bridge binding enabled: > > ip link add link br name vlan10 type vlan id 10 protocol 802.1q \ > bridge_binding on > > However, the feature does not work when a vlan interface is created > with bridge binding disabled, and then enabled later: > > ip link add link br name vlan10 type vlan id 10 protocol 802.1q \ > bridge_binding off > ip link set vlan10 type vlan bridge_binding on > > After these two commands, the link state of the vlan interface > continues to track that of all ports, which is inconsistent and > confusing to users. This series fixes this bug and introduces two > tests for the valid behavior. > > Sevinj Aghayeva (5): > net: core: export call_netdevice_notifiers_info > net: core: introduce a new notifier for link-type-specific changes > net: 8021q: notify bridge module of bridge-binding flag change > net: bridge: handle link-type-specific changes in the bridge module > selftests: net: tests for bridge binding behavior > > include/linux/if_vlan.h | 4 + > include/linux/netdevice.h | 3 + > include/linux/notifier_info.h | 21 +++ > net/8021q/vlan.h | 2 +- > net/8021q/vlan_dev.c | 20 ++- > net/bridge/br.c | 5 + > net/bridge/br_private.h | 7 + > net/bridge/br_vlan.c | 18 +++ > net/core/dev.c | 7 +- > tools/testing/selftests/net/Makefile | 1 + > .../selftests/net/bridge_vlan_binding_test.sh | 143 ++++++++++++++++++ > 11 files changed, 223 insertions(+), 8 deletions(-) > create mode 100644 include/linux/notifier_info.h > create mode 100755 tools/testing/selftests/net/bridge_vlan_binding_test.sh > The set looks good to me, the bridge and vlan direct dependency is gone and the new notification type is used for passing link type specific info. If the others are ok with it I think you can send it as non-RFC, but I'd give it a few more days at least. :) Thanks, Nik