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=-5.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_MUTT 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 807DAC28CC3 for ; Fri, 31 May 2019 14:38:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 586E426ABD for ; Fri, 31 May 2019 14:38:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="0bEtsjft" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbfEaOiI (ORCPT ); Fri, 31 May 2019 10:38:08 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:44866 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726550AbfEaOiI (ORCPT ); Fri, 31 May 2019 10:38:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=tazGyoINDtGJDhMyeZiXu50p40iBVItCCWyPxYp1J44=; b=0bEtsjftZRI57pW96xurs+QNWH uL69zm/Rupsxy+Gb4/ZkKsXh/py+ygqkMY6C2AlcVszodNm5TRXWwog0X0PLmB9g8jrgMlyOXlxfq U66sudJsfecbf7suciGZA/1jXvhzje/FJ+Z4IEkJQLBksg0LzfedzzAmSf0uNqkqzxvA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hWifO-0006eu-Ph; Fri, 31 May 2019 16:37:58 +0200 Date: Fri, 31 May 2019 16:37:58 +0200 From: Andrew Lunn To: Vivien Didelot Cc: Nikita Yushchenko , Florian Fainelli , "David S. Miller" , Heiner Kallweit , Marek =?iso-8859-1?Q?Beh=FAn?= , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Chris Healy Subject: Re: [PATCH] net: dsa: mv88e6xxx: avoid error message on remove from VLAN 0 Message-ID: <20190531143758.GB23821@lunn.ch> References: <20190531073514.2171-1-nikita.yoush@cogentembedded.com> <20190531103105.GE23464@t480s.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190531103105.GE23464@t480s.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I'm not sure that I like the semantic of it, because the driver can actually > support VID 0 per-se, only the kernel does not use VLAN 0. Thus I would avoid > calling the port_vlan_del() ops for VID 0, directly into the upper DSA layer. > > Florian, Andrew, wouldn't the following patch be more adequate? > > diff --git a/net/dsa/slave.c b/net/dsa/slave.c > index 1e2ae9d59b88..80f228258a92 100644 > --- a/net/dsa/slave.c > +++ b/net/dsa/slave.c > @@ -1063,6 +1063,10 @@ static int dsa_slave_vlan_rx_kill_vid(struct net_device *dev, __be16 proto, > struct bridge_vlan_info info; > int ret; > > + /* VID 0 has a special meaning and is never programmed in hardware */ > + if (!vid) > + return 0; > + > /* Check for a possible bridge VLAN entry now since there is no > * need to emulate the switchdev prepare + commit phase. > */ Hi Vivien If we put this in rx_kill_vid, we should probably have something similar in rx_add_vid, just in case the kernel does start using VID 0. Andrew