Date: Thu, 2 Aug 2018 08:35:32 +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: r337097 - stable/11/sys/ofed/include/rdma Message-ID: <201808020835.w728ZWN3050644@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808020835.w728ZWN3050644>