svn commit: r253873 - head/sys/dev/cxgbe

Navdeep Parhar np at FreeBSD.org
Thu Aug 1 23:38:30 UTC 2013


Author: np
Date: Thu Aug  1 23:38:30 2013
New Revision: 253873
URL: http://svnweb.freebsd.org/changeset/base/253873

Log:
  Set up congestion manager context properly for T5 based cards.
  
  MFC after:	3 days (will check with re@)

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Thu Aug  1 23:20:31 2013	(r253872)
+++ head/sys/dev/cxgbe/t4_sge.c	Thu Aug  1 23:38:30 2013	(r253873)
@@ -1872,6 +1872,22 @@ alloc_iq_fl(struct port_info *pi, struct
 		iq->flags |= IQ_HAS_FL;
 	}
 
+	if (is_t5(sc) && cong >= 0) {
+		uint32_t param, val;
+
+		param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) |
+		    V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) |
+		    V_FW_PARAMS_PARAM_YZ(iq->cntxt_id);
+		val = cong ? cong | 2 << 19 : 1 << 19;
+		rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, &param, &val);
+		if (rc != 0) {
+			/* report error but carry on */
+			device_printf(sc->dev,
+			    "failed to set congestion manager context for "
+			    "ingress queue %d: %d\n", iq->cntxt_id, rc);
+		}
+	}
+
 	/* Enable IQ interrupts */
 	atomic_store_rel_int(&iq->state, IQS_IDLE);
 	t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(iq->intr_params) |


More information about the svn-src-head mailing list