Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2017 17:16:36 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316774 - in head/sys/dev/cxgbe: . common
Message-ID:  <201704131716.v3DHGa4D041844@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Thu Apr 13 17:16:36 2017
New Revision: 316774
URL: https://svnweb.freebsd.org/changeset/base/316774

Log:
  cxgbe: Query some more RDMA related parameters from the firmware.
  
  MFC after:	3 days
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/common/common.h
  head/sys/dev/cxgbe/offload.h
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/common/common.h
==============================================================================
--- head/sys/dev/cxgbe/common/common.h	Thu Apr 13 17:13:08 2017	(r316773)
+++ head/sys/dev/cxgbe/common/common.h	Thu Apr 13 17:16:36 2017	(r316774)
@@ -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: head/sys/dev/cxgbe/offload.h
==============================================================================
--- head/sys/dev/cxgbe/offload.h	Thu Apr 13 17:13:08 2017	(r316773)
+++ head/sys/dev/cxgbe/offload.h	Thu Apr 13 17:16:36 2017	(r316774)
@@ -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: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Thu Apr 13 17:13:08 2017	(r316773)
+++ head/sys/dev/cxgbe/t4_main.c	Thu Apr 13 17:16:36 2017	(r316774)
@@ -3494,6 +3494,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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704131716.v3DHGa4D041844>