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=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 8FBE5C2D0DB for ; Thu, 23 Jan 2020 21:10:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 29D1C21835 for ; Thu, 23 Jan 2020 21:10:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=cumulusnetworks.com header.i=@cumulusnetworks.com header.b="S9nQS5M8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729459AbgAWVKQ (ORCPT ); Thu, 23 Jan 2020 16:10:16 -0500 Received: from mail-ed1-f66.google.com ([209.85.208.66]:37992 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727816AbgAWVKQ (ORCPT ); Thu, 23 Jan 2020 16:10:16 -0500 Received: by mail-ed1-f66.google.com with SMTP id i16so4852243edr.5 for ; Thu, 23 Jan 2020 13:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/tAMaiitw1PyxFIS0OriuIYG+lTM5de1QiU8nvpGZ4U=; b=S9nQS5M8GRxqDnKBmZCpo/gItUgfZy/2LR/PUWL3LW9ZHOl1HDQm9yQNydKZsdTly4 H+O6N6OoL0hGioUxzz76ffE6NdEh+tpUSXyHYFYrOVRBTkC22Ump2rR2NUFp2LVsWmvs qtPaUH9edp7gfYpGKBmQwWcwSoBph6tZ9c3/o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=/tAMaiitw1PyxFIS0OriuIYG+lTM5de1QiU8nvpGZ4U=; b=LkBbJh0TC7Ge+Jxs+nF0Ic6VdJ1t3Oyf0OCa/IK7E1CUPfSqofgRhivoCkSrv55urt f1fx0xTmatI/SWVGnsrCgtr0DppBsyXb7erHKYzggvlKpth7T5ZSzPw42W3jDty5wMZe qFTl2IgXxNiAamB5DGbaudhMA67shY8U9ut+NdmHzwGsZ+eCVw3oSCu/ql7A0iOC0ktJ 3WAtcRcxn14S2j0QncWfAq+1svvFjLybEGeWsXQHQBtDDWaEfvfRb4UQQIGbi7AWjw7o LGJ2S7mUYW0PmATkmtnjxKDCNhjSizJnGDljeluRLWwcPHtwzOb5eF2MwOZQuHqIYP1D OU1g== X-Gm-Message-State: APjAAAU+0WA5GOtjiUhdFxZUjbFF2k06pItocah/Mww2Kf6sVtKWT2YN CEYat9TsRayrOMCie0bMhbpzsOJwoWE= X-Google-Smtp-Source: APXvYqyRn+MqAW0Zit1T7cZUHvA6hnhflt11PNiiZTzXjiH6/IAJoUEvHTLi4VuR/7E4pBsKFaM9DQ== X-Received: by 2002:a05:6402:b71:: with SMTP id cb17mr8893554edb.125.1579813814598; Thu, 23 Jan 2020 13:10:14 -0800 (PST) Received: from [192.168.0.110] (84-238-136-197.ip.btc-net.bg. [84.238.136.197]) by smtp.googlemail.com with ESMTPSA id ay24sm47153edb.29.2020.01.23.13.10.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 Jan 2020 13:10:14 -0800 (PST) Subject: Re: [PATCH net-next 0/4] net: bridge: add per-vlan state option To: netdev@vger.kernel.org Cc: roopa@cumulusnetworks.com, davem@davemloft.net, bridge@lists.linux-foundation.org References: <20200123132807.613-1-nikolay@cumulusnetworks.com> From: Nikolay Aleksandrov Message-ID: Date: Thu, 23 Jan 2020 23:10:12 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <20200123132807.613-1-nikolay@cumulusnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed 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 1/23/20 3:28 PM, Nikolay Aleksandrov wrote: > Hi, > This set adds the first per-vlan option - state, which uses the new vlan > infrastructure that was recently added. It gives us forwarding control on > per-vlan basis. The first 3 patches prepare the vlan code to support option > dumping and modification. We still compress vlan ranges which have equal > options, each new option will have to add its own equality check to > br_vlan_opts_eq(). The vlans are created in forwarding state by default to > be backwards compatible and vlan state is considered only when the port > state is forwarding (more info in patch 4). > I'll send the selftest for the vlan state with the iproute2 patch-set. > > Thanks, > Nik > > Nikolay Aleksandrov (4): > net: bridge: check port state before br_allowed_egress > net: bridge: vlan: add basic option dumping support > net: bridge: vlan: add basic option setting support > net: bridge: vlan: add per-vlan state > > include/uapi/linux/if_bridge.h | 2 + > net/bridge/Makefile | 2 +- > net/bridge/br_device.c | 3 +- > net/bridge/br_forward.c | 2 +- > net/bridge/br_input.c | 7 +- > net/bridge/br_private.h | 58 +++++++++++++- > net/bridge/br_vlan.c | 99 ++++++++++++++++++----- > net/bridge/br_vlan_options.c | 142 +++++++++++++++++++++++++++++++++ > 8 files changed, 287 insertions(+), 28 deletions(-) > create mode 100644 net/bridge/br_vlan_options.c > Hm, actually I just noticed that we send port notifications even if only changing options which should be avoided since now we have per-vlan notifications. We should be sending only those when changing options without create/delete. I'll make that change and send v2 after some tests tomorrow. Cheers, Nik From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cumulusnetworks.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=/tAMaiitw1PyxFIS0OriuIYG+lTM5de1QiU8nvpGZ4U=; b=S9nQS5M8GRxqDnKBmZCpo/gItUgfZy/2LR/PUWL3LW9ZHOl1HDQm9yQNydKZsdTly4 H+O6N6OoL0hGioUxzz76ffE6NdEh+tpUSXyHYFYrOVRBTkC22Ump2rR2NUFp2LVsWmvs qtPaUH9edp7gfYpGKBmQwWcwSoBph6tZ9c3/o= References: <20200123132807.613-1-nikolay@cumulusnetworks.com> From: Nikolay Aleksandrov Message-ID: Date: Thu, 23 Jan 2020 23:10:12 +0200 MIME-Version: 1.0 In-Reply-To: <20200123132807.613-1-nikolay@cumulusnetworks.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Bridge] [PATCH net-next 0/4] net: bridge: add per-vlan state option List-Id: Linux Ethernet Bridging List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: netdev@vger.kernel.org Cc: roopa@cumulusnetworks.com, bridge@lists.linux-foundation.org, davem@davemloft.net On 1/23/20 3:28 PM, Nikolay Aleksandrov wrote: > Hi, > This set adds the first per-vlan option - state, which uses the new vlan > infrastructure that was recently added. It gives us forwarding control on > per-vlan basis. The first 3 patches prepare the vlan code to support option > dumping and modification. We still compress vlan ranges which have equal > options, each new option will have to add its own equality check to > br_vlan_opts_eq(). The vlans are created in forwarding state by default to > be backwards compatible and vlan state is considered only when the port > state is forwarding (more info in patch 4). > I'll send the selftest for the vlan state with the iproute2 patch-set. > > Thanks, > Nik > > Nikolay Aleksandrov (4): > net: bridge: check port state before br_allowed_egress > net: bridge: vlan: add basic option dumping support > net: bridge: vlan: add basic option setting support > net: bridge: vlan: add per-vlan state > > include/uapi/linux/if_bridge.h | 2 + > net/bridge/Makefile | 2 +- > net/bridge/br_device.c | 3 +- > net/bridge/br_forward.c | 2 +- > net/bridge/br_input.c | 7 +- > net/bridge/br_private.h | 58 +++++++++++++- > net/bridge/br_vlan.c | 99 ++++++++++++++++++----- > net/bridge/br_vlan_options.c | 142 +++++++++++++++++++++++++++++++++ > 8 files changed, 287 insertions(+), 28 deletions(-) > create mode 100644 net/bridge/br_vlan_options.c > Hm, actually I just noticed that we send port notifications even if only changing options which should be avoided since now we have per-vlan notifications. We should be sending only those when changing options without create/delete. I'll make that change and send v2 after some tests tomorrow. Cheers, Nik