Hi Pravin,
So far, I have seen 2 bugs related to memory alignment on SPARC. The
fixes are small:
Most of these bugs have small fixes and the location of the fix can
easily be found by running gdb on ovs-vswitchd. Here are the bugs that
have been encountered on SPARC systems so far in OVS 2.7.0:
1. ovs-vswitchd crashes when trying to create a new bridge. The second
file contains the fix:
[root@ca-ldom131 ~]# diff openvswitch-2.7.0/lib/dpif-netlink.c
openvswitch/openvswitch-2.7.0/lib/dpif-netlink.c
2827c2827,2828
< flow->ufid = *ufid;
---
> //flow->ufid = *ufid;
> memcpy(&flow->ufid, ufid, sizeof(ovs_u128));
[root@ca-ldom131 ~]#
2. ovs-vswitchd crashes when trying to add a virtual interface to the
ovs-bridge. The second file contains the fix:
[root@ca-ldom131 ~]# diff openvswitch-2.7.0/lib/netlink.c
openvswitch/openvswitch-2.7.0/lib/netlink.c
30a31
> #include <linux/if_link.h>
531c532,535
< return nla + 1;
---
> struct rtnl_link_stats64 *ret_val;
> ret_val = (struct rtnl_link_stats64 *) malloc(sizeof(struct
rtnl_link_stats64));
> memcpy(ret_val, nla + 1, sizeof(struct rtnl_link_stats64));
> return ret_val;
[root@ca-ldom131 ~]#
Thanks,
Ameya
On 5/24/2017 7:41 PM, Pravin Shelar wrote:
On Wed, May 24, 2017 at 12:18 PM, Greg Rose <[email protected]> wrote:
On Tue, 2017-05-23 at 16:02 -0700, Joe Stringer wrote:
Clang 4.0 has added some new warnings around taking the address of packed
members of structures which may result in unaligned pointer values. This series
addresses the resulting compilation failures (reported via -Werror).
Joe Stringer (5):
odp-execute: Fix unaligned eth_addr access.
ofproto-dpif: Fix unaligned eth_addr access.
test-hash: Don't check bit 2048.
test-hash: Fix unaligned memory access.
test-hash: Reuse structs/functions in 256B check.
lib/odp-execute.c | 19 +++++++++++--
ofproto/ofproto-dpif.c | 12 +++++---
tests/test-hash.c | 74 ++++++++++++++++++++++++++++++--------------------
3 files changed, 70 insertions(+), 35 deletions(-)
Generally all the patches in this series look fine to me but I have a
few questions...
So are these patches needed for ARM and/or Sparc? Do we have any
reports of unaligned accesses from people working on those CPU
architectures? I guess more to the point, do *we* have any ARM or Sparc
systems with which we can test?
I have seen some bug reports on Sparc.
Amey, can you test these patches? or share patches that you have?
Thanks,
Pravin.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev