aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2021-05-19 22:56:31 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2021-05-19 22:56:31 +0000
commita9f0cf4838cb1991707fa32e1cf363ea18076249 (patch)
tree26408f79934b38e5ac5c3186c79c9231c2f92770
parent77b637338a3656d4ccedb9798a3f98ac283962f4 (diff)
downloadsrc-a9f0cf4838cb1991707fa32e1cf363ea18076249.tar.gz
src-a9f0cf4838cb1991707fa32e1cf363ea18076249.zip
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
-rw-r--r--sys/dev/cxgbe/t4_sge.c7
1 files 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.");