cma.c (1c9b281997b5876c0c8ed62506b56db89d262b57) cma.c (e2e626972e652d18520f84d69fc06cfa307d11ff)
1/*
2 * Copyright (c) 2005 Voltaire Inc. All rights reserved.
3 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
4 * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved.
5 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

--- 2677 unchanged lines hidden (view full) ---

2686
2687 if (cma_any_addr(addr)) {
2688 memset(mgid, 0, sizeof *mgid);
2689 } else if ((addr->sa_family == AF_INET6) &&
2690 ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) ==
2691 0xFF10A01B)) {
2692 /* IPv6 address is an SA assigned MGID. */
2693 memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);
1/*
2 * Copyright (c) 2005 Voltaire Inc. All rights reserved.
3 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
4 * Copyright (c) 1999-2005, Mellanox Technologies, Inc. All rights reserved.
5 * Copyright (c) 2005-2006 Intel Corporation. All rights reserved.
6 *
7 * This software is available to you under a choice of one of two
8 * licenses. You may choose to be licensed under the terms of the GNU

--- 2677 unchanged lines hidden (view full) ---

2686
2687 if (cma_any_addr(addr)) {
2688 memset(mgid, 0, sizeof *mgid);
2689 } else if ((addr->sa_family == AF_INET6) &&
2690 ((be32_to_cpu(sin6->sin6_addr.s6_addr32[0]) & 0xFFF0FFFF) ==
2691 0xFF10A01B)) {
2692 /* IPv6 address is an SA assigned MGID. */
2693 memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);
2694 } else if ((addr->sa_family == AF_INET6)) {
2695 ipv6_ib_mc_map(&sin6->sin6_addr, dev_addr->broadcast, mc_map);
2696 if (id_priv->id.ps == RDMA_PS_UDP)
2697 mc_map[7] = 0x01; /* Use RDMA CM signature */
2698 *mgid = *(union ib_gid *) (mc_map + 4);
2694 } else {
2695 ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map);
2696 if (id_priv->id.ps == RDMA_PS_UDP)
2697 mc_map[7] = 0x01; /* Use RDMA CM signature */
2698 *mgid = *(union ib_gid *) (mc_map + 4);
2699 }
2700}
2701

--- 306 unchanged lines hidden ---
2699 } else {
2700 ip_ib_mc_map(sin->sin_addr.s_addr, dev_addr->broadcast, mc_map);
2701 if (id_priv->id.ps == RDMA_PS_UDP)
2702 mc_map[7] = 0x01; /* Use RDMA CM signature */
2703 *mgid = *(union ib_gid *) (mc_map + 4);
2704 }
2705}
2706

--- 306 unchanged lines hidden ---