Date: Wed, 1 Jul 2020 18:10:37 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r362850 - stable/12/sys/netinet Message-ID: <202007011810.061IAbQm090057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed Jul 1 18:10:37 2020 New Revision: 362850 URL: https://svnweb.freebsd.org/changeset/base/362850 Log: MFC r353518: Separate out SCTP related dtrace code. This is based on work done by markj. Modified: stable/12/sys/netinet/in_kdtrace.c stable/12/sys/netinet/in_kdtrace.h stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_kdtrace.c stable/12/sys/netinet/sctp_kdtrace.h stable/12/sys/netinet/sctp_output.c stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/in_kdtrace.c ============================================================================== --- stable/12/sys/netinet/in_kdtrace.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/in_kdtrace.c Wed Jul 1 18:10:37 2020 (r362850) @@ -31,16 +31,11 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_sctp.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/sdt.h> 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: stable/12/sys/netinet/in_kdtrace.h ============================================================================== --- stable/12/sys/netinet/in_kdtrace.h Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/in_kdtrace.h Wed Jul 1 18:10:37 2020 (r362850) @@ -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: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_input.c Wed Jul 1 18:10:37 2020 (r362850) @@ -49,10 +49,10 @@ __FBSDID("$FreeBSD$"); #include <netinet/sctp_bsd_addr.h> #include <netinet/sctp_timer.h> #include <netinet/sctp_crc32.h> +#include <netinet/sctp_kdtrace.h> #if defined(INET) || defined(INET6) #include <netinet/udp.h> #endif -#include <netinet/in_kdtrace.h> #include <sys/smp.h> Modified: stable/12/sys/netinet/sctp_kdtrace.c ============================================================================== --- stable/12/sys/netinet/sctp_kdtrace.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_kdtrace.c Wed Jul 1 18:10:37 2020 (r362850) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/sdt.h> -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: stable/12/sys/netinet/sctp_kdtrace.h ============================================================================== --- stable/12/sys/netinet/sctp_kdtrace.h Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_kdtrace.h Wed Jul 1 18:10:37 2020 (r362850) @@ -34,12 +34,25 @@ #include <sys/cdefs.h> __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 <sys/kernel.h> #include <sys/sdt.h> +#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: stable/12/sys/netinet/sctp_output.c ============================================================================== --- stable/12/sys/netinet/sctp_output.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctp_output.c Wed Jul 1 18:10:37 2020 (r362850) @@ -52,12 +52,12 @@ __FBSDID("$FreeBSD$"); #include <netinet/sctp_bsd_addr.h> #include <netinet/sctp_input.h> #include <netinet/sctp_crc32.h> +#include <netinet/sctp_kdtrace.h> #if defined(INET) || defined(INET6) #include <netinet/udp.h> #endif #include <netinet/udp_var.h> #include <machine/in_cksum.h> -#include <netinet/in_kdtrace.h> Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Wed Jul 1 18:08:59 2020 (r362849) +++ stable/12/sys/netinet/sctputil.c Wed Jul 1 18:10:37 2020 (r362850) @@ -51,12 +51,12 @@ __FBSDID("$FreeBSD$"); #include <netinet/sctp_auth.h> #include <netinet/sctp_asconf.h> #include <netinet/sctp_bsd_addr.h> +#include <netinet/sctp_kdtrace.h> #if defined(INET6) || defined(INET) #include <netinet/tcp_var.h> #endif #include <netinet/udp.h> #include <netinet/udp_var.h> -#include <netinet/in_kdtrace.h> #include <sys/proc.h> #ifdef INET6 #include <netinet/icmp6.h>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007011810.061IAbQm090057>