lpm: fix ARM big endian build
authorHemant Agrawal <hemant.agrawal@nxp.com>
Mon, 18 Dec 2017 07:56:46 +0000 (13:26 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 12 Jan 2018 16:27:03 +0000 (17:27 +0100)
commitb2e1c99ec8e22546e80454c9559db1c108394628
treee5c0e31062ed060a32467b549064d13b7dbe490f
parent74d6c4a72eb2ba9025f25706227f4cf304fe0ba6
lpm: fix ARM big endian build

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: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_lpm/rte_lpm.c