From owner-svn-src-head@freebsd.org Tue Jul 31 11:23:45 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 456431056C77; Tue, 31 Jul 2018 11:23:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EE73186188; Tue, 31 Jul 2018 11:23:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CF02312FFF; Tue, 31 Jul 2018 11:23:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6VBNiuW034205; Tue, 31 Jul 2018 11:23:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6VBNikQ034204; Tue, 31 Jul 2018 11:23:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201807311123.w6VBNikQ034204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 31 Jul 2018 11:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336964 - head/sys/ofed/include/rdma X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/ofed/include/rdma X-SVN-Commit-Revision: 336964 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Jul 2018 11:23:45 -0000 Author: hselasky Date: Tue Jul 31 11:23:44 2018 New Revision: 336964 URL: https://svnweb.freebsd.org/changeset/base/336964 Log: 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. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/rdma/ib_sa.h Modified: head/sys/ofed/include/rdma/ib_sa.h ============================================================================== --- head/sys/ofed/include/rdma/ib_sa.h Tue Jul 31 10:18:30 2018 (r336963) +++ head/sys/ofed/include/rdma/ib_sa.h Tue Jul 31 11:23:44 2018 (r336964) @@ -182,7 +182,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)