[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Thomas Monjalon
2014-10-22 11:49, Marc Sune: > On 22/10/14 10:50, Thomas Monjalon wrote: > > 2014-10-22 10:42, Marc Sune: > >> The mutex needs to be initialized to RTE_SPINLOCK_INITIALIZER(0) too, or > >> move the initialization of the mutex to rte_kni_init(). > > RTE_SPINLOCK_INITIALIZER is { 0 } > > By

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Marc Sune
On 22/10/14 10:50, Thomas Monjalon wrote: > 2014-10-22 10:42, Marc Sune: >> The mutex needs to be initialized to RTE_SPINLOCK_INITIALIZER(0) too, or >> move the initialization of the mutex to rte_kni_init(). > RTE_SPINLOCK_INITIALIZER is { 0 } > By initializing one field, all other fields are set

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Thomas Monjalon
2014-10-22 10:42, Marc Sune: > The mutex needs to be initialized to RTE_SPINLOCK_INITIALIZER(0) too, or > move the initialization of the mutex to rte_kni_init(). RTE_SPINLOCK_INITIALIZER is { 0 } By initializing one field, all other fields are set to 0, so spinlock also. Just choose one field

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Marc Sune
The mutex needs to be initialized to RTE_SPINLOCK_INITIALIZER(0) too, or move the initialization of the mutex to rte_kni_init(). I can prepare a second patch with one or the other option, if you want. marc On 22/10/14 10:37, Thomas Monjalon wrote: > 2014-10-22 09:10, Marc Sune: >> Fix for

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Richardson, Bruce
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Marc Sune > Sent: Wednesday, October 22, 2014 10:50 AM > To: Thomas Monjalon > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field- > initia

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Marc Sune
Liu, Can you confirm that this patch fixes the issue? Thanks marc On 22/10/14 09:10, Marc Sune wrote: > Fix for compilation warning 'missing-field-initializers' for some > GCC and clang versions introduced in commit 0c6bc8e > > Signed-off-by: Marc Sune > --- > lib/librte_kni/rte_kni.c |9

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Marc Sune
Fix for compilation warning 'missing-field-initializers' for some GCC and clang versions introduced in commit 0c6bc8e Signed-off-by: Marc Sune --- lib/librte_kni/rte_kni.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/librte_kni/rte_kni.c

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Liu, Jijiang
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Marc Sune > Sent: Wednesday, October 22, 2014 3:11 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field- > initializers' > > Fix for comp

[dpdk-dev] [PATCH] KNI: fix compilation warning 'missing-field-initializers'

2014-10-22 Thread Thomas Monjalon
2014-10-22 09:10, Marc Sune: > Fix for compilation warning 'missing-field-initializers' for some > GCC and clang versions introduced in commit 0c6bc8e > > Signed-off-by: Marc Sune It's not needed to initialize all fields. This should be sufficient: +static struct rte_kni_memzone_pool