svn commit: r337097 - stable/11/sys/ofed/include/rdma

Hans Petter Selasky hselasky at FreeBSD.org
Thu Aug 2 08:35:33 UTC 2018


Author: hselasky
Date: Thu Aug  2 08:35:32 2018
New Revision: 337097
URL: https://svnweb.freebsd.org/changeset/base/337097

Log:
  MFC r336964:
  Only NULL check the VNET pointer when VIMAGE is enabled in ibcore.
  Else a NULL VNET pointer should be ignored. This fixes address resolving
  when VIMAGE is disabled.
  
  Sponsored by:		Mellanox Technologies

Modified:
  stable/11/sys/ofed/include/rdma/ib_sa.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/ofed/include/rdma/ib_sa.h
==============================================================================
--- stable/11/sys/ofed/include/rdma/ib_sa.h	Thu Aug  2 08:33:51 2018	(r337096)
+++ stable/11/sys/ofed/include/rdma/ib_sa.h	Thu Aug  2 08:35:32 2018	(r337097)
@@ -180,7 +180,11 @@ struct ib_sa_path_rec {
 
 static inline struct net_device *ib_get_ndev_from_path(struct ib_sa_path_rec *rec)
 {
-	return rec->net ? dev_get_by_index(rec->net, rec->ifindex) : NULL;
+#ifdef VIMAGE
+	if (rec->net == NULL)
+		return NULL;
+#endif
+	return dev_get_by_index(rec->net, rec->ifindex);
 }
 
 #define IB_SA_MCMEMBER_REC_MGID				IB_SA_COMP_MASK( 0)


More information about the svn-src-stable-11 mailing list