Fetch TLS key parameters from the firmware.
The parameters describe how much of the adapter's memory is reserved for storing TLS keys. The 'meminfo' sysctl now lists this region of adapter memory as 'TLS keys' if present. Sponsored by: Chelsio Communications
This commit is contained in:
parent
3304fa6bd1
commit
1832e4d5e2
@ -126,6 +126,7 @@ struct t4_virt_res { /* virtualized HW resources */
|
||||
struct t4_range srq;
|
||||
struct t4_range ocq;
|
||||
struct t4_range l2t;
|
||||
struct t4_range key;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
@ -3662,6 +3662,18 @@ get_params__post_init(struct adapter *sc)
|
||||
sc->vres.iscsi.start = val[0];
|
||||
sc->vres.iscsi.size = val[1] - val[0] + 1;
|
||||
}
|
||||
if (sc->cryptocaps & FW_CAPS_CONFIG_TLSKEYS) {
|
||||
param[0] = FW_PARAM_PFVF(TLS_START);
|
||||
param[1] = FW_PARAM_PFVF(TLS_END);
|
||||
rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 2, param, val);
|
||||
if (rc != 0) {
|
||||
device_printf(sc->dev,
|
||||
"failed to query TLS parameters: %d.\n", rc);
|
||||
return (rc);
|
||||
}
|
||||
sc->vres.key.start = val[0];
|
||||
sc->vres.key.size = val[1] - val[0] + 1;
|
||||
}
|
||||
|
||||
t4_init_sge_params(sc);
|
||||
|
||||
@ -7006,7 +7018,7 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS)
|
||||
"TDDP region:", "TPT region:", "STAG region:", "RQ region:",
|
||||
"RQUDP region:", "PBL region:", "TXPBL region:",
|
||||
"DBVFIFO region:", "ULPRX state:", "ULPTX state:",
|
||||
"On-chip queues:"
|
||||
"On-chip queues:", "TLS keys:",
|
||||
};
|
||||
struct mem_desc avail[4];
|
||||
struct mem_desc mem[nitems(region) + 3]; /* up to 3 holes */
|
||||
@ -7146,6 +7158,13 @@ sysctl_meminfo(SYSCTL_HANDLER_ARGS)
|
||||
md->idx = nitems(region); /* hide it */
|
||||
md++;
|
||||
|
||||
md->base = sc->vres.key.start;
|
||||
if (sc->vres.key.size)
|
||||
md->limit = md->base + sc->vres.key.size - 1;
|
||||
else
|
||||
md->idx = nitems(region); /* hide it */
|
||||
md++;
|
||||
|
||||
/* add any address-space holes, there can be up to 3 */
|
||||
for (n = 0; n < i - 1; n++)
|
||||
if (avail[n].limit < avail[n + 1].base)
|
||||
|
Loading…
Reference in New Issue
Block a user