From owner-svn-src-all@freebsd.org Mon Oct 14 20:32:14 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56200137447; Mon, 14 Oct 2019 20:32:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46sVbd6pGrz3NWm; Mon, 14 Oct 2019 20:32:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 197DEAACA; Mon, 14 Oct 2019 20:32:13 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x9EKWCZQ076129; Mon, 14 Oct 2019 20:32:12 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x9EKWBBM075324; Mon, 14 Oct 2019 20:32:11 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201910142032.x9EKWBBM075324@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 14 Oct 2019 20:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353518 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 353518 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2019 20:32:14 -0000 Author: tuexen Date: Mon Oct 14 20:32:11 2019 New Revision: 353518 URL: https://svnweb.freebsd.org/changeset/base/353518 Log: Separate out SCTP related dtrace code. This is based on work done by markj@. Discussed with: markj@ MFC after: 3 days Modified: head/sys/netinet/in_kdtrace.c head/sys/netinet/in_kdtrace.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_kdtrace.c head/sys/netinet/sctp_kdtrace.h head/sys/netinet/sctp_output.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/in_kdtrace.c ============================================================================== --- head/sys/netinet/in_kdtrace.c Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/in_kdtrace.c Mon Oct 14 20:32:11 2019 (r353518) @@ -31,16 +31,11 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_sctp.h" - #include #include #include SDT_PROVIDER_DEFINE(ip); -#ifdef SCTP -SDT_PROVIDER_DEFINE(sctp); -#endif SDT_PROVIDER_DEFINE(tcp); SDT_PROVIDER_DEFINE(udp); SDT_PROVIDER_DEFINE(udplite); @@ -60,30 +55,6 @@ SDT_PROBE_DEFINE6_XLATE(ip, , , send, "struct ifnet *", "ifinfo_t *", "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); - -#ifdef SCTP -SDT_PROBE_DEFINE5_XLATE(sctp, , , receive, - "void *", "pktinfo_t *", - "struct sctp_tcb *", "csinfo_t *", - "struct mbuf *", "ipinfo_t *", - "struct sctp_tcb *", "sctpsinfo_t *" , - "struct sctphdr *", "sctpinfo_t *"); - -SDT_PROBE_DEFINE5_XLATE(sctp, , , send, - "void *", "pktinfo_t *", - "struct sctp_tcb *", "csinfo_t *", - "uint8_t *", "ipinfo_t *", - "struct sctp_tcb *", "sctpsinfo_t *" , - "struct sctphdr *", "sctpinfo_t *"); - -SDT_PROBE_DEFINE6_XLATE(sctp, , , state__change, - "void *", "void *", - "struct sctp_tcb *", "csinfo_t *", - "void *", "void *", - "struct sctp_tcb *", "sctpsinfo_t *", - "void *", "void *", - "int", "sctplsinfo_t *"); -#endif SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", Modified: head/sys/netinet/in_kdtrace.h ============================================================================== --- head/sys/netinet/in_kdtrace.h Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/in_kdtrace.h Mon Oct 14 20:32:11 2019 (r353518) @@ -48,31 +48,14 @@ SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ SDT_PROBE6(tcp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) -#define SCTP_PROBE1(probe, arg0) \ - SDT_PROBE1(sctp, , , probe, arg0) -#define SCTP_PROBE2(probe, arg0, arg1) \ - SDT_PROBE2(sctp, , , probe, arg0, arg1) -#define SCTP_PROBE3(probe, arg0, arg1, arg2) \ - SDT_PROBE3(sctp, , , probe, arg0, arg1, arg2) -#define SCTP_PROBE4(probe, arg0, arg1, arg2, arg3) \ - SDT_PROBE4(sctp, , , probe, arg0, arg1, arg2, arg3) -#define SCTP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ - SDT_PROBE5(sctp, , , probe, arg0, arg1, arg2, arg3, arg4) -#define SCTP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ - SDT_PROBE6(sctp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) SDT_PROVIDER_DECLARE(ip); -SDT_PROVIDER_DECLARE(sctp); SDT_PROVIDER_DECLARE(tcp); SDT_PROVIDER_DECLARE(udp); SDT_PROVIDER_DECLARE(udplite); SDT_PROBE_DECLARE(ip, , , receive); SDT_PROBE_DECLARE(ip, , , send); - -SDT_PROBE_DECLARE(sctp, , , receive); -SDT_PROBE_DECLARE(sctp, , , send); -SDT_PROBE_DECLARE(sctp, , , state__change); SDT_PROBE_DECLARE(tcp, , , accept__established); SDT_PROBE_DECLARE(tcp, , , accept__refused); Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/sctp_input.c Mon Oct 14 20:32:11 2019 (r353518) @@ -49,10 +49,10 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET) || defined(INET6) #include #endif -#include #include Modified: head/sys/netinet/sctp_kdtrace.c ============================================================================== --- head/sys/netinet/sctp_kdtrace.c Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/sctp_kdtrace.c Mon Oct 14 20:32:11 2019 (r353518) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include -SDT_PROVIDER_DECLARE(sctp); +SDT_PROVIDER_DEFINE(sctp); /********************************************************/ /* Cwnd probe - tracks changes in the congestion window on a netp */ @@ -171,3 +171,29 @@ SDT_PROBE_DEFINE4(sctp, flightsize, assoc, val, * order. */ "int", /* The up/down amount */ "int"); /* The new value of the cwnd */ + +/* + * Standard Solaris-compatible probes. + */ + +SDT_PROBE_DEFINE5_XLATE(sctp,,, receive, + "void *", "pktinfo_t *", + "struct sctp_tcb *", "csinfo_t *", + "struct mbuf *", "ipinfo_t *", + "struct sctp_tcb *", "sctpsinfo_t *", + "struct sctphdr *", "sctpinfo_t *"); + +SDT_PROBE_DEFINE5_XLATE(sctp,,, send, + "void *", "pktinfo_t *", + "struct sctp_tcb *", "csinfo_t *", + "uint8_t *", "ipinfo_t *", + "struct sctp_tcb *", "sctpsinfo_t *", + "struct sctphdr *", "sctpinfo_t *"); + +SDT_PROBE_DEFINE6_XLATE(sctp,,, state__change, + "void *", "void *", + "struct sctp_tcb *", "csinfo_t *", + "void *", "void *", + "struct sctp_tcb *", "sctpsinfo_t *", + "void *", "void *", + "int", "sctplsinfo_t *"); Modified: head/sys/netinet/sctp_kdtrace.h ============================================================================== --- head/sys/netinet/sctp_kdtrace.h Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/sctp_kdtrace.h Mon Oct 14 20:32:11 2019 (r353518) @@ -34,12 +34,25 @@ #include __FBSDID("$FreeBSD$"); -#ifndef _NETINET_SCTP_DTRACE_DECLARE_H_ -#define _NETINET_SCTP_DTRACE_DECLARE_H_ +#ifndef _NETINET_SCTP_KDTRACE_H_ +#define _NETINET_SCTP_KDTRACE_H_ #include #include +#define SCTP_PROBE1(probe, arg0) \ + SDT_PROBE1(sctp, , , probe, arg0) +#define SCTP_PROBE2(probe, arg0, arg1) \ + SDT_PROBE2(sctp, , , probe, arg0, arg1) +#define SCTP_PROBE3(probe, arg0, arg1, arg2) \ + SDT_PROBE3(sctp, , , probe, arg0, arg1, arg2) +#define SCTP_PROBE4(probe, arg0, arg1, arg2, arg3) \ + SDT_PROBE4(sctp, , , probe, arg0, arg1, arg2, arg3) +#define SCTP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ + SDT_PROBE5(sctp, , , probe, arg0, arg1, arg2, arg3, arg4) +#define SCTP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ + SDT_PROBE6(sctp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) + /* Declare the SCTP provider */ SDT_PROVIDER_DECLARE(sctp); @@ -63,19 +76,15 @@ SDT_PROBE_DECLARE(sctp, cwnd, net, pd); /* Rttvar probe declaration */ SDT_PROBE_DECLARE(sctp, cwnd, net, rttvar); SDT_PROBE_DECLARE(sctp, cwnd, net, rttstep); - /* One to track an associations rwnd */ SDT_PROBE_DECLARE(sctp, rwnd, assoc, val); - /* One to track a net's flight size */ SDT_PROBE_DECLARE(sctp, flightsize, net, val); - /* One to track an associations flight size */ SDT_PROBE_DECLARE(sctp, flightsize, assoc, val); - - - - - +/* Standard Solaris compatible probes */ +SDT_PROBE_DECLARE(sctp,,, receive); +SDT_PROBE_DECLARE(sctp,,, send); +SDT_PROBE_DECLARE(sctp,,, state__change); #endif Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/sctp_output.c Mon Oct 14 20:32:11 2019 (r353518) @@ -52,12 +52,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET) || defined(INET6) #include #endif #include #include -#include Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Oct 14 20:32:08 2019 (r353517) +++ head/sys/netinet/sctputil.c Mon Oct 14 20:32:11 2019 (r353518) @@ -51,12 +51,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #if defined(INET6) || defined(INET) #include #endif #include #include -#include #include #ifdef INET6 #include