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)
_______________________________________________
[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