Bruce Richardson [mailto:bruce.richardson at intel.com]
> Sent: Thursday, February 12, 2015 19:18
> To: Shi Xuelin-B29237
> Cc: thomas.monjalon at 6wind.com; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] librte_lpm: use field access instead of
> type conversion.
>
> On Wed, Feb 1
On Wed, Feb 11, 2015 at 02:12:59PM +0800, xuelin.shi at freescale.com wrote:
> From: Xuelin Shi
>
> struct tbl_entry{
> uint8_t next_hop;
> uint8_t valid :1;
> uint8_t valid_group :1;
> uint8_t depth :6
> }
> uint16_t tbl = (uint16_t)tbl_entry;
> next_hop = (uint8_
From: Xuelin Shi
struct tbl_entry{
uint8_t next_hop;
uint8_t valid :1;
uint8_t valid_group :1;
uint8_t depth :6
}
uint16_t tbl = (uint16_t)tbl_entry;
next_hop = (uint8_t)tbl;
next_hop cannot get the correct value of the field
if the cpu arch is BIG_ENDIAN.
change
3 matches
Mail list logo