Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp772316pxk; Wed, 23 Sep 2020 16:09:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFnAgklltxudnUcYXTPY/rzop2EOLcGoVmHDMU3S3P4C+Vsxmy140gXXDy6fYr/Hp6iSwZ X-Received: by 2002:aa7:c1c3:: with SMTP id d3mr1743108edp.228.1600902588386; Wed, 23 Sep 2020 16:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600902588; cv=none; d=google.com; s=arc-20160816; b=wyMS1gZwCgQgc7/fOfombv42VqTA+nnsqAuSF6uu9qcXeepg26SLENjlp84qCZgu2+ l/HJD8BCz8KtgaR9f4pUcuKj+mwKUETd+O3aebzBt99s24isqnSbdAzu8H9ucB/g9KjS iSwyhbUdLsS9HN7o9r+a65xgGY2osrGgbEEpIwMtalMnlUc+dm7w/wUfiHt5v0vs1S+Y CKOVxrbJkPMm+0gJANril2OP8Bo8tno7LgKSSP5hNvbSFvVo78cSY3E/BveSJav9+p4Z 07ibEtOkkGkPnvwr760tZw8c2WJhWK83/7y6+XNpg1aLg2Gpl5Cb45w8T8RaEMKYn+qA W/GA== 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=IAy0QwQl6xkzL0NCAdLvGQ/0DcJiv+LYgD+PMok7G3w=; b=EGMkIEwf0DdrZxevo5A7ud26WTBKSgAjZ1DIigXwi49nYWa0jtVdE07CQx8bWI84nt rvbfcnfRNxOT99M+MsocFld9UhRqN1V5D05mt8S/kxVgGVHnPLozBch+XaexJPR0fWsZ enZOiWRoxmXdjm1/gIt/lmw1jTkmQ/6/oPt1X25RAmDSbfvZc6lS/JlnLrBX7U0weUR3 08tIWgNmBG0BmpQ118ovjIFNSU71KDfwbbm5YyB4I8l2H6oiAd+THE7EJtrDyT8tlFWH x1AVfpZynJDxEX3p3d0HEtvU9SaO4Nfp7i6SGbLtucOBlxBEicRZsHeKNcmjQF6+s17r 5h3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZQ+uplBo; 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 y14si855821edo.347.2020.09.23.16.09.24; Wed, 23 Sep 2020 16:09:48 -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=ZQ+uplBo; 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 S1726599AbgIWXI0 (ORCPT + 99 others); Wed, 23 Sep 2020 19:08:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbgIWXI0 (ORCPT ); Wed, 23 Sep 2020 19:08:26 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51387C0613CE; Wed, 23 Sep 2020 16:08:26 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id r7so1819814ejs.11; Wed, 23 Sep 2020 16:08:26 -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=IAy0QwQl6xkzL0NCAdLvGQ/0DcJiv+LYgD+PMok7G3w=; b=ZQ+uplBoQxl305aeBTUD8IGI+hN6Bc9bVDM96rZ1Bjoe68dZJO1ooGl66SWwMFq/9o yGiTqIMbkgwzckLnZusUqSQT6nEGGENuMHxxbrTQmxXH6EWr1rSGxDG/Uu3F9osqgiFv A6F10RE5kIZc6o3S6p3RRoYwVDoGdrOz8wxTCyafoka63WF8xqadyfEAN2M83uQ1uENo 9Qob35FKMb0xEQ/41nETiTeY7ElLnr+wXsfKh2m4L9TO6lxq1YIzlK9iq2F8UvnCdBMA jgFIY0cagg7COszeu94jE41CBnUOdZaFNHaBIjL8R1Anit/GNfA9TI6cbbgfYMKPVwmc 2pGA== 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=IAy0QwQl6xkzL0NCAdLvGQ/0DcJiv+LYgD+PMok7G3w=; b=YCFWSsKTLGPeb4ZxfDC3p9EfVSeyE+fUVgX6IoBd19r2eKj/+TNHFRocE/bKIEDSFe Q6SdQWyvOV9jdr5gLvHhDnIHONB6zoELjONFY8fG8ceEW7Vwt6bilkwyCywKJflYVMZa +Z+L3fx6kP73/ERKgt6ilLxPVxeN1+QxDQGibNXYdPmmWBmlPONKMMni1a31Zff/pQrG 6L/UFzzFUxgWVHv/VbJg15isAmxhCRD0eP3KI7idIL77cIFTwas4UKfRDNowRygQVZe1 2jUf7O8+rQLhJHFYYSD7+7cX3JiNpnWh+7ldPiElUcRvUsxxyvjM/aj796KHOvxqXWE5 Ax2w== X-Gm-Message-State: AOAM531OeXFIV3FOEyAlOaLl6pfdkneMLpm+J/f/d+ZSdzt4QNPpX0RM wsi4Rio9g0imc4e7NPrSPf0= X-Received: by 2002:a17:906:ecf1:: with SMTP id qt17mr1941989ejb.158.1600902504785; Wed, 23 Sep 2020 16:08:24 -0700 (PDT) Received: from skbuf ([188.25.217.212]) by smtp.gmail.com with ESMTPSA id b6sm1021960eds.46.2020.09.23.16.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2020 16:08:24 -0700 (PDT) Date: Thu, 24 Sep 2020 02:08:21 +0300 From: Vladimir Oltean To: Florian Fainelli Cc: Vladimir Oltean , "netdev@vger.kernel.org" , Andrew Lunn , Vivien Didelot , "David S. Miller" , Jakub Kicinski , open list , "nikolay@nvidia.com" Subject: Re: [PATCH net-next v3 1/2] net: dsa: untag the bridge pvid from rx skbs Message-ID: <20200923230821.s4v4xda732ah3cxy@skbuf> References: <20200923214038.3671566-1-f.fainelli@gmail.com> <20200923214038.3671566-2-f.fainelli@gmail.com> <20200923214852.x2z5gb6pzaphpfvv@skbuf> <20200923225802.vjwwjmw7mh2ru3so@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 23, 2020 at 03:59:46PM -0700, Florian Fainelli wrote: > On 9/23/20 3:58 PM, Vladimir Oltean wrote: > > On Wed, Sep 23, 2020 at 03:54:59PM -0700, Florian Fainelli wrote: > >> Not having much luck with using __vlan_find_dev_deep_rcu() for a reason > >> I don't understand we trip over the proto value being neither of the two > >> support Ethertype and hit the BUG(). > >> > >> + upper_dev = __vlan_find_dev_deep_rcu(br, htons(proto), vid); > >> + if (upper_dev) > >> + return skb; > >> > >> Any ideas? > > > > Damn... > > Yes, of course, the skb->protocol is still ETH_P_XDSA which is where > > eth_type_trans() on the master left it. > > proto was obtained from br_vlan_get_proto() a few lines above, and > br_vlan_get_proto() just returns br->vlan_proto which defaults to > htons(ETH_P_8021Q) from br_vlan_init(). > > This is not skb->protocol that we are looking at AFAICT. Ok, my mistake. So what is the value of proto in vlan_proto_idx when it fails? To me, the call path looks pretty pass-through for vlan_proto.