Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp333908rdb; Tue, 16 Jan 2024 01:26:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IF4Y/ApwxBr3s0QjeLHd74fX3KCc5gQGGYEVgsIGB0eK/Edn4lyVYRMP/vC+efi2p3IXaxQ X-Received: by 2002:a05:6a21:9811:b0:199:804c:70c0 with SMTP id ue17-20020a056a21981100b00199804c70c0mr7613545pzb.56.1705397200487; Tue, 16 Jan 2024 01:26:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705397200; cv=none; d=google.com; s=arc-20160816; b=WhHewvuNpKW11jpMnE1Jrpn+fgWqVqXE8dsN02MP+uCJKJkPqtppystCzOewR24lsa IhzTZD0HutzMWik2mVSClaOlWIRuTjWQqp8LPchtYCxAVqfY0Cbu5cWnr3qWQhBBS9ZT LMyf3ocomzSFE444CKnIVnDp38H7O5o4Lq+VwNAG0hUVCUOeROMVp3wclKc/2eJeC5aI MbIVgm0iL6fHcTRJ0vn7JAK1SIrBl/h7S2tEIboZWK5tcPPHOWKC7H1vOkxa9eA2itKz R3/Mcqrzqqjesg0Ub13uHf1ADJiGcHtKvS4WpwNN+BfZiF/MNrKCXUc6uzDUHfP+JAaE tahA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender: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=9AcTE6fHCMnU430YmN95iQmPujpuIuN4C1DpdMpZauU=; fh=QhU1SHXS17RKNt72Hl6SP4/9jrvOuqFT835pFCcQpZo=; b=LHElkOhmYIYEQeXGOH9qc+XdiO+cUtjDhZ8C4/F6nrFFt4jYLj3vXJttJmk7XZ0+uW usZnzsgfvdLVa9yhG/94ZgFial/EBwQuM+/AfwpnRMfAJoJKhnBSuFL0+S+1dXR+V5+E hwaNza3pASFuKx4Bc/HueRXIg3ATede67Ov9AZJGR/9oFouOhQygBMWnYOil0oFrYI92 wF+Fgkl03Uj2rlMmNd0HrnCjQcDQnqv4DFVrEB+VJM+XNiLuEdg81TB9X3ifAWkdm0Qe I4tvt7l0X0Q3QPnuomjITfnG0qBw6vT1jZEyt19DojWnsHEUDzm05TjKM3UAGJO613j6 5nDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=DtxFLmZn; spf=pass (google.com: domain of linux-kernel+bounces-27169-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27169-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p26-20020a635b1a000000b005cee178fe54si10791576pgb.222.2024.01.16.01.26.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jan 2024 01:26:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-27169-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=DtxFLmZn; spf=pass (google.com: domain of linux-kernel+bounces-27169-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-27169-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk 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 299A0282BEC for ; Tue, 16 Jan 2024 09:26:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D92AC12B82; Tue, 16 Jan 2024 09:26:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="DtxFLmZn" Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (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 9D82D134A0; Tue, 16 Jan 2024 09:26:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9AcTE6fHCMnU430YmN95iQmPujpuIuN4C1DpdMpZauU=; b=DtxFLmZn0JKnbACsWiwlPC2A5Z tUJwvvDgXS7AOB2TfgJ7J9RER1b22R/uUY6RCBqIfj6pBcaI5R1BGj3LXohumWmCf90Kc17yQXo+y 5tu/u6Zy/jWxSQCTBg7qc7NpCbdXsZyzjvSUpLbrpuiNR1+rdM2v9KNSaqciyPzDscwEA4cdOsYk1 99E1WO8gltQu0VaOeShTnMGSwsS6FJB1fpsj01zKFf7JjxAeRPzpWalW0LYOOwG4GE8nVi80VjITs F+qwlZn8OccXyI5m50677HrgaIFs7y2Df6o6Zy0vwKGtG7U8rRaum5hTAjCANAyqcePT5XFuOtXQ8 L8QtZqPA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:45646) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rPfi6-0003FM-27; Tue, 16 Jan 2024 09:26:18 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1rPfi4-0003le-Ax; Tue, 16 Jan 2024 09:26:16 +0000 Date: Tue, 16 Jan 2024 09:26:16 +0000 From: "Russell King (Oracle)" To: Jenishkumar Maheshbhai Patel Cc: marcin.s.wojtas@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] net: mvpp2: clear BM pool before initialization Message-ID: References: <20240116055754.279560-1-jpatel2@marvell.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-Disposition: inline In-Reply-To: <20240116055754.279560-1-jpatel2@marvell.com> Sender: Russell King (Oracle) On Mon, Jan 15, 2024 at 09:57:54PM -0800, Jenishkumar Maheshbhai Patel wrote: > static int mvpp2_bm_init(struct device *dev, struct mvpp2 *priv) > { > enum dma_data_direction dma_dir = DMA_FROM_DEVICE; > int i, err, poolnum = MVPP2_BM_POOLS_NUM; > struct mvpp2_port *port; > > + if (priv->percpu_pools) > + poolnum = mvpp2_get_nrxqs(priv) * 2; > + > + for (i = 0; i < poolnum; i++) { > + /* Make sure about the pool state in case it was > + * used by firmware. > + */ > + mvpp2_bm_pool_cleanup(priv, i); > + } /* Clean up the pool state in case it contains stale state */ for (i = 0; i < poolnum; i++) mvpp2_bm_pool_cleanup(priv, i); Doesn't need quite as many lines! -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!