[dpdk-dev] [PATCH 1/1] arm: set CONFIG_RTE_ARCH_STRICT_ALIGN=y for armv7 target

Jan Viktorin viktorin at rehivetech.com
Wed Dec 9 16:16:17 CET 2015


This patch reduces number of warnings from 53 to 40. It removes the usual false
positives utilizing unaligned_uint*_t data types.

Signed-off-by: Jan Viktorin <viktorin at rehivetech.com>
---
As far as I know, only a 64-bit unaligned access can be a problem for ARMv7.
I found only one such occurence:

118 struct rte_mbuf *                                                               
119 rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,                    
120                 struct rte_ip_frag_death_row *dr, struct rte_mbuf *mb, uint64_t tms,
121                 struct ipv4_hdr *ip_hdr)
...
133         psd = (unaligned_uint64_t *)&ip_hdr->src_addr;                          
134         /* use first 8 bytes only */                                            
135         key.src_dst[0] = psd[0];                                                
136         key.id = ip_hdr->packet_id;                                             
137         key.key_len = IPV4_KEYLEN

Is this a real issue?
---
 config/defconfig_arm-armv7a-linuxapp-gcc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/config/defconfig_arm-armv7a-linuxapp-gcc b/config/defconfig_arm-armv7a-linuxapp-gcc
index cbebd64..2482d91 100644
--- a/config/defconfig_arm-armv7a-linuxapp-gcc
+++ b/config/defconfig_arm-armv7a-linuxapp-gcc
@@ -39,6 +39,7 @@ CONFIG_RTE_ARCH_ARM_TUNE="cortex-a9"
 CONFIG_RTE_ARCH_ARM_NEON=y
 
 CONFIG_RTE_FORCE_INTRINSICS=y
+CONFIG_RTE_ARCH_STRICT_ALIGN=y
 
 CONFIG_RTE_TOOLCHAIN="gcc"
 CONFIG_RTE_TOOLCHAIN_GCC=y
-- 
2.6.3



More information about the dev mailing list