* and one for the node, which remains unused in the very first node inserted
* into the tree. This structure is 20 bytes per node on 32-bit machines. Do
* not change the order, benchmarks have shown that it's optimal this way.
+ * Note: be careful about this struct's alignment if it gets included into
+ * another struct and some atomic ops are expected on the keys or the node.
*/
struct eb_node {
struct eb_root branches; /* branches, must be at the beginning */
eb_troot_t *leaf_p; /* leaf node's parent */
short int bit; /* link's bit position. */
short unsigned int pfx; /* data prefix length, always related to leaf */
-} __attribute__((packed));
+}
+#ifdef HA_UNALIGNED
+ __attribute__((packed));
+#endif
/* Return the structure of type <type> whose member <member> points to <ptr> */
#define eb_entry(ptr, type, member) container_of(ptr, type, member)