1671d68faSMark Johnston /*- 2671d68faSMark Johnston * SPDX-License-Identifier: BSD-3-Clause 3671d68faSMark Johnston * 4671d68faSMark Johnston * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. 5671d68faSMark Johnston * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. 6671d68faSMark Johnston * 7671d68faSMark Johnston * Redistribution and use in source and binary forms, with or without 8671d68faSMark Johnston * modification, are permitted provided that the following conditions are met: 9671d68faSMark Johnston * 10671d68faSMark Johnston * a) Redistributions of source code must retain the above copyright notice, 11671d68faSMark Johnston * this list of conditions and the following disclaimer. 12671d68faSMark Johnston * 13671d68faSMark Johnston * b) Redistributions in binary form must reproduce the above copyright 14671d68faSMark Johnston * notice, this list of conditions and the following disclaimer in 15671d68faSMark Johnston * the documentation and/or other materials provided with the distribution. 16671d68faSMark Johnston * 17671d68faSMark Johnston * c) Neither the name of Cisco Systems, Inc. nor the names of its 18671d68faSMark Johnston * contributors may be used to endorse or promote products derived 19671d68faSMark Johnston * from this software without specific prior written permission. 20671d68faSMark Johnston * 21671d68faSMark Johnston * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22671d68faSMark Johnston * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 23671d68faSMark Johnston * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24671d68faSMark Johnston * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25671d68faSMark Johnston * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26671d68faSMark Johnston * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27671d68faSMark Johnston * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28671d68faSMark Johnston * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29671d68faSMark Johnston * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30671d68faSMark Johnston * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 31671d68faSMark Johnston * THE POSSIBILITY OF SUCH DAMAGE. 32671d68faSMark Johnston */ 33671d68faSMark Johnston 34671d68faSMark Johnston #include <sys/param.h> 35671d68faSMark Johnston #include <sys/kernel.h> 36671d68faSMark Johnston #include <sys/sdt.h> 37671d68faSMark Johnston 38*776cd558SMichael Tuexen SDT_PROVIDER_DEFINE(sctp); 39671d68faSMark Johnston 40671d68faSMark Johnston /********************************************************/ 41671d68faSMark Johnston /* Cwnd probe - tracks changes in the congestion window on a netp */ 42671d68faSMark Johnston /********************************************************/ 43671d68faSMark Johnston /* Initial */ 44671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, init, 45671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 46671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 47671d68faSMark Johnston * port number of remote in network byte 48671d68faSMark Johnston * order. */ 49671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 50671d68faSMark Johnston * changing */ 51671d68faSMark Johnston "int", /* The old value of the cwnd */ 52671d68faSMark Johnston "int"); /* The new value of the cwnd */ 53671d68faSMark Johnston 54671d68faSMark Johnston /* ACK-INCREASE */ 55671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, ack, 56671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 57671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 58671d68faSMark Johnston * port number of remote in network byte 59671d68faSMark Johnston * order. */ 60671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 61671d68faSMark Johnston * changing */ 62671d68faSMark Johnston "int", /* The old value of the cwnd */ 63671d68faSMark Johnston "int"); /* The new value of the cwnd */ 64671d68faSMark Johnston 65671d68faSMark Johnston /* ACK-INCREASE */ 66671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, rttvar, 67671d68faSMark Johnston "uint64_t", /* The Vtag << 32 | localport << 16 | 68671d68faSMark Johnston * remoteport */ 69671d68faSMark Johnston "uint64_t", /* obw | nbw */ 70671d68faSMark Johnston "uint64_t", /* bwrtt | newrtt */ 71671d68faSMark Johnston "uint64_t", /* flight */ 72671d68faSMark Johnston "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */ 73671d68faSMark Johnston 74671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, rttstep, 75671d68faSMark Johnston "uint64_t", /* The Vtag << 32 | localport << 16 | 76671d68faSMark Johnston * remoteport */ 77671d68faSMark Johnston "uint64_t", /* obw | nbw */ 78671d68faSMark Johnston "uint64_t", /* bwrtt | newrtt */ 79671d68faSMark Johnston "uint64_t", /* flight */ 80671d68faSMark Johnston "uint64_t"); /* (cwnd << 32) | point << 16 | retval(0/1) */ 81671d68faSMark Johnston 82671d68faSMark Johnston /* FastRetransmit-DECREASE */ 83671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, fr, 84671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 85671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 86671d68faSMark Johnston * port number of remote in network byte 87671d68faSMark Johnston * order. */ 88671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 89671d68faSMark Johnston * changing */ 90671d68faSMark Johnston "int", /* The old value of the cwnd */ 91671d68faSMark Johnston "int"); /* The new value of the cwnd */ 92671d68faSMark Johnston 93671d68faSMark Johnston /* TimeOut-DECREASE */ 94671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, to, 95671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 96671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 97671d68faSMark Johnston * port number of remote in network byte 98671d68faSMark Johnston * order. */ 99671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 100671d68faSMark Johnston * changing */ 101671d68faSMark Johnston "int", /* The old value of the cwnd */ 102671d68faSMark Johnston "int"); /* The new value of the cwnd */ 103671d68faSMark Johnston 104671d68faSMark Johnston /* BurstLimit-DECREASE */ 105671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, bl, 106671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 107671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 108671d68faSMark Johnston * port number of remote in network byte 109671d68faSMark Johnston * order. */ 110671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 111671d68faSMark Johnston * changing */ 112671d68faSMark Johnston "int", /* The old value of the cwnd */ 113671d68faSMark Johnston "int"); /* The new value of the cwnd */ 114671d68faSMark Johnston 115671d68faSMark Johnston /* ECN-DECREASE */ 116671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, ecn, 117671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 118671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 119671d68faSMark Johnston * port number of remote in network byte 120671d68faSMark Johnston * order. */ 121671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 122671d68faSMark Johnston * changing */ 123671d68faSMark Johnston "int", /* The old value of the cwnd */ 124671d68faSMark Johnston "int"); /* The new value of the cwnd */ 125671d68faSMark Johnston 126671d68faSMark Johnston /* PacketDrop-DECREASE */ 127671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, cwnd, net, pd, 128671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 129671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 130671d68faSMark Johnston * port number of remote in network byte 131671d68faSMark Johnston * order. */ 132671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 133671d68faSMark Johnston * changing */ 134671d68faSMark Johnston "int", /* The old value of the cwnd */ 135671d68faSMark Johnston "int"); /* The new value of the cwnd */ 136671d68faSMark Johnston 137671d68faSMark Johnston /********************************************************/ 138671d68faSMark Johnston /* Rwnd probe - tracks changes in the receiver window for an assoc */ 139671d68faSMark Johnston /********************************************************/ 140671d68faSMark Johnston SDT_PROBE_DEFINE4(sctp, rwnd, assoc, val, 141671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 142671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 143671d68faSMark Johnston * port number of remote in network byte 144671d68faSMark Johnston * order. */ 145671d68faSMark Johnston "int", /* The up/down amount */ 146671d68faSMark Johnston "int"); /* The new value of the cwnd */ 147671d68faSMark Johnston 148671d68faSMark Johnston /********************************************************/ 149671d68faSMark Johnston /* flight probe - tracks changes in the flight size on a net or assoc */ 150671d68faSMark Johnston /********************************************************/ 151671d68faSMark Johnston SDT_PROBE_DEFINE5(sctp, flightsize, net, val, 152671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 153671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 154671d68faSMark Johnston * port number of remote in network byte 155671d68faSMark Johnston * order. */ 156671d68faSMark Johnston "uintptr_t", /* The pointer to the struct sctp_nets * 157671d68faSMark Johnston * changing */ 158671d68faSMark Johnston "int", /* The up/down amount */ 159671d68faSMark Johnston "int"); /* The new value of the cwnd */ 160671d68faSMark Johnston 161671d68faSMark Johnston /********************************************************/ 162671d68faSMark Johnston /* The total flight version */ 163671d68faSMark Johnston /********************************************************/ 164671d68faSMark Johnston SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val, 165671d68faSMark Johnston "uint32_t", /* The Vtag for this end */ 166671d68faSMark Johnston "uint32_t", /* The port number of the local side << 16 | 167671d68faSMark Johnston * port number of remote in network byte 168671d68faSMark Johnston * order. */ 169671d68faSMark Johnston "int", /* The up/down amount */ 170671d68faSMark Johnston "int"); /* The new value of the cwnd */ 171*776cd558SMichael Tuexen 172*776cd558SMichael Tuexen /* 173*776cd558SMichael Tuexen * Standard Solaris-compatible probes. 174*776cd558SMichael Tuexen */ 175*776cd558SMichael Tuexen 176*776cd558SMichael Tuexen SDT_PROBE_DEFINE5_XLATE(sctp,,, receive, 177*776cd558SMichael Tuexen "void *", "pktinfo_t *", 178*776cd558SMichael Tuexen "struct sctp_tcb *", "csinfo_t *", 179*776cd558SMichael Tuexen "struct mbuf *", "ipinfo_t *", 180*776cd558SMichael Tuexen "struct sctp_tcb *", "sctpsinfo_t *", 181*776cd558SMichael Tuexen "struct sctphdr *", "sctpinfo_t *"); 182*776cd558SMichael Tuexen 183*776cd558SMichael Tuexen SDT_PROBE_DEFINE5_XLATE(sctp,,, send, 184*776cd558SMichael Tuexen "void *", "pktinfo_t *", 185*776cd558SMichael Tuexen "struct sctp_tcb *", "csinfo_t *", 186*776cd558SMichael Tuexen "uint8_t *", "ipinfo_t *", 187*776cd558SMichael Tuexen "struct sctp_tcb *", "sctpsinfo_t *", 188*776cd558SMichael Tuexen "struct sctphdr *", "sctpinfo_t *"); 189*776cd558SMichael Tuexen 190*776cd558SMichael Tuexen SDT_PROBE_DEFINE6_XLATE(sctp,,, state__change, 191*776cd558SMichael Tuexen "void *", "void *", 192*776cd558SMichael Tuexen "struct sctp_tcb *", "csinfo_t *", 193*776cd558SMichael Tuexen "void *", "void *", 194*776cd558SMichael Tuexen "struct sctp_tcb *", "sctpsinfo_t *", 195*776cd558SMichael Tuexen "void *", "void *", 196*776cd558SMichael Tuexen "int", "sctplsinfo_t *"); 197