DPDK patches and discussions
 help / color / mirror / Atom feed
From: Hemant Agrawal <hemant.agrawal@nxp.com>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>, <thomas@monjalon.net>,
	Michal Kobylinski <michalx.kobylinski@intel.com>,
	<stable@dpdk.org>, Jun Yang <jun.yang@nxp.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/5] lpm: fix compilation on ARM BE
Date: Mon, 18 Dec 2017 13:20:12 +0530	[thread overview]
Message-ID: <d72319d0-1fd1-ca37-31d8-cae9858fcc68@nxp.com> (raw)
In-Reply-To: <20171213132253.GA10724@bricha3-MOBL3.ger.corp.intel.com>

On 12/13/2017 6:52 PM, Bruce Richardson wrote:
> On Wed, Dec 13, 2017 at 06:22:55PM +0530, Hemant Agrawal wrote:
>> Compiling on ARM BE using Linaro toolchain caused following
>> error/warnings.
>>
>> rte_lpm.c: In function ‘add_depth_big_v20’:
>> rte_lpm.c:911:4: error: braces around scalar initializer [-Werror]
>>     { .group_idx = (uint8_t)tbl8_group_index, },
>>     ^
>> rte_lpm.c:911:4: note: (near initialization for
>> 	‘new_tbl24_entry.depth’)
>> rte_lpm.c:911:6:error: field name not in record or union initializer
>>     { .group_idx = (uint8_t)tbl8_group_index, },
>>       ^
>> rte_lpm.c:911:6: note: (near initialization for
>> 	‘new_tbl24_entry.depth’)
>> rte_lpm.c:914:13: error: initialized field overwritten
>> 	[-Werror=override-init]
>>     .depth = 0,
>>
>> Fixes: dc81ebbacaeb ("lpm: extend IPv4 next hop field")
>> Cc: Michal Kobylinski <michalx.kobylinski@intel.com>
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Jun Yang <jun.yang@nxp.com>
>> Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
>> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
>> ---
>> v2: added endianess check in the assignments
>>
>>  lib/librte_lpm/rte_lpm.c | 29 +++++++++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>
>> diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
>> index e1f1fad..a47c04f 100644
>> --- a/lib/librte_lpm/rte_lpm.c
>> +++ b/lib/librte_lpm/rte_lpm.c
>> @@ -912,10 +912,17 @@ add_depth_big_v20(struct rte_lpm_v20 *lpm, uint32_t ip_masked, uint8_t depth,
>>  		 */
>>
>>  		struct rte_lpm_tbl_entry_v20 new_tbl24_entry = {
>> +#if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
>>  			{ .group_idx = (uint8_t)tbl8_group_index, },
>>  			.valid = VALID,
>>  			.valid_group = 1,
>>  			.depth = 0,
>> +#else
>> +			.depth = 0,
>> +			.valid_group = 1,
>> +			.valid = VALID,
>> +			{ .group_idx = (uint8_t)tbl8_group_index, },
>> +#endif
>>  		};
>>
> I'm not I'd agree with this as a "better" fix. Were the issues with the
> previous version of just removing the braces. All the ifdefs are rather
> ugly.
>
Ok. I will revert.

  reply	other threads:[~2017-12-18  7:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 10:08 [dpdk-dev] [PATCH 1/5] pmdinfogen: fix cross compilation for " Hemant Agrawal
2017-11-02 10:08 ` [dpdk-dev] [PATCH 2/5] lpm: fix compilation on " Hemant Agrawal
2017-12-11 12:41   ` Bruce Richardson
2017-12-13 12:23     ` Hemant Agrawal
2017-11-02 10:08 ` [dpdk-dev] [PATCH 3/5] bus/dpaa: " Hemant Agrawal
2017-11-02 10:08 ` [dpdk-dev] [PATCH 4/5] net/i40e: " Hemant Agrawal
2017-11-03  3:03   ` Xing, Beilei
2017-11-02 10:08 ` [dpdk-dev] [PATCH 5/5] net/ixgbe: " Hemant Agrawal
2017-12-11 12:42   ` Bruce Richardson
2017-12-11 12:40 ` [dpdk-dev] [PATCH 1/5] pmdinfogen: fix cross compilation for " Bruce Richardson
2017-12-11 18:58   ` Neil Horman
2017-12-13 11:52     ` Hemant Agrawal
2017-12-13 12:19       ` Neil Horman
2017-12-13 12:52 ` [dpdk-dev] [PATCH v2 " Hemant Agrawal
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 2/5] lpm: fix compilation on " Hemant Agrawal
2017-12-13 13:22     ` Bruce Richardson
2017-12-18  7:50       ` Hemant Agrawal [this message]
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 3/5] bus/dpaa: " Hemant Agrawal
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 4/5] net/i40e: " Hemant Agrawal
2017-12-13 12:52   ` [dpdk-dev] [PATCH v2 5/5] net/ixgbe: " Hemant Agrawal
2017-12-18  7:56   ` [dpdk-dev] [PATCH v3 1/5] pmdinfogen: fix cross compilation for " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 2/5] lpm: fix compilation on " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 3/5] bus/dpaa: " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 4/5] net/i40e: " Hemant Agrawal
2017-12-18  7:56     ` [dpdk-dev] [PATCH v3 5/5] net/ixgbe: " Hemant Agrawal
2018-01-12 16:27     ` [dpdk-dev] [dpdk-stable] [PATCH v3 1/5] pmdinfogen: fix cross compilation for " Thomas Monjalon

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=d72319d0-1fd1-ca37-31d8-cae9858fcc68@nxp.com \
    --to=hemant.agrawal@nxp.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jun.yang@nxp.com \
    --cc=michalx.kobylinski@intel.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /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 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).