svn commit: r336371 - head/sys/ofed/drivers/infiniband/core

Hans Petter Selasky hselasky at FreeBSD.org
Tue Jul 17 09:09:19 UTC 2018


Author: hselasky
Date: Tue Jul 17 09:09:17 2018
New Revision: 336371
URL: https://svnweb.freebsd.org/changeset/base/336371

Log:
  Set default GID type as RoCE when resolving RoCE route in ibcore.
  
  cma_iboe_set_mgid() is updated to reflect the RoCEv2 GID check.
  
  Linux commit:
  5c181bda77f409d89ad513528eccac5f3a416474
  
  MFC after:		1 week
  Sponsored by:		Mellanox Technologies

Modified:
  head/sys/ofed/drivers/infiniband/core/ib_cma.c

Modified: head/sys/ofed/drivers/infiniband/core/ib_cma.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/ib_cma.c	Tue Jul 17 09:07:36 2018	(r336370)
+++ head/sys/ofed/drivers/infiniband/core/ib_cma.c	Tue Jul 17 09:09:17 2018	(r336371)
@@ -3958,8 +3958,10 @@ static void cma_iboe_set_mgid(struct sockaddr *addr, u
 	} else if (addr->sa_family == AF_INET6) {
 		memcpy(mgid, &sin6->sin6_addr, sizeof *mgid);
 	} else {
-		mgid->raw[0] = (gid_type == IB_GID_TYPE_IB) ? 0xff : 0;
-		mgid->raw[1] = (gid_type == IB_GID_TYPE_IB) ? 0x0e : 0;
+		mgid->raw[0] =
+			(gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) ? 0 : 0xff;
+		mgid->raw[1] =
+			(gid_type == IB_GID_TYPE_ROCE_UDP_ENCAP) ? 0 : 0x0e;
 		mgid->raw[2] = 0;
 		mgid->raw[3] = 0;
 		mgid->raw[4] = 0;


More information about the svn-src-head mailing list