From owner-svn-src-all@freebsd.org Wed May 24 17:52:58 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CE9DD7C052; Wed, 24 May 2017 17:52:58 +0000 (UTC) (envelope-from np@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 mx1.freebsd.org (Postfix) with ESMTPS id 544B21D3D; Wed, 24 May 2017 17:52:58 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4OHqvwg039807; Wed, 24 May 2017 17:52:57 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4OHqvHU039805; Wed, 24 May 2017 17:52:57 GMT (envelope-from np@FreeBSD.org) Message-Id: <201705241752.v4OHqvHU039805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 24 May 2017 17:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r318797 - in stable/10/sys/dev/cxgbe: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 17:52:58 -0000 Author: np Date: Wed May 24 17:52:56 2017 New Revision: 318797 URL: https://svnweb.freebsd.org/changeset/base/318797 Log: MFC r316774: cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications Modified: stable/10/sys/dev/cxgbe/common/common.h stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/common/common.h ============================================================================== --- stable/10/sys/dev/cxgbe/common/common.h Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/common/common.h Wed May 24 17:52:56 2017 (r318797) @@ -366,6 +366,9 @@ struct adapter_params { unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; + + unsigned int max_ordird_qp; + unsigned int max_ird_adapter; }; #define CHELSIO_T4 0x4 Modified: stable/10/sys/dev/cxgbe/offload.h ============================================================================== --- stable/10/sys/dev/cxgbe/offload.h Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/offload.h Wed May 24 17:52:56 2017 (r318797) @@ -121,6 +121,7 @@ struct t4_virt_res { struct t4_range pbl; struct t4_range qp; struct t4_range cq; + struct t4_range srq; struct t4_range ocq; struct t4_range l2t; }; Modified: stable/10/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 17:51:07 2017 (r318796) +++ stable/10/sys/dev/cxgbe/t4_main.c Wed May 24 17:52:56 2017 (r318797) @@ -3301,6 +3301,21 @@ get_params__post_init(struct adapter *sc sc->vres.cq.size = val[3] - val[2] + 1; sc->vres.ocq.start = val[4]; sc->vres.ocq.size = val[5] - val[4] + 1; + + param[0] = FW_PARAM_PFVF(SRQ_START); + param[1] = FW_PARAM_PFVF(SRQ_END); + param[2] = FW_PARAM_DEV(MAXORDIRD_QP); + param[3] = FW_PARAM_DEV(MAXIRD_ADAPTER); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 4, param, val); + if (rc != 0) { + device_printf(sc->dev, + "failed to query RDMA parameters(3): %d.\n", rc); + return (rc); + } + sc->vres.srq.start = val[0]; + sc->vres.srq.size = val[1] - val[0] + 1; + sc->params.max_ordird_qp = val[2]; + sc->params.max_ird_adapter = val[3]; } if (sc->iscsicaps) { param[0] = FW_PARAM_PFVF(ISCSI_START);