summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_pcb.h
diff options
context:
space:
mode:
authorrrs <rrs@FreeBSD.org>2011-02-03 11:52:22 +0000
committerrrs <rrs@FreeBSD.org>2011-02-03 11:52:22 +0000
commit4d632ac7a73ec1c318e0c2aeca0d01609a52dcc6 (patch)
treeb5821cc4586f3c279069f54470f7cbef91c71f88 /sys/netinet/sctp_pcb.h
parentd2daebca5a3e66dcf1823aec44dcbeb61f5fe78e (diff)
downloadFreeBSD-src-4d632ac7a73ec1c318e0c2aeca0d01609a52dcc6.zip
FreeBSD-src-4d632ac7a73ec1c318e0c2aeca0d01609a52dcc6.tar.gz
Fix the per CPU stats so that:
1) They don't use the giant "MAX_CPU" define and instead are allocated dynamically based on mp_ncpus 2) Will zero with the netstat -z -s -p sctp 3) Will be properly handled by both the sctp_init and finish (the multi-net stuff was incorrectly bzero'ing in sctp_init the wrong size.. the bzero is now moved to the right places). And of course the free is put in at the very end. MFC after: 3 Months
Diffstat (limited to 'sys/netinet/sctp_pcb.h')
-rw-r--r--sys/netinet/sctp_pcb.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/sctp_pcb.h b/sys/netinet/sctp_pcb.h
index fb7857e..44b2fa8 100644
--- a/sys/netinet/sctp_pcb.h
+++ b/sys/netinet/sctp_pcb.h
@@ -1,6 +1,8 @@
/*-
* Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved.
- *
+ * Copyright (c) 2008-2011, by Randall Stewart, rrs@lakerest.net and
+ * Michael Tuexen, tuexen@fh-muenster.de
+ * All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
@@ -240,7 +242,7 @@ struct sctp_base_info {
*/
struct sctp_epinfo sctppcbinfo;
#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT)
- struct sctpstat sctpstat[MAXCPU];
+ struct sctpstat *sctpstat;
#else
struct sctpstat sctpstat;
#endif
OpenPOWER on IntegriCloud