Date: Thu, 2 Aug 2018 08:30:44 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r337093 - stable/11/sys/ofed/drivers/infiniband/core Message-ID: <201808020830.w728Uist045441@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Aug 2 08:30:44 2018 New Revision: 337093 URL: https://svnweb.freebsd.org/changeset/base/337093 Log: MFC r336388: Add support for RoCEv2 multicast in ibcore. When creating address handle from multicast GID, set MAC according to the appropriate formula instead of searching for it in the GID table: - For IPv4 multicast GID use ip_eth_mc_map(). - For IPv6 multicast GID use ipv6_eth_mc_map(). Linux commit: 9636a56fa864464896bf7d1272c701f2b9a57737 Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c ============================================================================== --- stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Thu Aug 2 08:29:40 2018 (r337092) +++ stable/11/sys/ofed/drivers/infiniband/core/ib_verbs.c Thu Aug 2 08:30:44 2018 (r337093) @@ -1172,6 +1172,19 @@ int ib_resolve_eth_dmac(struct ib_device *device, if (!rdma_cap_eth_ah(device, ah_attr->port_num)) return 0; + if (rdma_is_multicast_addr((struct in6_addr *)ah_attr->grh.dgid.raw)) { + if (ipv6_addr_v4mapped((struct in6_addr *)ah_attr->grh.dgid.raw)) { + __be32 addr = 0; + + memcpy(&addr, ah_attr->grh.dgid.raw + 12, 4); + ip_eth_mc_map(addr, (char *)ah_attr->dmac); + } else { + ipv6_eth_mc_map((struct in6_addr *)ah_attr->grh.dgid.raw, + (char *)ah_attr->dmac); + } + return 0; + } + ret = ib_query_gid(device, ah_attr->port_num, ah_attr->grh.sgid_index,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808020830.w728Uist045441>