All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tdu@semihalf.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: Tomasz Duszynski <tdu@semihalf.com>,
	dev@dpdk.org, nsamsono@marvell.com, mw@semihalf.com,
	stable@dpdk.org
Subject: Re: [PATCH v2 3/6] net/mvpp2: fix array initialization
Date: Fri, 24 Aug 2018 19:53:39 +0200	[thread overview]
Message-ID: <20180824175339.GC32439@sh> (raw)
In-Reply-To: <19ae9e13-cd6f-2f77-fd29-efe54d43088e@intel.com>

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 <tdu@semihalf.com>
> > ---
> >  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.

I would prefer to leave it as is. As you pointed out DPDK has
already started using it anyway.

--
- Tomasz Duszyński

  reply	other threads:[~2018-08-24 17:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24 12:16 [PATCH 0/6] mvpp2 changes and features Tomasz Duszynski
2018-08-24 12:16 ` [PATCH 1/6] drivers/common: add mvep common code for MRVL PMDs Tomasz Duszynski
2018-08-24 12:32   ` Ferruh Yigit
2018-08-24 12:49     ` Tomasz Duszynski
2018-08-24 12:16 ` [PATCH 2/6] net/mvpp2: use common code to initialize DMA Tomasz Duszynski
2018-08-24 12:16 ` [PATCH 3/6] net/mvpp2: fix array initialization Tomasz Duszynski
2018-08-24 12:16 ` [PATCH 4/6] net/mvpp2: fix comments and error messages Tomasz Duszynski
2018-08-24 12:16 ` [PATCH 5/6] net/mvpp2: make private variables static Tomasz Duszynski
2018-08-24 12:16 ` [PATCH 6/6] net/mvpp2: add VLAN packet type support for parser offload Tomasz Duszynski
2018-08-24 14:54 ` [PATCH 0/6] net/mvpp2 changes and features Tomasz Duszynski
2018-08-24 14:54   ` [PATCH v2 1/6] drivers/common: add mvep common code for MRVL PMDs Tomasz Duszynski
2018-08-24 16:45     ` Ferruh Yigit
2018-08-24 17:51       ` Tomasz Duszynski
2018-08-24 14:54   ` [PATCH v2 2/6] net/mvpp2: use common code to initialize DMA Tomasz Duszynski
2018-08-24 16:46     ` Ferruh Yigit
2018-08-24 17:51       ` Tomasz Duszynski
2018-08-24 14:54   ` [PATCH v2 3/6] net/mvpp2: fix array initialization Tomasz Duszynski
2018-08-24 16:46     ` Ferruh Yigit
2018-08-24 17:53       ` Tomasz Duszynski [this message]
2018-08-24 14:54   ` [PATCH v2 4/6] net/mvpp2: fix comments and error messages Tomasz Duszynski
2018-08-24 14:54   ` [PATCH v2 5/6] net/mvpp2: make private variables static Tomasz Duszynski
2018-08-24 14:54   ` [PATCH v2 6/6] net/mvpp2: add VLAN packet type support for parser offload Tomasz Duszynski
2018-08-24 18:29   ` [PATCH v3 0/6] net/mvpp2: changes and features Tomasz Duszynski
2018-08-24 18:29     ` [PATCH v3 1/6] drivers/common: add mvep common code for MRVL PMDs Tomasz Duszynski
2018-08-24 18:29     ` [PATCH v3 2/6] net/mvpp2: use common code to initialize DMA Tomasz Duszynski
2018-08-24 18:30     ` [PATCH v3 3/6] net/mvpp2: fix array initialization Tomasz Duszynski
2018-08-24 18:30     ` [PATCH v3 4/6] net/mvpp2: fix comments and error messages Tomasz Duszynski
2018-08-24 18:30     ` [PATCH v3 5/6] net/mvpp2: make private variables static Tomasz Duszynski
2018-08-24 18:30     ` [PATCH v3 6/6] net/mvpp2: add VLAN packet type support for parser offload Tomasz Duszynski
2018-08-27 12:18     ` [PATCH v3 0/6] net/mvpp2: changes and features Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180824175339.GC32439@sh \
    --to=tdu@semihalf.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=mw@semihalf.com \
    --cc=nsamsono@marvell.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.