Date: Mon, 5 Oct 2020 19:22:28 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r366460 - stable/12/sys/dev/cxgbe Message-ID: <202010051922.095JMSFn040277@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Mon Oct 5 19:22:28 2020 New Revision: 366460 URL: https://svnweb.freebsd.org/changeset/base/366460 Log: MFC r366247: 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. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/t4_netmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/t4_netmap.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 18:59:10 2020 (r366459) +++ stable/12/sys/dev/cxgbe/t4_netmap.c Mon Oct 5 19:22:28 2020 (r366460) @@ -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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010051922.095JMSFn040277>