svn commit: r366247 - head/sys/dev/cxgbe
Navdeep Parhar
np at FreeBSD.org
Tue Sep 29 09:25:53 UTC 2020
Author: np
Date: Tue Sep 29 09:25:52 2020
New Revision: 366247
URL: https://svnweb.freebsd.org/changeset/base/366247
Log:
cxgbe(4): Avoid unnecessary work in the firmware during netmap tx.
Bind the netmap tx queues to a special '0xff' scheduling class which
makes the firmware skip some processing related to rate limiting on the
outgoing traffic. Future firmwares will do this automatically.
MFC after: 1 week
Sponsored by: Chelsio Communications
Modified:
head/sys/dev/cxgbe/t4_netmap.c
Modified: head/sys/dev/cxgbe/t4_netmap.c
==============================================================================
--- head/sys/dev/cxgbe/t4_netmap.c Tue Sep 29 09:11:51 2020 (r366246)
+++ head/sys/dev/cxgbe/t4_netmap.c Tue Sep 29 09:25:52 2020 (r366247)
@@ -329,6 +329,22 @@ alloc_nm_txq_hwq(struct vi_info *vi, struct sge_nm_txq
nm_txq->udb = (volatile void *)udb;
}
+ if (sc->params.fw_vers < FW_VERSION32(1, 25, 1, 0)) {
+ uint32_t param, val;
+
+ param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) |
+ V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_EQ_SCHEDCLASS_ETH) |
+ V_FW_PARAMS_PARAM_YZ(nm_txq->cntxt_id);
+ val = 0xff;
+ rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val);
+ if (rc != 0) {
+ device_printf(vi->dev,
+ "failed to bind netmap txq %d to class 0xff: %d\n",
+ nm_txq->cntxt_id, rc);
+ rc = 0;
+ }
+ }
+
return (rc);
}
More information about the svn-src-all
mailing list