Re: [net PATCH 3/9] octeontx2-af: Do not allocate memory for devlink private

From: sundeep subbaraya
Date: Tue Mar 16 2021 - 14:05:57 EST


Hi Jakub,


On Tue, Mar 16, 2021 at 10:53 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Tue, 16 Mar 2021 14:57:07 +0530 Hariprasad Kelam wrote:
> > From: Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>
> >
> > Memory for driver private structure rvu_devlink is
> > also allocated during devlink_alloc. Hence use
> > the allocated memory by devlink_alloc and access it
> > by devlink_priv call.
> >
> > Fixes: fae06da4("octeontx2-af: Add devlink suppoort to af driver")
> > Signed-off-by: Subbaraya Sundeep <sbhatta@xxxxxxxxxxx>
> > Signed-off-by: Hariprasad Kelam <hkelam@xxxxxxxxxxx>
> > Signed-off-by: Sunil Kovvuri Goutham <sgoutham@xxxxxxxxxxx>
>
> Does it fix any bug? Looks like a coding improvement.

Without this we cannot fetch our private struct 'rvu_devlink' from any
of the functions in devlink_ops which may get added in future.

Thanks,
Sundeep