summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornp <np@FreeBSD.org>2017-05-24 17:52:56 +0000
committernp <np@FreeBSD.org>2017-05-24 17:52:56 +0000
commit18a00ab8c19e4f6663772d3b3d9e390ba8888d84 (patch)
treee07a84d8635bfa0c2b37242f9d5f2bb8efecdf7a
parentca89cb7f5f8590b2b8e1b6854716003ac28380bb (diff)
downloadFreeBSD-src-18a00ab8c19e4f6663772d3b3d9e390ba8888d84.zip
FreeBSD-src-18a00ab8c19e4f6663772d3b3d9e390ba8888d84.tar.gz
MFC r316774:
cxgbe: Query some more RDMA related parameters from the firmware. Sponsored by: Chelsio Communications
-rw-r--r--sys/dev/cxgbe/common/common.h3
-rw-r--r--sys/dev/cxgbe/offload.h1
-rw-r--r--sys/dev/cxgbe/t4_main.c15
3 files changed, 19 insertions, 0 deletions
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h
index 04fdeb1..e113b76 100644
--- a/sys/dev/cxgbe/common/common.h
+++ b/sys/dev/cxgbe/common/common.h
@@ -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
diff --git a/sys/dev/cxgbe/offload.h b/sys/dev/cxgbe/offload.h
index 992b4cd..0a452af 100644
--- a/sys/dev/cxgbe/offload.h
+++ b/sys/dev/cxgbe/offload.h
@@ -121,6 +121,7 @@ struct t4_virt_res { /* virtualized HW resources */
struct t4_range pbl;
struct t4_range qp;
struct t4_range cq;
+ struct t4_range srq;
struct t4_range ocq;
struct t4_range l2t;
};
diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index 54e55b4..1dc7691 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -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);
OpenPOWER on IntegriCloud