From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 958CDA0546; Tue, 6 Apr 2021 14:17:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 20F62406A2; Tue, 6 Apr 2021 14:17:50 +0200 (CEST) Received: from mail-il1-f173.google.com (mail-il1-f173.google.com [209.85.166.173]) by mails.dpdk.org (Postfix) with ESMTP id 735794067C for ; Tue, 6 Apr 2021 14:17:48 +0200 (CEST) Received: by mail-il1-f173.google.com with SMTP id c3so4728740ils.2 for ; Tue, 06 Apr 2021 05:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aqCiIvux9CcLCsnplaEc+51+luYAeukqJ9cXTNLLTOU=; b=LW/hq/d+z9Imn7ShrdUdz2sujaIkf0WB9jlmaJVFNKKjuoLaUDIWwAN0vlCKFvykIM w0Huh88BX5Oi2zFcV3Oz92hrKqW+iAGSRtZjpvP9Hq0JiBlYRyGNm6psIe1UZ2NyXKtl oWDhP/PE2B+N06ZIdTERAwYgk+KIzizVHVECtxAHsTlheukdVk42HAWIeADVfy0Kk5N0 0X0D6lcSTW9oAYKJe+bbc5NRpkgtx22579ScnbNNstEuViS5Kh2BoqjviBcNtr9ALbgJ us/gljaeY5ZymeFfFQx9rPqbUOiw5ayq0nNX5Om4XWJPqC3XdThIgy7nzlAJFukYqHuI 7Wow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aqCiIvux9CcLCsnplaEc+51+luYAeukqJ9cXTNLLTOU=; b=rUU1riaH5vMK1u5nFWaFzwWvhKUV4fdhbGfW4uW0+MHTbQQj4zIzhXnDysExci+Iqc cI0YME/gOlLV8f/U55uNVOu5E8WsAhDYKeCHtKplFvjrJJgN5I2PzkQGpzT5ojIP8jYg GfHIVnwWLb5Cay8evJQ23cuTW9FRAVA2tZ2bI1Jq0WGpolTjG5zYGcbpSNr3XcT/AHWS 9wxZOz8gDW/0VAw4xL+rB9ofJngj7CjsCTtJhswKFgW7QNVvFpl963xByNSL6cjolsOW Yv/kONPpbY5cdNu/4gkjuGigVLspLo+1X9/g/Gqk0xPQHdWAu6QdQ4Cn2nufm/o3p9HZ wwyg== X-Gm-Message-State: AOAM530y5hXgCXDYXE+xpbwK4WX858kUCZPA6FaMI1FTtLTwvTNAqUuY 9IduFVBUhHhhlIvC86OaACJhJkSysAXPabHX6/E= X-Google-Smtp-Source: ABdhPJxK98TYNI3gMMYt7iYPoOoSXEa7D9danbXezxOQKY2dzJxKnBFXFrwuu4GsDaU2DwcJ9s3Hm+fvLoiKIet7oNE= X-Received: by 2002:a05:6e02:1087:: with SMTP id r7mr23226832ilj.162.1617711467767; Tue, 06 Apr 2021 05:17:47 -0700 (PDT) MIME-Version: 1.0 References: <20210305133918.8005-1-ndabilpuram@marvell.com> <20210406114131.25874-1-ndabilpuram@marvell.com> <20210406114131.25874-5-ndabilpuram@marvell.com> In-Reply-To: <20210406114131.25874-5-ndabilpuram@marvell.com> From: Jerin Jacob Date: Tue, 6 Apr 2021 17:47:31 +0530 Message-ID: To: Nithin Dabilpuram Cc: dpdk-dev , Jerin Jacob , Sunil Kumar Kori , Satha Koteswara Rao Kottidi , Pavan Nikhilesh , Kiran Kumar K , Satheesh Paul , Ashwin Sekhar Thalakalath Kottilveetil Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4 04/52] common/cnxk: add roc plt init callback support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Apr 6, 2021 at 5:12 PM Nithin Dabilpuram wrote: > > From: Ashwin Sekhar T K > > Add support for registering callbacks for roc plt init. > > Signed-off-by: Ashwin Sekhar T K > --- > 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.