Author: hselasky
Date: Thu Aug  2 08:14:00 2018
New Revision: 337077
URL: https://svnweb.freebsd.org/changeset/base/337077

Log:
  MFC r336371:
  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
  
  Sponsored by:         Mellanox Technologies

Modified:
  stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c
==============================================================================
--- stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Thu Aug  2 08:12:52 
2018        (r337076)
+++ stable/11/sys/ofed/drivers/infiniband/core/ib_cma.c Thu Aug  2 08:14:00 
2018        (r337077)
@@ -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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to