Rename TOE TLS stats from [rt]x_tls_* to [rt]x_toe_tls_*.

This more clearly differentiates TLS records encrypted and decrypted
in TOE connections from those encrypted via NIC TLS.

MFC after:	1 week
Sponsored by:	Chelsio Communications
This commit is contained in:
John Baldwin 2020-02-28 00:42:27 +00:00
parent dfa4261db4
commit 6d44e8e6b5
3 changed files with 18 additions and 18 deletions

View File

@ -308,10 +308,10 @@ struct port_info {
struct port_stats stats;
u_int tnl_cong_drops;
u_int tx_parse_error;
u_long tx_tls_records;
u_long tx_tls_octets;
u_long rx_tls_records;
u_long rx_tls_octets;
u_long tx_toe_tls_records;
u_long tx_toe_tls_octets;
u_long rx_toe_tls_records;
u_long rx_toe_tls_octets;
struct callout tick;
};

View File

@ -7047,17 +7047,17 @@ cxgbe_sysctls(struct port_info *pi)
#undef SYSCTL_ADD_T4_PORTSTAT
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_records",
CTLFLAG_RD, &pi->tx_tls_records,
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_toe_tls_records",
CTLFLAG_RD, &pi->tx_toe_tls_records,
"# of TOE TLS records transmitted");
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_tls_octets",
CTLFLAG_RD, &pi->tx_tls_octets,
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "tx_toe_tls_octets",
CTLFLAG_RD, &pi->tx_toe_tls_octets,
"# of payload octets in transmitted TOE TLS records");
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_records",
CTLFLAG_RD, &pi->rx_tls_records,
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_toe_tls_records",
CTLFLAG_RD, &pi->rx_toe_tls_records,
"# of TOE TLS records received");
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_tls_octets",
CTLFLAG_RD, &pi->rx_tls_octets,
SYSCTL_ADD_ULONG(ctx, children, OID_AUTO, "rx_toe_tls_octets",
CTLFLAG_RD, &pi->rx_toe_tls_octets,
"# of payload octets in received TOE TLS records");
}

View File

@ -1559,8 +1559,8 @@ t4_push_tls_records(struct adapter *sc, struct toepcb *toep, int drop)
}
toep->txsd_avail--;
atomic_add_long(&toep->vi->pi->tx_tls_records, 1);
atomic_add_long(&toep->vi->pi->tx_tls_octets, plen);
atomic_add_long(&toep->vi->pi->tx_toe_tls_records, 1);
atomic_add_long(&toep->vi->pi->tx_toe_tls_octets, plen);
t4_l2t_send(sc, wr, toep->l2te);
}
@ -1862,8 +1862,8 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop)
}
toep->txsd_avail--;
atomic_add_long(&toep->vi->pi->tx_tls_records, 1);
atomic_add_long(&toep->vi->pi->tx_tls_octets, m->m_len);
atomic_add_long(&toep->vi->pi->tx_toe_tls_records, 1);
atomic_add_long(&toep->vi->pi->tx_toe_tls_octets, m->m_len);
t4_l2t_send(sc, wr, toep->l2te);
}
@ -1899,7 +1899,7 @@ do_tls_data(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
m_adj(m, sizeof(*cpl));
len = m->m_pkthdr.len;
atomic_add_long(&toep->vi->pi->rx_tls_octets, len);
atomic_add_long(&toep->vi->pi->rx_toe_tls_octets, len);
KASSERT(len == G_CPL_TLS_DATA_LENGTH(be32toh(cpl->length_pkd)),
("%s: payload length mismatch", __func__));
@ -1962,7 +1962,7 @@ do_rx_tls_cmp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m)
m_adj(m, sizeof(*cpl));
len = m->m_pkthdr.len;
atomic_add_long(&toep->vi->pi->rx_tls_records, 1);
atomic_add_long(&toep->vi->pi->rx_toe_tls_records, 1);
KASSERT(len == G_CPL_RX_TLS_CMP_LENGTH(be32toh(cpl->pdulength_length)),
("%s: payload length mismatch", __func__));