Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1987326pxf; Sat, 3 Apr 2021 07:10:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyPWm8mk/7cz3UYC/hzV2iW2i09HOoezglC371tUslmSMAJJk7SFEsNpX3oUm2BRubgZEf X-Received: by 2002:a5d:9149:: with SMTP id y9mr14088895ioq.159.1617459008002; Sat, 03 Apr 2021 07:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617459007; cv=none; d=google.com; s=arc-20160816; b=M4Kx03HNZxHRQMCBze10tCz8j27JtwEi/6N8U/kxJOH5ByNCULk8qKlE/iCEpQXCTk zIoM9xvPoZeFXocOcsVH9OLFIlJmdSNBQX/7+JThLx3nPpCk4W80DeNp7fRZLC6mQlfJ XE+NikgtKrtpFez74zG+PmNMk8Rt1oZjYFtMOG0VXhFxVV3WSNf9kSXL2/X8zTOsqylA Uorh7AtQF+95oN4TOvymtxtxyN29mwT7dmXmIfdD0vBQm13inggcPSf4yNUvm2C+yce2 pnvcfRp7lD36mrXv8sp1Bh2xFRau6VvKWxM5/3LKkICbzdzpfqFgD6gUKP4RK4yFDJxP aGWg== 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=Gr5sUZoA0I/5zcq34lqqOFzBvmsdkhLPsA9GdyxgGFI=; b=Va0GoA3q3uEdDVEJlkoRY25b6SY+88Tm7TzWMvM7EPVgpHf+MKbLsh8+bBKQuIW4l8 Dxj4Yx3TJtkgaxnCH449xy9MwynKR71OoWqcuSAe1jUVJDdgKf8kpT3Cj7Fn8oVCcoyT ftbNQjSpPthppaTwghdUYiWh/tklroyxOlTIctandrYBawof5v9/fSO1VnITlIHbwOR5 Bs/VzDlzfducNpum4Zm2j/hsx1KF7xkV9ogXUtejiDr1edp0uFrZgjp9RMU+pSVgGrg6 cAIMFhQE7aEtcW39zoukSddLG1kaYLt3SRtcGcFY9Li7nwQdAAkjXsEfs/Sp0HAoOReS mWTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=STddPVtr; 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 d10si10943174jam.87.2021.04.03.07.09.42; Sat, 03 Apr 2021 07:10:07 -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=STddPVtr; 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 S236590AbhDCOFo (ORCPT + 99 others); Sat, 3 Apr 2021 10:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230440AbhDCOFl (ORCPT ); Sat, 3 Apr 2021 10:05:41 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3F3BC0613E6; Sat, 3 Apr 2021 07:05:38 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id dd20so827838edb.12; Sat, 03 Apr 2021 07:05:38 -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=Gr5sUZoA0I/5zcq34lqqOFzBvmsdkhLPsA9GdyxgGFI=; b=STddPVtr3tIM9EcAZ1GKjQXAeC4jQAjsHB/u02ct35griIwdwIkpArrBgI89Tizykg D7EakXwPWembJzJXiRbr17FehVzY4qHXdHbUlrLeBcgZ5yJrGHKZT/0WG9vZw5m6RYbG LAMyP0miXCn6VsSrR/zd6xEcwNElDc6YXsKt+ydnnjVjNAzMCcdmwVAWaS+o4AFnJ4Oc n1nTyWICDPVlSsTD82XDCzC+v9FiM1yn5tURsvTsiW53on5fcVA+fToJpRxgabxcSL6A w8KQNR3m899mSSyZITudNMz5Z5UP3XpAZouT+Bw0qfoQ+x5i3Ailsp/eOH/kcxXer59l bjTg== 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=Gr5sUZoA0I/5zcq34lqqOFzBvmsdkhLPsA9GdyxgGFI=; b=fToYdskLHx/YWk09gxWaGLlZHKEdJV6p00c0lrnWoFaB3271SpABUZVpWIkg3S+k9B J8vrqqv9WvlsFCcscQNQF1NedZO3UpOGH1kLBI6xE9F3oMz0o3rR13GPMQSRV4NSOBwt PWTUb7sq00ak2g1iYpLewFYJO1t8QZcWiq6lQAt58zgaqBRlKEFvDBsvKbkH8d/x/1f7 GEaEAMj92OJmLY2ZmkINAdhpBFQUnsJWt+jxGDMhZ3Is0M0rduv13vIxS3ciE2mmMYzu dR2BV1d1mcea4dfTNCgCuxxGnQTRDew28nj8Zq7W0FFMFn/FvHBrWHkjtdVXVjCQELKQ YN/w== X-Gm-Message-State: AOAM5329d7+06dLE9BGM774POZU3g0qeQVeovXZ74YvAzSxr4VH3bRVj ebLVeWaOR3YI7x4TR8PpETg= X-Received: by 2002:a05:6402:4407:: with SMTP id y7mr21248404eda.247.1617458736372; Sat, 03 Apr 2021 07:05:36 -0700 (PDT) Received: from skbuf (5-12-16-165.residential.rdsnet.ro. [5.12.16.165]) by smtp.gmail.com with ESMTPSA id h15sm7079339edb.74.2021.04.03.07.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 07:05:36 -0700 (PDT) Date: Sat, 3 Apr 2021 17:05:34 +0300 From: Vladimir Oltean To: Oleksij Rempel Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , "David S. Miller" , Jakub Kicinski , Russell King , Pengutronix Kernel Team , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH net-next v1 1/9] net: dsa: add rcv_post call back Message-ID: <20210403140534.c4ydlgu5hqh7bmcq@skbuf> References: <20210403114848.30528-1-o.rempel@pengutronix.de> <20210403114848.30528-2-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210403114848.30528-2-o.rempel@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 03, 2021 at 01:48:40PM +0200, Oleksij Rempel wrote: > Some switches (for example ar9331) do not provide enough information > about forwarded packets. If the switch decision was made based on IPv4 > or IPv6 header, we need to analyze it and set proper flag. > > Potentially we can do it in existing rcv path, on other hand we can > avoid part of duplicated work and let the dsa framework set skb header > pointers and then use preprocessed skb one step later withing the rcv_post > call back. > > This patch is needed for ar9331 switch. > > Signed-off-by: Oleksij Rempel > --- I don't necessarily disagree with this, perhaps we can even move Florian's dsa_untag_bridge_pvid() call inside a rcv_post() method implemented by the DSA_TAG_PROTO_BRCM_LEGACY, DSA_TAG_PROTO_BRCM_PREPEND and DSA_TAG_PROTO_BRCM taggers. Or even better, because Oleksij's rcv_post is already prototype-compatible with dsa_untag_bridge_pvid, we can already do: .rcv_post = dsa_untag_bridge_pvid, This should be generally useful for stuff that DSA taggers need to do which is easiest done after eth_type_trans() was called.