Compile with -Werror and -Wcast-align: lib/netdev-offload-dpdk.c:578:30: error: cast increases required alignment of target type [-Werror=cast-align] 578 | ipv6_format_addr((struct in6_addr *) &set_ipv6->ipv6_addr, s); | ^
Fix it. Fixes: b6207b1d2711 ("netdev-offload-dpdk: Support offload of set IPv6 actions.") Signed-off-by: Eli Britstein <el...@nvidia.com> --- lib/netdev-offload-dpdk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 6bd5b6c9f..a24f92782 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -568,8 +568,12 @@ dump_flow_action(struct ds *s, struct ds *s_extra, ds_put_format(s, "set_ipv6_%s ", dirstr); if (set_ipv6) { + BUILD_ASSERT_DECL( + offsetof(struct rte_flow_action_set_ipv6, ipv6_addr) % + sizeof(struct in6_addr) == 0); ds_put_cstr(s, "ipv6_addr "); - ipv6_format_addr((struct in6_addr *) &set_ipv6->ipv6_addr, s); + ipv6_format_addr(ALIGNED_CAST(struct in6_addr *, + &set_ipv6->ipv6_addr), s); ds_put_cstr(s, " "); } ds_put_cstr(s, "/ "); -- 2.25.1 _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev