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
This commit is contained in:
Navdeep Parhar 2018-05-10 00:04:14 +00:00
parent e3d5c4ade1
commit 5174205de5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333442
2 changed files with 13 additions and 0 deletions

View File

@ -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;

View File

@ -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) |