Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2128573lqo; Mon, 13 May 2024 08:34:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVF1w3Z7xYuYcRu2L5qSEOgd0bDU6G9xagwvGzjgA/hx79RcK1q3DpTLvj5Zqle0TuJfyto2DgIXozavPfczcaw1giHLJwR5jxJiMokFQ== X-Google-Smtp-Source: AGHT+IFAFE6M9W50TQBKd8f1o+qMsaHbaN6FWVqefp9b6WzTJ8Pt1oatyDuoEZQCl0kXuOrZgBcq X-Received: by 2002:a17:902:da8e:b0:1e4:48a6:968b with SMTP id d9443c01a7336-1ef43c0cf05mr113776265ad.13.1715614469372; Mon, 13 May 2024 08:34:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715614469; cv=pass; d=google.com; s=arc-20160816; b=zTom3s1C/TS6u2hhMrNtn85xA7FkHCDcxwJjYrNGp5rZ7NOYxjv2sFBBlnynXHZAXw fGy5IW1jC+9t7DTsviCRqX2Vyucdneq8yZLGhh0sHDB28TRgiPlIbANBj3P00Arpj1LI GH8hifqcXVLD51Z9CaYkkM51Ab0ORzfajPJWs0Hr12V2Z6Wdvzajqm/PnpHDduOmZYhW ZRTpszcxcN7CebWO2z55Br3oQEcAQ4UKUBiGjew9/HaNKKrwbDi/Pkr7+i5X0AaiXCwx OTblJASbU20avvhq12t7hlu70x3HMFrMFdWmlp6M4KzcNkzuvH/4LIzGONfico0l1tWd rS4Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=AmdqnkfKM3Yl6vRKrPioK6ibxTkiSZKB606XsZfbJ9U=; fh=AzCQDiBbVwZe23BvNh5E1BI/GAChBNf3SIupFP5g1xs=; b=ShB4bTRNayggDKW/auxLeqPc/WURt3fOAn0AImsgBmaYS9LHM52RM8McmNq5Dr3byl Gx50NlsINlEZOB0bUvLBM4JHUdSBQqcyZODsZu9UwMOh37fYMDQ/ZLpCiaiih0I5tHgh uyDerytAWri4Ct3LPmCM6puLVGUsoGIFsGwB8eZ+x/8NpksJoSGojhdwH+5U5QPkw2DW rBe2w7HHwINr7FiihvXIcoR49fw1olrW6PgQmLxyTJYJ3nc9hJKFzznHlA+GwnEgxVE3 j/5CSGqujw08Ci4tn/uWpYEylas+8LbnKEMangN7G2UELt0BkP8qZDOFRZv91mXMpXIx gsjw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tg9r/kC5"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-177760-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bf32b19si95984825ad.324.2024.05.13.08.34.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 08:34:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177760-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="tg9r/kC5"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-177760-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E9D72282175 for ; Mon, 13 May 2024 15:34:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 393DB57CA4; Mon, 13 May 2024 15:32:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tg9r/kC5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B63414F103; Mon, 13 May 2024 15:32:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715614347; cv=none; b=ftL/cjnCBShE1WfTkukapAAp5PniLMBR39Gj3pVfhX/nmgn2r3+I9X0VzavestHzN4NcfLJLABMei5amrQA1pmyf7VmnrTWMT1F5QwPuhA7E8qmBvyoEDpU1pTpgaf+o7afmhIPcMyaJWy/5/PmcUWtFciQqqufJpy1LEkiwa4A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715614347; c=relaxed/simple; bh=jar4ZIkYznevo+scBPt1nRHEl+qcfb0bftbjz3Sb1yA=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hdKPBpMVMlhgyHzsZdDSvtBHBBGTa2kN0RgF8Dek1B8pkkXLTS9KEBP7l+I878yw4D79OwMK7+RXQw9nF0ar4N3GyVjrh4Vq8kQIHhrFbjYLVQcSdHJky3DipuH55xN5dJW/FGxGyRc74ROKlXgUipiEPJ9y7DhQfewT7DdQd74= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tg9r/kC5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87C2FC2BD11; Mon, 13 May 2024 15:32:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715614346; bh=jar4ZIkYznevo+scBPt1nRHEl+qcfb0bftbjz3Sb1yA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=tg9r/kC5256VEq85o6scWYVAGk1eQYr+jXLK2h0AYpcj1LmRJ2SE1CwIuOU/Z5mMM 8aM2jP9brEUJ4/2pYsbgYTeWmM3GL8QDRln8Y7B6O2VZqP47rOey3zz3lnN6yG+WRm 1PqJV5w8RAcc8xvdIyGPK6vEVON+ol+0OprF5a+6MkuMRlF3E2nOb6A0pwtGx2ZwmM bkUX2JEfRuHTkcM3+AU4hTLVkNxSX6FjJsB6G2QZXaMC7r5DTusWdR1+UDDhCv/D+x lcB3Ooxou2JY2kA6NnyizV4Fxig4Zrbtw7gPpQfMOrsGVmPl1sBQ7H2wPzhaXRXaRf tKRD/7OMhrq7w== Date: Mon, 13 May 2024 08:32:25 -0700 From: Jakub Kicinski To: Josua Mayer Cc: Florian Fainelli , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Paolo Abeni , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Mor Nagli Subject: Re: [PATCH net-next v3] net: dsa: mv88e6xxx: control mdio bus-id truncation for long paths Message-ID: <20240513083225.1043f59e@kernel.org> In-Reply-To: References: <20240505-mv88e6xxx-truncate-busid-v3-1-e70d6ec2f3db@solid-run.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 7 May 2024 12:03:31 +0000 Josua Mayer wrote: > > The idea and implementation is reasonable but this could affect other drivers than mv88e6xxx, why not move that logic to mdiobus_register() and tracking the truncation index globally within the MDIO bus layer? > Conceptually I agree, it would be nice to have a centralized > solution to this problem, it probably can occur in multiple places. > > My reasoning is that solving the problem within a single driver > is a much smaller task, especially for sporadic contributors > who lack a deep understanding for how all layers interact. > > Perhaps agreeing on a good solution within this driver > can inform a more general solution to be added later. I agree with Florian, FWIW. The choice of how to truncate is a bit arbitrary, if core does it at least it will be consistent.