Date: Thu, 10 May 2018 00:04:15 +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: r333442 - in head/sys/dev/cxgbe: . common Message-ID: <201805100004.w4A04FXL080770@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Thu May 10 00:04:14 2018 New Revision: 333442 URL: https://svnweb.freebsd.org/changeset/base/333442 Log: cxgbe(4): Determine whether the firmware supports the FILTER2 work request, which can be used to configure hardware NAT and swapmac. All firmwares released after Jan 2017 support this work request. Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h ============================================================================== --- head/sys/dev/cxgbe/common/common.h Wed May 9 21:50:20 2018 (r333441) +++ head/sys/dev/cxgbe/common/common.h Thu May 10 00:04:14 2018 (r333442) @@ -371,6 +371,7 @@ struct adapter_params { unsigned int bypass:1; /* this is a bypass card */ unsigned int ethoffload:1; unsigned int hash_filter:1; + unsigned int filter2_wr_support:1; unsigned int ofldq_wr_cred; unsigned int eo_wr_cred; Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed May 9 21:50:20 2018 (r333441) +++ head/sys/dev/cxgbe/t4_main.c Thu May 10 00:04:14 2018 (r333442) @@ -3631,6 +3631,18 @@ get_params__post_init(struct adapter *sc) else sc->params.mps_bg_map = 0; + /* + * Determine whether the firmware supports the filter2 work request. + * This is queried separately for the same reason as MPSBGMAP above. + */ + param[0] = FW_PARAM_DEV(FILTER2_WR); + val[0] = 0; + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, param, val); + if (rc == 0) + sc->params.filter2_wr_support = val[0] != 0; + else + sc->params.filter2_wr_support = 0; + /* get capabilites */ bzero(&caps, sizeof(caps)); caps.op_to_write = htobe32(V_FW_CMD_OP(FW_CAPS_CONFIG_CMD) |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805100004.w4A04FXL080770>