From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergei Shtylyov Subject: Re: [PATCH net-next 8/8] bridge: Automatically manage promisc mode when vlan filtering is on. Date: Thu, 15 May 2014 00:41:06 +0400 Message-ID: <5373D4E2.1070904@cogentembedded.com> References: <1400080168-16625-1-git-send-email-vyasevic@redhat.com> <1400080168-16625-9-git-send-email-vyasevic@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: john.r.fastabend@intel.com, shemminger@vyatta.com, bridge@lists.linux-foundation.org, jhs@mojatatu.com, mst@redhat.com To: Vlad Yasevich , netdev@vger.kernel.org Return-path: In-Reply-To: <1400080168-16625-9-git-send-email-vyasevic@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: bridge-bounces@lists.linux-foundation.org Errors-To: bridge-bounces@lists.linux-foundation.org List-Id: netdev.vger.kernel.org Hello. On 05/14/2014 07:09 PM, Vlad Yasevich wrote: > If the user doesn't enable vlan filtering, we have to place all > bridge ports in promsic mode so that we retain the capability of > of receiving tagged frames. > When vlan filtering is enabled, the each port will be provided with > necessary vlan configuration and would be able to receive tagged > traffic without promiscuous mode set, thus allowing us to automatically > turn promiscuity on or off depending on the configuration. > Signed-off-by: Vlad Yasevich > --- > net/bridge/br_if.c | 12 ++++++++---- > net/bridge/br_private.h | 9 +++++++++ > net/bridge/br_vlan.c | 1 + > 3 files changed, 18 insertions(+), 4 deletions(-) > diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c > index 7759144..a9bf8cc 100644 > --- a/net/bridge/br_if.c > +++ b/net/bridge/br_if.c > @@ -131,12 +131,16 @@ static void br_port_clear_promisc(struct net_bridge_port *p) > void br_manage_promisc(struct net_bridge *br) > { > struct net_bridge_port *p; > + int set_all = false; s/int/bool/? [...] WBR, Sergei