diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-10-11 19:48:43 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-10-15 02:47:05 +0200 |
commit | 1c3aea2bc8f0b2e5b57375ead40457ff75a3a2ec (patch) | |
tree | 5c8c0c0c9d9a5aff2c4dc223f1c6ddafce7751e7 /include/rdma | |
parent | Merge tag 'mlx5-updates-2017-10-06' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-1c3aea2bc8f0b2e5b57375ead40457ff75a3a2ec.tar.xz linux-1c3aea2bc8f0b2e5b57375ead40457ff75a3a2ec.zip |
IB/core: Fix endianness annotation in rdma_is_multicast_addr()
Since ipv4_addr is a big endian 32-bit number, annotate it as such.
Fixes: commit be1d325a3358 ("IB/core: Set RoCEv2 MGID according to spec")
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'include/rdma')
-rw-r--r-- | include/rdma/ib_addr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/rdma/ib_addr.h b/include/rdma/ib_addr.h index ec5008cf5d51..cfa82d16573d 100644 --- a/include/rdma/ib_addr.h +++ b/include/rdma/ib_addr.h @@ -305,12 +305,12 @@ static inline void rdma_get_ll_mac(struct in6_addr *addr, u8 *mac) static inline int rdma_is_multicast_addr(struct in6_addr *addr) { - u32 ipv4_addr; + __be32 ipv4_addr; if (addr->s6_addr[0] == 0xff) return 1; - memcpy(&ipv4_addr, addr->s6_addr + 12, 4); + ipv4_addr = addr->s6_addr32[3]; return (ipv6_addr_v4mapped(addr) && ipv4_is_multicast(ipv4_addr)); } |