Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp327564lqp; Mon, 10 Jun 2024 05:38:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWfiddAm3/qEPeaXdZmYTTcmvWXHrgmcKaelcTsF677DW/5ImpGzvgdMFXG4puPow5LuyojziQuKSXHWWkOD2AMHilO0O7jJotATlwkqg== X-Google-Smtp-Source: AGHT+IFu8VRoirO8hJ2zQDjuIoa/RFImHLzwEZu6QWImV/mrsh32kcPl2Ix59FENhnrPYBvR1ZPB X-Received: by 2002:a17:902:e80e:b0:1f7:1579:6d9e with SMTP id d9443c01a7336-1f715796f22mr27303935ad.58.1718023135463; Mon, 10 Jun 2024 05:38:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718023135; cv=pass; d=google.com; s=arc-20160816; b=UeVvixQFQR10NReynLmo7ECuq1MnOWEk5T/5oOmfhahs/0W94uFgx5NoW5kMgixp0W lzmG5OfpSxqddho77L8mRQJEpT3en7Yek574zyMg5t/EMbQMR24DuZFeU8Zw1vRtXFbJ NtUCoemSIv+yjBicom1eddEQFtncrsTCZJsfG2RwpNuOEqhzZ4AxBNsTj+6XKGFCy866 SQd+kEA91/kCYMSFchbnSFrsjdzo7L3tYxq/OmEIjvW8389fAxpn7SYSvzm5ovC6naMP wv6qArkqmlmvChN/N0LwXpydLH+TR7ZlibOl4HUBW/2YVKkVBNhV96RuYROVRyJqsYnL 8G5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MQkiYaJ4TVVyUT+MXJZg/wmEgVdFmPfhNbXdXG7OKQs=; fh=X7pgLUwGnaVwDwCKRrefXuE8CTBYURyXOH3rREO03NA=; b=TFNyAAxFcIJLpc6UzNzYHOVTF+c1eu5gl+7K1Hra5qUBV/Cz3oYkIv2xo08zMVf32Y L+rGJXx28zVnrwwSkgnBftfdTiapQFNrHkcgh1CTVP5aPeNe1W5I4ijWJmYoxAj/dftS +0dWpHpCOB/HRB3am0KTH92KDmKoWMyLtTsBpGMO7qIvrmeQDqa/4eC8N4ifG65z3Rtg KvTK+/qJWRCRW9IZG9ddXjgd+i8spUrW3LKx2fNztxRyTJ1nhEDIOKJJ16rfb7WVdsZ+ hHpO38kKgr68Tfkz98/IiKi0vMcxdGPB6HappphMKIfPlguHbMSaFBn4uCMQE1M1Sih2 jwhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="LR97d/lE"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-208154-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208154-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f70e644494si21547665ad.475.2024.06.10.05.38.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 05:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208154-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b="LR97d/lE"; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-208154-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208154-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B2B65B25B7F for ; Mon, 10 Jun 2024 12:24:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CB367FBC3; Mon, 10 Jun 2024 12:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="LR97d/lE" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 A33CF77113; Mon, 10 Jun 2024 12:24:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718022252; cv=none; b=AwJv1pK9Oc3tGOgp/Mp95A1b+36aQHtTPIh4h5iS6V4PEvFWZNfS7uZI6aoSOaXxjW/IpNuVFfHtJv+eb/ya0QqVThmr8VDG/3Uqf/jvYIbXKWHXBmIyIFeBVHIqTSskJc+uN2KKGKIMbtQayE9e1jGMyoKU5rUaT/abogY7dIg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718022252; c=relaxed/simple; bh=WxBt1LYI+G8crvipEAQbHlrmLEJVwJgdrizF3CAAUZI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sSsJX0wk/Y79AYfZULOfIlIpILeRs6T6OHwXmdHldXH8g8pIl+I57HOJq6Rp6k3FcDbup5Bu1QINkhIGN68L7fQAG5nQn88g9o+CszVgfcGzmpzgycR6u5Mb7jzOfVgqj3OcfAZeB9cwfLhC7fc78RNkdi+SCcu79jA6TR2+B8I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=LR97d/lE; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=MQkiYaJ4TVVyUT+MXJZg/wmEgVdFmPfhNbXdXG7OKQs=; b=LR97d/lELyX/p5wMACCy8eJYo2 M/IrKN2DJofb3y4zUQ08h0xxTRK7wQKHCldVQichbVWsMIQ3lo4wRSL8HF2TpPSVftJcsZtPE2Ves GB95sh1rJ3yDwtvpWZL/p9BqOR5jAURrdQ2syYzskezF3J/uXU0Xt4pGx/ZBmxoHmaVo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sGe42-00HILq-Pt; Mon, 10 Jun 2024 14:23:54 +0200 Date: Mon, 10 Jun 2024 14:23:54 +0200 From: Andrew Lunn To: Aryan Srivastava Cc: Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v0] net: dsa: mv88e6xxx: Add FID map cache Message-ID: References: <20240610050724.2439780-1-aryan.srivastava@alliedtelesis.co.nz> 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-Disposition: inline In-Reply-To: <20240610050724.2439780-1-aryan.srivastava@alliedtelesis.co.nz> On Mon, Jun 10, 2024 at 05:07:23PM +1200, Aryan Srivastava wrote: > Add a cached FID bitmap. This mitigates the need to > walk all VTU entries to find the next free FID. > > Walk VTU once, then store read FID map into bitmap. Use > and manipulate this bitmap from now on, instead of re-reading > HW for the FID map. > > The repeatedly VTU walks are costly can result in taking ~40 mins > if ~4000 vlans are added. Caching the FID map reduces this time > to <2 mins. How long does the first walk take? Rather than having fid_populated, i wounder if the walk should just be done in mv88e6xxx_vtu_setup() or mv88e6xxx_atu_setup(). Andrew