From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 368B36904; Fri, 24 Aug 2018 18:46:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Aug 2018 09:46:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,283,1531810800"; d="scan'208";a="67618976" Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.56]) ([10.237.221.56]) by orsmga007.jf.intel.com with ESMTP; 24 Aug 2018 09:46:43 -0700 To: Tomasz Duszynski , dev@dpdk.org Cc: nsamsono@marvell.com, mw@semihalf.com, stable@dpdk.org 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> From: Ferruh Yigit Openpgp: preference=signencrypt Message-ID: <19ae9e13-cd6f-2f77-fd29-efe54d43088e@intel.com> Date: Fri, 24 Aug 2018 17:46:42 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1535122494-30249-4-git-send-email-tdu@semihalf.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2 3/6] net/mvpp2: fix array initialization X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 16:46:46 -0000 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_ethdev.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[] = { > static int used_hifs = MRVL_MUSDK_HIFS_RESERVED; > static struct pp2_hif *hifs[RTE_MAX_LCORE]; > static int used_bpools[PP2_NUM_PKT_PROC] = { > - MRVL_MUSDK_BPOOLS_RESERVED, > - MRVL_MUSDK_BPOOLS_RESERVED > + [0 ... PP2_NUM_PKT_PROC - 1] = 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 memset for this. So just a reminder about extension usage, if you are happy with this implementation, lets keep it.