From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B8F4C282DF for ; Fri, 19 Apr 2019 20:10:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 17BA82171F for ; Fri, 19 Apr 2019 20:10:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b="db5VKKNF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727432AbfDSUKC (ORCPT ); Fri, 19 Apr 2019 16:10:02 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:35504 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726173AbfDSUKB (ORCPT ); Fri, 19 Apr 2019 16:10:01 -0400 Received: by mail-wm1-f67.google.com with SMTP id y197so7414652wmd.0 for ; Fri, 19 Apr 2019 13:10:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=8Vkf08wYzyoH0zzUIeqq5tVE+HC4RtWejTp3L7CFk2E=; b=db5VKKNFyMupteQkuuoz9vTh1VNe6loXK4EBTBxtVFkjTOsbLChAAV/RoqLIGXiZdU rFFHemY/okzNbl9Awb/T91Nwp+cZgbFPmnfOJ+qB89N6KssAvuFZgzil9/ZXYNYJpLEB 8K/V0Ms/8QAT4DbC68fBjHnS7msTnVvgb+AnU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8Vkf08wYzyoH0zzUIeqq5tVE+HC4RtWejTp3L7CFk2E=; b=E88NgjvdDxVsUKtyMb5Ygx+CFQoAu+U1HGj/wNR33BoSzAeNUwi1NZzDCDteSuWVwu Nj5Z7EfTmnZoV4i+F6/hUZlRNzV72omJKnLcmj6+X2efV90VNecOy4Up+P6AqfG4x9Dm 0ceiIWh83RYxOptDR/ZB6tyYgNV///vrsePkjwzJmeZg1aB0wRRLXNJJQTKASv4K3DpM w5IsG8AdYo4I6bJDXg94nWmpnjRUncIXL7vcxkEQbAQQqtjcOQK4nnGgw+BBLpE8WgZR AiHutjXo7FpTggFi+0/izOWpJejkNr5QrTL749RUsXJQQO2VuXQEZ1tz06I6MJnWEmzi Q7sQ== X-Gm-Message-State: APjAAAVvYYt7/IBbHUrR0kMapfURNDHYP0Pt2cTlV/XOI5ERPyIgjnUT Z9J43/qyE3MZGxoVJlM9yncUk3MLiLE= X-Google-Smtp-Source: APXvYqwjtUA1kt1iLjo1YYIIVfo2EohlnOmZAjccYRO1mcr4/sg8TY572pxkzx9gvlkhZA4HbswlFw== X-Received: by 2002:a1c:5f42:: with SMTP id t63mr2305696wmb.94.1555674872847; Fri, 19 Apr 2019 04:54:32 -0700 (PDT) Received: from [192.168.51.243] ([93.152.141.58]) by smtp.gmail.com with ESMTPSA id w11sm8636060wre.15.2019.04.19.04.54.31 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 04:54:32 -0700 (PDT) Subject: Re: [PATCH net-next v3 3/5] bridge: support binding vlan dev link state to vlan member bridge ports To: Mike Manning , netdev@vger.kernel.org, roopa@cumulusnetworks.com References: <20190418173535.22925-1-mmanning@vyatta.att-mail.com> <20190418173535.22925-4-mmanning@vyatta.att-mail.com> From: Nikolay Aleksandrov Message-ID: <8a6a8832-100f-be55-3677-ee5194afcc70@cumulusnetworks.com> Date: Fri, 19 Apr 2019 14:54:31 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190418173535.22925-4-mmanning@vyatta.att-mail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 18/04/2019 20:35, Mike Manning wrote: > In the case of vlan filtering on bridges, the bridge may also have the > corresponding vlan devices as upper devices. A vlan bridge binding mode > is added to allow the link state of the vlan device to track only the > state of the subset of bridge ports that are also members of the vlan, > rather than that of all bridge ports. This mode is set with a vlan flag > rather than a bridge sysfs so that the 8021q module is aware that it > should not set the link state for the vlan device. > > If bridge vlan is configured, the bridge device event handling results > in the link state for an upper device being set, if it is a vlan device > with the vlan bridge binding mode enabled. This also sets a > vlan_bridge_binding flag so that subsequent UP/DOWN/CHANGE events for > the ports in that bridge result in a link state update of the vlan > device if required. > > The link state of the vlan device is up if there is at least one bridge > port that is a vlan member that is admin & oper up, otherwise its oper > state is IF_OPER_LOWERLAYERDOWN. > > Signed-off-by: Mike Manning > --- > net/bridge/br.c | 13 +++-- > net/bridge/br_private.h | 14 +++++ > net/bridge/br_vlan.c | 151 ++++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 174 insertions(+), 4 deletions(-) > Acked-by: Nikolay Aleksandrov