git: a9f0cf4838cb - main - cxgbe: Fix some merge-o's for the per-rxq iSCSI counters.
John Baldwin
jhb at FreeBSD.org
Wed May 19 22:57:35 UTC 2021
The branch main has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=a9f0cf4838cb1991707fa32e1cf363ea18076249
commit a9f0cf4838cb1991707fa32e1cf363ea18076249
Author: John Baldwin <jhb at FreeBSD.org>
AuthorDate: 2021-05-19 22:56:31 +0000
Commit: John Baldwin <jhb at FreeBSD.org>
CommitDate: 2021-05-19 22:56:31 +0000
cxgbe: Fix some merge-o's for the per-rxq iSCSI counters.
I botched a few of the changes when rebasing the changes in
4b6ed0758dc6fad17081d7bd791cb0edbddbddb8 across the changes in
43bbae19483fbde0a91e61acad8a6e71e334c8b8.
- Move the counter allocations into alloc_ofld_rxq().
- Free the counters freeing an ofld rxq.
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D30267
---
sys/dev/cxgbe/t4_sge.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys/dev/cxgbe/t4_sge.c b/sys/dev/cxgbe/t4_sge.c
index ac79d8002784..8a5dc6acc745 100644
--- a/sys/dev/cxgbe/t4_sge.c
+++ b/sys/dev/cxgbe/t4_sge.c
@@ -4070,6 +4070,9 @@ alloc_ofld_rxq(struct vi_info *vi, struct sge_ofld_rxq *ofld_rxq, int idx,
return (rc);
}
MPASS(ofld_rxq->iq.flags & IQ_SW_ALLOCATED);
+ ofld_rxq->rx_iscsi_ddp_setup_ok = counter_u64_alloc(M_WAITOK);
+ ofld_rxq->rx_iscsi_ddp_setup_error =
+ counter_u64_alloc(M_WAITOK);
add_ofld_rxq_sysctls(&vi->ctx, oid, ofld_rxq);
}
@@ -4102,6 +4105,8 @@ free_ofld_rxq(struct vi_info *vi, struct sge_ofld_rxq *ofld_rxq)
MPASS(!(ofld_rxq->iq.flags & IQ_HW_ALLOCATED));
free_iq_fl(vi->adapter, &ofld_rxq->iq, &ofld_rxq->fl);
MPASS(!(ofld_rxq->iq.flags & IQ_SW_ALLOCATED));
+ counter_u64_free(ofld_rxq->rx_iscsi_ddp_setup_ok);
+ counter_u64_free(ofld_rxq->rx_iscsi_ddp_setup_error);
bzero(ofld_rxq, sizeof(*ofld_rxq));
}
}
@@ -4127,8 +4132,6 @@ add_ofld_rxq_sysctls(struct sysctl_ctx_list *ctx, struct sysctl_oid *oid,
CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "TOE iSCSI statistics");
children = SYSCTL_CHILDREN(oid);
- ofld_rxq->rx_iscsi_ddp_setup_ok = counter_u64_alloc(M_WAITOK);
- ofld_rxq->rx_iscsi_ddp_setup_error = counter_u64_alloc(M_WAITOK);
SYSCTL_ADD_COUNTER_U64(ctx, children, OID_AUTO, "ddp_setup_ok",
CTLFLAG_RD, &ofld_rxq->rx_iscsi_ddp_setup_ok,
"# of times DDP buffer was setup successfully.");
More information about the dev-commits-src-main
mailing list