[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<MWHPR1801MB1918CFDBEC70A298A3781945D3432@MWHPR1801MB1918.namprd18.prod.outlook.com>
Date: Thu, 1 Feb 2024 09:35:15 +0000
From: Ratheesh Kannoth <rkannoth@...vell.com>
To: Simon Horman <horms@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Sunil Kovvuri
Goutham <sgoutham@...vell.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>,
"bcreeley@....com" <bcreeley@....com>,
Subbaraya Sundeep Bhatta
<sbhatta@...vell.com>,
Geethasowjanya Akula <gakula@...vell.com>,
Hariprasad
Kelam <hkelam@...vell.com>,
Suman Ghosh <sumang@...vell.com>
Subject: RE: [EXT] Re: [PATCH net v3] octeontx2-af: Initialize maps.
> From: Simon Horman <horms@...nel.org>
> Subject: [EXT] Re: [PATCH net v3] octeontx2-af: Initialize maps.
> > /* Alloc memory for saving entry to RVU PFFUNC allocation mapping
> */
> > mcam->entry2pfvf_map = kmalloc_array(mcam->bmap_entries,
> > - sizeof(u16), GFP_KERNEL);
> > + sizeof(u16),
> > + GFP_KERNEL | __GFP_ZERO);
>
> Hi Ratheesh,
>
> The use of bitmap_zalloc()/bitmap_free() looks good to me.
> But for the kmalloc_array(..., GFP_KERNEL | __GFP_ZERO) cases I think
> kcalloc() is the way to go.
Kcalloc() is a wrapper around kmalloc_array(). Why do you think kcalloc()
Is better ?
Powered by blists - more mailing lists