Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp697867ybi; Fri, 31 May 2019 07:39:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNKD79PI4jhC1RvcMLblEFoUfu7xcIrxfwpH69GCJgwVxpwRo6CqmIV5Y96d/uuPs0UrAJ X-Received: by 2002:a17:902:e48d:: with SMTP id cj13mr10114620plb.156.1559313579054; Fri, 31 May 2019 07:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559313579; cv=none; d=google.com; s=arc-20160816; b=B6QrBRFCV7bbW/8dyU9knQF61J2qTHkGxMTRg2J4vGLOLzBcsEOpXHEDTK01dIc/4o I9QWzSy7T9e0ACvIvihk61k4H9okJYgjupVqDVJoQULVrSJhu6R4ZET6p4JCN+wbVGFg tJqWbi9V87wfaPR5Jc/PyI1TsSrp3I5G3ljgA0F2CYj96RxNiayK+Rrn5AzKhddjwpDS akjPNkrldpEaWb1DyxN0bX/9HQCQjpih/krgvV6UNx5JQLqEq+Or+UBI/6FmQHbiypMi OK+wu47CjPSRgIbaPeB0bJrRORCFoWhXU2HVB5IOQI4G235DQNIIvACpJ/6lX5X42B5X yAqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tazGyoINDtGJDhMyeZiXu50p40iBVItCCWyPxYp1J44=; b=rxaQ9JKekCW+1WbelQ2g3Bxr+sh2ZPCT3xVLgRMLDmFEGJEnT+C85MNq6yps7zMdrZ KAss3Hl4B+WEx27quW02qymT7TdjrAQ8UCUhbd23/ldI+zwF0bxPuZ0NIZlwLKfQHeAK N0+zaB+8GKnStQFccQEBQKFTa9dTWub+0a1DL+NT1KqAIQ6mEJGDcLrLUsWoxWOHZ+vf GPns29YanlY3K4SME3zUWPZdSxMX95kXyVCuIJsiuNCUfFrjzkW8dm2fVLqTvh7m4xYO lprfw4Bni0U/YGAWmB7HfjhiEIHHr1DXTAzEvEZ9OrRWMvlFjE0Lx1V/6N7EppvpjcMX bMAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=0bEtsjft; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si7172762pfa.36.2019.05.31.07.39.21; Fri, 31 May 2019 07:39:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=0bEtsjft; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbfEaOiI (ORCPT + 99 others); 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