[PATCH 02/10] net/nfp: fix malloc name problem in secondary process
Chaoyong He
chaoyong.he at corigine.com
Fri Oct 11 04:31:03 CEST 2024
> On Thu, 10 Oct 2024 17:17:08 +0800
> Chaoyong He <chaoyong.he at corigine.com> wrote:
>
> > The original logic keeps using the same name parameter when malloc
> > memory in secondary process, which may cause error when using multiple
> > PF cards.
> >
> > Fixes: 3b00109d2b65 ("net/nfp: add PF ID used to format symbols")
> > Cc: peng.zhang at corigine.com
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
> > Reviewed-by: Long Wu <long.wu at corigine.com>
> > Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
>
> Huh? the name is ignored by rte_malloc(), it only shows up in tracing.
> in fact you could just always pass NULL.
Yeah, I have learned this from some patch thread.
I will choose using 'NULL' in the newly added logic, treat this API as a 'white box'.
But for already exist logic like this one, I prefer to fix it, and treat it as a 'black box'.
More information about the dev
mailing list