in CI arm compilation fails. Looks like it came with gcc update. Any
thought what happed with arm compiler?
Based on gcc message, my guess is that it does not like casting from
uint8_t* to uint32_t* because it could be a problem when you dereference
the pointer. If your platform does not support unaligned accesses,
you're screwed.
The portable way of fixing that is usually to use memcpy() (which should
be optimized by gcc builtins anyway), or to use packed structures casts
(which will lead gcc to generate the correct code for the platform).
I think ODP should have those accessors for potentially unaligned
memory, as in the Linux kernel:
http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/include/linux/unaligned/packed_struct.h
ben
static inline int verify_pmr_ipsec_spi(uint8_t *pkt_addr ODP_UNUSED,
odp_packet_hdr_t *pkt_hdr ODP_UNUSED,
pmr_term_value_t *term_value ODP_UNUSED)
{
uint32_t *spi;
if (!pkt_hdr->input_flags.ipsec)
return 0;
spi = (uint32_t *)(pkt_addr + pkt_hdr->l4_offset);
*11:30:42* In file included from odp_classification.c:17:0:
*11:30:42* ./include/odp_classification_inlines.h: In function
'verify_pmr_ipsec_spi':
*11:30:42* ./include/odp_classification_inlines.h:197:8: error: cast
increases required alignment of target type [-Werror=cast-align]
*11:30:42* spi = (uint32_t *)(pkt_addr + pkt_hdr->l4_offset);
*11:30:42* ^
Thanks,
Maxim.
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp