From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A7B4C48BCF for ; Wed, 9 Jun 2021 11:23:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1F96A61184 for ; Wed, 9 Jun 2021 11:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238992AbhFILZs (ORCPT ); Wed, 9 Jun 2021 07:25:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237376AbhFILZo (ORCPT ); Wed, 9 Jun 2021 07:25:44 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88A00C061574; Wed, 9 Jun 2021 04:23:35 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id b145-20020a1c80970000b029019c8c824054so4022308wmd.5; Wed, 09 Jun 2021 04:23:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=hl0ZlS/jy+ohwp7UBTSA1Y+yafFiV6jTfgi2KCYzcQ8=; b=iI9oYwaDV4ODVFV6tDx3Xs+W1u21EiUw0OcZasu9pfTx5QzwGIxbhs4PlxOrmCSGEv mchRC8LEgGC9e7VPX/FXEfETwbs7gNHAb+Zs490L/CmTD/b6RSc+dmxk2JVKGsAx1yQE 01uNgtcDSaXKlL+BsJQCyZ+6eaUmGFlWNCYcpHtCrmUFa/SIbg9iScmLyBMov+OjAOp/ QFrkM9qHU+ZJpHyXOEqBnh5eNarsZSe4VfOVnKLWra2mCebazVsQkaDCixESUMcknALZ AgY0jmBBVct4dicL2gLlXfWsJn44g37eIaQq/UCvdlilxR85glrPJO0cnBfLjCh8S+oJ h9jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=hl0ZlS/jy+ohwp7UBTSA1Y+yafFiV6jTfgi2KCYzcQ8=; b=kTuNlnrXuS/wN1VlEo7/ytI8POTmhO38TMuKuJ+s12eQGccn4F+bXS/U2WwggxEIrp +Jg8DFsqWDCUgxwfSb6HkAmOGhcxvyLxBLWEQOaqexS7YGTit7aERmNwP5FhSfd9t7V2 b1KAO6YbVGXjalPosQHR3spkSfBHZmggkb3TQaB4okxTEsuKrRt65GrmZK3wX+9B3vuj XILUuMhfoBRsSsx0PndX6tV4ey1BcpNL5GjhtPuuvdTgc9ovzcfApfZO97FQ61cdocB0 TjMsa04StC6h91JOku9KgnKIQih8LbdE416Hx6U06e4zH1kadFOnAbP44lsQ1Bk6isJx sVcQ== X-Gm-Message-State: AOAM531kRMk1Pge1xYBxP2CbnF8MXdFBY17TWIIJsv+VQ2NLjO2z4ov0 e0oJ5LgLWTegWB2zmT0ck2L74V3t+rCjYQ== X-Google-Smtp-Source: ABdhPJxqp8aR45xOonTijKKA+I0mVtkltfR3tyB828cRGq+lHr/6bqjldW8ADyoVMS91XVwBnh7nfw== X-Received: by 2002:a7b:c106:: with SMTP id w6mr26762890wmi.75.1623237813867; Wed, 09 Jun 2021 04:23:33 -0700 (PDT) Received: from localhost.localdomain (haganm.plus.com. [212.159.108.31]) by smtp.gmail.com with ESMTPSA id t4sm23787947wru.53.2021.06.09.04.23.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Jun 2021 04:23:33 -0700 (PDT) Subject: Re: [PATCH net-next v2] net: dsa: b53: Do not force CPU to be always tagged To: Florian Fainelli , netdev@vger.kernel.org Cc: Andrew Lunn , Vivien Didelot , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , open list References: <20210608212204.3978634-1-f.fainelli@gmail.com> From: Matthew Hagan Message-ID: Date: Wed, 9 Jun 2021 12:23:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210608212204.3978634-1-f.fainelli@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 08/06/2021 22:22, Florian Fainelli wrote: > Commit ca8931948344 ("net: dsa: b53: Keep CPU port as tagged in all > VLANs") forced the CPU port to be always tagged in any VLAN membership. > This was necessary back then because we did not support Broadcom tags > for all configurations so the only way to differentiate tagged and > untagged traffic while DSA_TAG_PROTO_NONE was used was to force the CPU > port into being always tagged. > > With most configurations enabling Broadcom tags, especially after > 8fab459e69ab ("net: dsa: b53: Enable Broadcom tags for 531x5/539x > families") we do not need to apply this unconditional force tagging of > the CPU port in all VLANs. > > A helper function is introduced to faciliate the encapsulation of the > specific condition requiring the CPU port to be tagged in all VLANs and > the dsa_switch_ops::untag_bridge_pvid boolean is moved to when > dsa_switch_ops::setup is called when we have already determined the > tagging protocol we will be using. > > Reported-by: Matthew Hagan > Signed-off-by: Florian Fainelli > --- Tested-by: Matthew Hagan