Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1066414ybi; Fri, 31 May 2019 13:16:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5g3XoQJrrxROUG6RmZ1KNutUToIRdNrwOolowgtyUUqjaXpqXxn7uK8/lAWf7/LYDIWF1 X-Received: by 2002:a17:90a:20c4:: with SMTP id f62mr11669079pjg.16.1559333778952; Fri, 31 May 2019 13:16:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559333778; cv=none; d=google.com; s=arc-20160816; b=a4SxUWPpZiWSrbaIwdsWqVASnGeudGblLhOUJ6/NNyw/wKl2Olzevo6mEBU9Y4Z2Fy rDjehWrPHzUIzHygDrMlN7F5Fqm+gZadA+lQE6HqlvDkklQPlsjrtkAZgRSlix+VPpeO LZX2MisWToLJh8VZk+o/xlVui/A35wWqz/r3iSWDREMSpSpc8a+/ysdDD1boG8PFNtkz DeREJlwrerBOD7/IBI8LyeR6v4VACLHgGKD5ATgidxHcRJFqmhHFBu/ugbrRJ5zu+m+w OQbj/6d47duu/nG89CI6X2jZpvf33Mts/8TVZnkQQ52SaMfREBrv7q5IYk2f9mGgqdNV tcGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:references:in-reply-to:subject:cc :to:from:message-id:date:dkim-signature; bh=SrFrfsFx1qakMW9D7wpc85uiqQlKUf3C8E4XcNEoPmc=; b=w0LNJ4rrNWZvsY7jkkVPfdBK2wKcDLi7+TBLqL8R9yCZkXfG6ky5DOwuMTypsTnaGq aUBmS9iyG26yvp6IzjXdA7LGwY9SLnG4gtYJv/aDaDPi8hGIP8667+Eb4Va60c5KnQ23 eWZDw/znpDA7AYc95ujFlOnCWNxCeRRipbtjQatrZF/5rap71ceX1Sng47Vw7IEOPkCI MG73cdJIRKe6ASHPb3L+ZfR5VG+UfEkTugGHB6PSL1ZdHk1XCLwfXGPmCIpJ7sqDdTJz qCEONtztuwBUMq0C59khaj+rS2KhOqc8nPrVaDbpaKw8GxJC95345waQM8/krdKlwip1 wLJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=l0uJ75nG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bx7si6724581pjb.93.2019.05.31.13.16.03; Fri, 31 May 2019 13:16:18 -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=pass header.i=@gmail.com header.s=20161025 header.b=l0uJ75nG; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727463AbfEaUOz (ORCPT + 99 others); Fri, 31 May 2019 16:14:55 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:34186 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbfEaUOz (ORCPT ); Fri, 31 May 2019 16:14:55 -0400 Received: by mail-qt1-f194.google.com with SMTP id h1so2492744qtp.1; Fri, 31 May 2019 13:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=SrFrfsFx1qakMW9D7wpc85uiqQlKUf3C8E4XcNEoPmc=; b=l0uJ75nGyJKjmtLWNYsS0VZObEvCGwf+J9e4r/jXY6r91rlwYgvvhJzc40BdKgRmey vREsUGni4pvspThS7IhDvb2GRbwh8ao1t7sFhXj7t/taMVAAP+bTIrighTsiyaZcIiFq uZE8n7mSOElvcY9g+Vr5cYBJzAdEJ8Z9i1pqcH2nnm730QTptgq/DlQsf6516EReRRbF C4tEX7KPix6t3qoyxaHeY9rmCHNnTO9xUVIRbcrM5Ra3vUy5KHHVKAF5PoIvWscG6SL3 MAf/VOI+tslGHWqIGRIab5b5lrCUqKEW2wcYzAxV2dEUGyZulSzKIE+E2LqZ+svM8FZ0 L8Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=SrFrfsFx1qakMW9D7wpc85uiqQlKUf3C8E4XcNEoPmc=; b=SHcZkaR4oZ9DPyvcjOHBHjVxqQLhwiol1ezcz/05QksoCtZSF9+ycozYM97VOyA++u 1p03FOy+iCLRBwjc/ZjylAAOHKxtIRejP/Q0Htb+9aX8jKBVpTK+DVan9+2UJlfIoCub Q9gafeayuPw9S/LH9JMEmcT3/g2979PzyUaLqr4bM8pjC/p1fRZRWpKEN4/wPArrwU+m Ydr1EvMvNQTQ5Mrv5Jw7anHXPBOPNLhV4ZwNsDhh0u/yh43zWk0Mf0qaslE8NTWY3tOx RD8LsYCdnhpGfN4UtV9sba8Yd2U9NKkl/UErOfqi73BAMU8J0KJ1PmwXrq+tP4/OKVk3 jn5g== X-Gm-Message-State: APjAAAXtbiKKLMFQsNZ/mxMO5E08j6e3O1Pkf4yXPWR8Mb4BFcHewGWm UNpxFKzE1aHkHExgounxQvBKPq+NyMQ= X-Received: by 2002:ac8:45d2:: with SMTP id e18mr8896076qto.258.1559333694299; Fri, 31 May 2019 13:14:54 -0700 (PDT) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id d23sm5836221qta.26.2019.05.31.13.14.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 May 2019 13:14:53 -0700 (PDT) Date: Fri, 31 May 2019 16:14:53 -0400 Message-ID: <20190531161453.GC20464@t480s.localdomain> From: Vivien Didelot To: Florian Fainelli Cc: Andrew Lunn , Nikita Yushchenko , "David S. Miller" , Heiner Kallweit , Marek =?UTF-8?B?QmVow7pu?= , 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 In-Reply-To: <1814b2e2-1a89-89f8-9699-f13df5e826b2@gmail.com> References: <20190531073514.2171-1-nikita.yoush@cogentembedded.com> <20190531103105.GE23464@t480s.localdomain> <20190531143758.GB23821@lunn.ch> <1814b2e2-1a89-89f8-9699-f13df5e826b2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Florian, On Fri, 31 May 2019 09:34:03 -0700, Florian Fainelli wrote: > On 5/31/19 7:37 AM, Andrew Lunn wrote: > >> 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. > > We use the prepare/commit model in the rx_add_vid() path so we deal with > -EOPNOTSUPP, that was caught fairly early on by Heiner when I added > programming of VLAN filtering through rx_{add,kill}_vid. > > Nikita's patcha s it stands is correct and would make both > mv88e6xxx_port_check_hw_vlan() and mv88e6xxx_vtu_get() consistent. OK, I'll double check if I can simplify the management of VID 0 in mv88e6xxx to match what other switches do. In the meantime, Nikita's approach is consistent. Thank you, Vivien