On Tue, Apr 6, 2021 at 5:12 PM Nithin Dabilpuram <ndabilpu...@marvell.com> wrote: > > From: Ashwin Sekhar T K <asek...@marvell.com> > > Add support for registering callbacks for roc plt init. > > Signed-off-by: Ashwin Sekhar T K <asek...@marvell.com> > --- > drivers/common/cnxk/roc_platform.c | 19 +++++++++++++++++++ > drivers/common/cnxk/roc_platform.h | 4 ++++ > drivers/common/cnxk/version.map | 1 + > 3 files changed, 24 insertions(+) > > diff --git a/drivers/common/cnxk/roc_platform.c > b/drivers/common/cnxk/roc_platform.c > index 5baec95..3eba1a7 100644 > --- a/drivers/common/cnxk/roc_platform.c > +++ b/drivers/common/cnxk/roc_platform.c > @@ -4,10 +4,23 @@ > > #include "roc_api.h" > > +#define ROC_PLT_INIT_CB_MAX 8
Since it local to this file. Please change to PLT_INIT_CB_MAX > + > +static int plt_init_cb_num; > +static roc_plt_init_cb_t plt_init_cbs[ROC_PLT_INIT_CB_MAX]; > + > +void > +roc_plt_init_cb_register(roc_plt_init_cb_t cb) > +{ > + RTE_ASSERT(plt_init_cb_num < ROC_PLT_INIT_CB_MAX); RTE_ASSERT not allowed in the library, please return the "-ERANGE" or so for this function in case of error. the caller can put some error print on failure as it is called from the constructor. Rest of the series looks good.