Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp7127760pxv; Fri, 30 Jul 2021 10:37:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJycGsqZp2IJMzPG8o1nWAfq3q+DhatuuMW+VqSC/YwaJhpCYRRDsB6+afwhXJU0LIxYa+HM X-Received: by 2002:a05:6e02:d09:: with SMTP id g9mr1968752ilj.153.1627666664987; Fri, 30 Jul 2021 10:37:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627666664; cv=none; d=google.com; s=arc-20160816; b=bzU09ud0hEVyzjN4EGjcOCMGREl50jPcoS+QjBeqCju0zLr8BlCso2Tv3LDhEvILlR SFIucLtJ/nBnXw0NXyAJ2WnDxF3WHI7FL1VardQPhcNgcSl/tydKC6sgT1NJF+M7GMwO /MHg5y4RsktHa/jLBKX+Mi2431NvE6qzas5Hc4uRjH70LDJCH5CqER6JChiOrDn19XGg IJsgAW8mKopEfzU+V4uQiQPO4DH2u1K+Awg2HiXWNcvCUykTk2l2XrDdkEV8ucGXcwxq zwthYsQYo+tAtwgxfGxqCGv4K5qc8R+rgvmMiS+7GXc4Jd+BPJj83zJkKqjXyQS8/j7A P2fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Doj/dcye763oRah83vvNs5pzHAb0NoOee/TncGZwApU=; b=ne0A+jHbqeEe+WRCWQHGw7ed4eTjF+jweUi0o39Nt0lMItpcZTFpUoW9ESBWe6c3RF EdDGBCdVd0Iv7D8ieBfqCfM1JhSye8wBEYkI1MkLrnJMJgO1rLhG9URxGLwT4r1EJkE3 FvqsQDYSQSPPbdZqmEuXoccoX2BZnXwwJk4OGXgJ/ErqdKUX0PFD+886jCzeA6eeYw63 D55M6h6ju00Gy8ggvp7F5zr5rKeBEYLWxS7EUgZIXLbOqjsEtG6SkoIjiGKwxDyikOfX gs6rmzg/UIveN38OMPvnxV407zWUaMLLWPZBtNZhTxhRNmewdjm/3E/0otmiSs+cjuqS +LvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BQg7Dckk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l17si2585014ilt.90.2021.07.30.10.37.33; Fri, 30 Jul 2021 10:37:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=BQg7Dckk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230117AbhG3RfV (ORCPT + 99 others); Fri, 30 Jul 2021 13:35:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbhG3RfV (ORCPT ); Fri, 30 Jul 2021 13:35:21 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56B4FC06175F; Fri, 30 Jul 2021 10:35:15 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id v21so18182294ejg.1; Fri, 30 Jul 2021 10:35:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Doj/dcye763oRah83vvNs5pzHAb0NoOee/TncGZwApU=; b=BQg7DckksWodBw0VQ7WPS4t2HMmrgZ+HfNAu/6WhoBRD0YwS2xvVFwP59v6wjDZcxe wKQO2DB9rWXR5UyTuC3T+0KaypDyuZAhGPyEk0webhsBW4dcFfoSO0ZSGtilfWKtwXwd fw5Fd7AMIFWvsSPXKtQyob0xfiO+S925Xz05Y+jD0w3V2XEYJvDHteBWvxp/Fx0AzMtf 0hZpqnuIP1KH22HtnuX0kz36ulXHzIOYribAhl8SjjtkFWzX0eGuExK6LfsJZ+m70Imp x2EBmf0dpQnKwtkrMZHhBycAkUjA2+el5Iac1fepoQjWZUg2z/lC89lIeEIBTM8g/t42 uToA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Doj/dcye763oRah83vvNs5pzHAb0NoOee/TncGZwApU=; b=B0vyQ1kpPHN7bshIAO7bnBc0jY8xLH8AHiphyPFJ0wkpPQMUm/ocfeXcFdQuSMTm8x MOBY15kIw8Z/ajcFP6ONXl9OFFOS3x7oFBEJi/uFresscUrby4ibqja5OTjUWPwpnv7U DgUyyI1k2UFmtpOHEszJHqsI8J/Am3JdjAiSf5mokzOYdAy4VZNWemsT1e5Fbqp2wO2C OG06Tw1dfBk1QTjUOhRNRbAsPnbo72y+Y+Vye5BlYZ5iusPZNPwneV/opdT0/64B3qAD vosRXl/wvyP5V/emIvR9xGuKzPhIfdnDUAXRhvFx7tX0BWve6mmsc0abhXwpC65bLzG6 uA9Q== X-Gm-Message-State: AOAM532u0kFHbvLGqFr7+S30QwTRHnypkQrOSxpruluNxvTmyroxIbTV HcXyDQoWx00QCOZq6AwnWko= X-Received: by 2002:a17:906:5509:: with SMTP id r9mr3748176ejp.74.1627666513708; Fri, 30 Jul 2021 10:35:13 -0700 (PDT) Received: from skbuf ([82.76.66.29]) by smtp.gmail.com with ESMTPSA id ha26sm778371ejb.87.2021.07.30.10.35.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Jul 2021 10:35:13 -0700 (PDT) Date: Fri, 30 Jul 2021 20:35:11 +0300 From: Vladimir Oltean To: DENG Qingfang Cc: Sean Wang , Landen Chao , Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Matthias Brugger , netdev , Linux ARM , "moderated list:ARM/Mediatek SoC support" , linux-kernel Subject: Re: [RFC net-next 2/2] net: dsa: mt7530: trap packets from standalone ports to the CPU Message-ID: <20210730173511.ulsv7wfogk5cpx5j@skbuf> References: <20210728175327.1150120-1-dqfext@gmail.com> <20210728175327.1150120-3-dqfext@gmail.com> <20210729152805.o2pur7pp2kpxvvnq@skbuf> <20210729165027.okmfa3ulpd3e6gte@skbuf> <20210730161852.4weylgdkcyacxhci@skbuf> <20210730171935.GA517710@haswell-ubuntu20> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210730171935.GA517710@haswell-ubuntu20> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jul 31, 2021 at 01:21:14AM +0800, DENG Qingfang wrote: > I just found a cleaner solution: Leaving standalone ports in port matrix > mode. As all bridges use independent VLAN learning, standalone ports' > FDB lookup with FID 0 won't hit. So standalone ports are completely VLAN-unaware and always use a FID of 0, ports under a VLAN-unaware bridge are in fallback mode (look up the VLAN table but don't drop on miss), use a FID of 1-7, and ports under a VLAN-aware bridge are in the security mode and use the CVID instead of the FID for VLAN classification? Make sure to test a mix of standalone, VLAN-unaware bridge and VLAN-aware bridge with the same MAC address in all 3 domains. If that works well this should be really good.