lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: 
 <PH0PR18MB4543D1F967616763C27EBB2EEC732@PH0PR18MB4543.namprd18.prod.outlook.com>
Date: Tue, 16 Jan 2024 11:42:04 +0000
From: "Jenishkumar Patel [C]" <jpatel2@...vell.com>
To: 'Russell King' <linux@...linux.org.uk>
CC: "marcin.s.wojtas@...il.com" <marcin.s.wojtas@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com"
	<edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [EXT] Re: [PATCH 1/1] net: mvpp2: clear BM pool before
 initialization



-----Original Message-----
From: Russell King <linux@...linux.org.uk> 
Sent: Tuesday, January 16, 2024 2:56 PM
To: Jenishkumar Patel [C] <jpatel2@...vell.com>
Cc: marcin.s.wojtas@...il.com; davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org; pabeni@...hat.com; netdev@...r.kernel.org; linux-kernel@...rkernel.org
Subject: [EXT] Re: [PATCH 1/1] net: mvpp2: clear BM pool before initialization

External Email

----------------------------------------------------------------------
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!

I will address the comments in v2

--
RMK's Patch system: https://urldefense.proofpoint.com/v2/url?u=https-3A__www.armlinux.org.uk_developer_patches_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=weFk2fYEO0yNIZAlSXwm82u5QM08YlNJaQ39RhfTtUo&m=2U4cWAQSanajVfFvpZbZdhHMcQ4rsCILgPZ1Nk_k-CE3HMuIv3y5IPWQ4KgdJgAG&s=IbrApY-e2TWgCw8YQJc7W48jpUGy29BTy_MfcTkwQ8I&e=
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ