RE: [EXT] Re: [PATCH net v2] octeontx2-af: Initialize bitmap arrays.

From: Ratheesh Kannoth
Date: Mon Jan 29 2024 - 21:41:18 EST


> From: Brett Creeley <bcreeley@xxxxxxx>
> Subject: [EXT] Re: [PATCH net v2] octeontx2-af: Initialize bitmap arrays.
> > --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
> > +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
> > @@ -184,11 +184,11 @@ struct npc_mcam {
> > unsigned long *bmap_reverse; /* Reverse bitmap, bmap_entries =>
> 0 */
> > u16 bmap_entries; /* Number of unreserved MCAM entries */
> > u16 bmap_fcnt; /* MCAM entries free count */
> > - u16 *entry2pfvf_map;
> > - u16 *entry2cntr_map;
> > - u16 *cntr2pfvf_map;
> > - u16 *cntr_refcnt;
> > - u16 *entry2target_pffunc;
> > + unsigned long *entry2pfvf_map;
> > + unsigned long *entry2cntr_map;
> > + unsigned long *cntr2pfvf_map;
> > + unsigned long *cntr_refcnt;
> > + unsigned long *entry2target_pffunc;
>
> I'm not sure you want all of these at bitmaps? It was recommended to use
> bitmap_zalloc, but that was specifically for the bitmaps.
Sorry, I didn't get you.
Bitmap_zalloc() returns unsigned long *
"unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags)"