* [dpdk-stable] [PATCH 3/6] net/mvpp2: fix array initialization [not found] <1535113006-9393-1-git-send-email-tdu@semihalf.com> @ 2018-08-24 12:16 ` Tomasz Duszynski [not found] ` <1535122494-30249-1-git-send-email-tdu@semihalf.com> 1 sibling, 0 replies; 5+ messages in thread From: Tomasz Duszynski @ 2018-08-24 12:16 UTC (permalink / raw) To: dev; +Cc: nsamsono, mw, Tomasz Duszynski, stable 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 }; struct pp2_bpool *mrvl_port_to_bpool_lookup[RTE_MAX_ETHPORTS]; -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1535122494-30249-1-git-send-email-tdu@semihalf.com>]
* [dpdk-stable] [PATCH v2 3/6] net/mvpp2: fix array initialization [not found] ` <1535122494-30249-1-git-send-email-tdu@semihalf.com> @ 2018-08-24 14:54 ` Tomasz Duszynski 2018-08-24 16:46 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit [not found] ` <1535135403-16115-1-git-send-email-tdu@semihalf.com> 1 sibling, 1 reply; 5+ messages in thread From: Tomasz Duszynski @ 2018-08-24 14:54 UTC (permalink / raw) To: dev; +Cc: nsamsono, mw, Tomasz Duszynski, stable 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 }; struct pp2_bpool *mrvl_port_to_bpool_lookup[RTE_MAX_ETHPORTS]; -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2 3/6] net/mvpp2: fix array initialization 2018-08-24 14:54 ` [dpdk-stable] [PATCH v2 " Tomasz Duszynski @ 2018-08-24 16:46 ` Ferruh Yigit 2018-08-24 17:53 ` Tomasz Duszynski 0 siblings, 1 reply; 5+ messages in thread From: Ferruh Yigit @ 2018-08-24 16:46 UTC (permalink / raw) To: Tomasz Duszynski, dev; +Cc: nsamsono, mw, stable 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. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH v2 3/6] net/mvpp2: fix array initialization 2018-08-24 16:46 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit @ 2018-08-24 17:53 ` Tomasz Duszynski 0 siblings, 0 replies; 5+ messages in thread From: Tomasz Duszynski @ 2018-08-24 17:53 UTC (permalink / raw) To: Ferruh Yigit; +Cc: Tomasz Duszynski, dev, nsamsono, mw, stable 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1535135403-16115-1-git-send-email-tdu@semihalf.com>]
* [dpdk-stable] [PATCH v3 3/6] net/mvpp2: fix array initialization [not found] ` <1535135403-16115-1-git-send-email-tdu@semihalf.com> @ 2018-08-24 18:30 ` Tomasz Duszynski 0 siblings, 0 replies; 5+ messages in thread From: Tomasz Duszynski @ 2018-08-24 18:30 UTC (permalink / raw) To: dev; +Cc: nsamsono, mw, Tomasz Duszynski, stable 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 8e1a32f..fdf416b 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 }; struct pp2_bpool *mrvl_port_to_bpool_lookup[RTE_MAX_ETHPORTS]; -- 2.7.4 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-08-24 18:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1535113006-9393-1-git-send-email-tdu@semihalf.com> 2018-08-24 12:16 ` [dpdk-stable] [PATCH 3/6] net/mvpp2: fix array initialization Tomasz Duszynski [not found] ` <1535122494-30249-1-git-send-email-tdu@semihalf.com> 2018-08-24 14:54 ` [dpdk-stable] [PATCH v2 " Tomasz Duszynski 2018-08-24 16:46 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit 2018-08-24 17:53 ` Tomasz Duszynski [not found] ` <1535135403-16115-1-git-send-email-tdu@semihalf.com> 2018-08-24 18:30 ` [dpdk-stable] [PATCH v3 " Tomasz Duszynski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).