From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Duszynski Subject: Re: [PATCH v2 3/6] net/mvpp2: fix array initialization Date: Fri, 24 Aug 2018 19:53:39 +0200 Message-ID: <20180824175339.GC32439@sh> References: <1535113006-9393-1-git-send-email-tdu@semihalf.com> <1535122494-30249-1-git-send-email-tdu@semihalf.com> <1535122494-30249-4-git-send-email-tdu@semihalf.com> <19ae9e13-cd6f-2f77-fd29-efe54d43088e@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Tomasz Duszynski , dev@dpdk.org, nsamsono@marvell.com, mw@semihalf.com, stable@dpdk.org To: Ferruh Yigit Return-path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id 5AD2C1AF03 for ; Fri, 24 Aug 2018 19:53:41 +0200 (CEST) Received: by mail-lj1-f194.google.com with SMTP id p10-v6so7510337ljg.2 for ; Fri, 24 Aug 2018 10:53:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: <19ae9e13-cd6f-2f77-fd29-efe54d43088e@intel.com> 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 Fri, Aug 24, 2018 at 05:46:42PM +0100, Ferruh Yigit wrote: > On 8/24/2018 3:54 PM, Tomasz Duszynski wrote: > > Fix used_bpools array initialization by using range initializer. > > This way all necessary variables are properly initialized regardless > > of PP2_NUM_PKT_PROC value. > > > > Fixes: 0ddc9b815b11 ("net/mrvl: add net PMD skeleton") > > Cc: stable@dpdk.org > > > > Signed-off-by: Tomasz Duszynski > > --- > > drivers/net/mvpp2/mrvl_ethdev.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_e= thdev.c > > index 7ea8946..60ca6e0 100644 > > --- a/drivers/net/mvpp2/mrvl_ethdev.c > > +++ b/drivers/net/mvpp2/mrvl_ethdev.c > > @@ -84,8 +84,7 @@ static const char * const valid_args[] =3D { > > static int used_hifs =3D MRVL_MUSDK_HIFS_RESERVED; > > static struct pp2_hif *hifs[RTE_MAX_LCORE]; > > static int used_bpools[PP2_NUM_PKT_PROC] =3D { > > - MRVL_MUSDK_BPOOLS_RESERVED, > > - MRVL_MUSDK_BPOOLS_RESERVED > > + [0 ... PP2_NUM_PKT_PROC - 1] =3D MRVL_MUSDK_BPOOLS_RESERVED > > range initializer is not part of standard, although I am sure this won't = be > first GCC extension we rely on, and I don't have any other option than me= mset > for this. > > So just a reminder about extension usage, if you are happy with this > implementation, lets keep it. I would prefer to leave it as is. As you pointed out DPDK has already started using it anyway. -- - Tomasz Duszy=C5=84ski