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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 23B0AC433DB for ; Tue, 23 Mar 2021 12:42:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9D4C619B9 for ; Tue, 23 Mar 2021 12:42:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231305AbhCWMlm (ORCPT ); Tue, 23 Mar 2021 08:41:42 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:42762 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbhCWMlK (ORCPT ); Tue, 23 Mar 2021 08:41:10 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lOgLJ-00Cayl-5z; Tue, 23 Mar 2021 13:41:05 +0100 Date: Tue, 23 Mar 2021 13:41:05 +0100 From: Andrew Lunn To: Tobias Waldekranz Cc: davem@davemloft.net, kuba@kernel.org, vivien.didelot@gmail.com, f.fainelli@gmail.com, olteanv@gmail.com, netdev@vger.kernel.org Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol Message-ID: References: <20210323102326.3677940-1-tobias@waldekranz.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210323102326.3677940-1-tobias@waldekranz.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Mar 23, 2021 at 11:23:26AM +0100, Tobias Waldekranz wrote: > All devices are capable of using regular DSA tags. Support for > Ethertyped DSA tags sort into three categories: > > 1. No support. Older chips fall into this category. > > 2. Full support. Datasheet explicitly supports configuring the CPU > port to receive FORWARDs with a DSA tag. > > 3. Undocumented support. Datasheet lists the configuration from > category 2 as "reserved for future use", but does empirically > behave like a category 2 device. > > Because there are ethernet controllers that do not handle regular DSA > tags in all cases, it is sometimes preferable to rely on the > undocumented behavior, as the alternative is a very crippled > system. But, in those cases, make sure to log the fact that an > undocumented feature has been enabled. Hi Tobias I wonder if dynamic reconfiguration is the correct solution here. By default it will be wrong for this board, and you need user space to flip it. Maybe a DT property would be better. Extend dsa_switch_parse_of() to look for the optional property dsa,tag-protocol, a string containing the name of the tag ops to be used. Andrew