git: cd9da8d072e4 - main - siftr: unbreak dtrace support
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 01 Jul 2023 08:00:59 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=cd9da8d072e4dff4c1eda7307547c6a5a1e5bd35 commit cd9da8d072e4dff4c1eda7307547c6a5a1e5bd35 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2023-07-01 07:50:54 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2023-07-01 07:50:54 +0000 siftr: unbreak dtrace support This patch adds back some fields needed by the siftr probe, which were removed in https://cgit.freebsd.org/src/commit/?id=aa61cff4249c92689d7a1f15db49d65d082184cb With this fix, you can run dtrace scripts again when the siftr module is loaded. And the siftr probe works again. Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D40826 --- sys/netinet/siftr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 930ba6365f26..abbb72a05b06 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -160,6 +160,12 @@ struct pkt_node { DIR_IN = 0, DIR_OUT = 1, } direction; + /* IP version pkt_node relates to; either INP_IPV4 or INP_IPV6. */ + uint8_t ipver; + /* Local TCP port. */ + uint16_t tcp_localport; + /* Foreign TCP port. */ + uint16_t tcp_foreignport; /* Congestion Window (bytes). */ uint32_t snd_cwnd; /* Sending Window (bytes). */ @@ -635,6 +641,9 @@ static inline void siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, int ipver, int dir, int inp_locally_locked) { + pn->ipver = ipver; + pn->tcp_localport = inp->inp_lport; + pn->tcp_foreignport = inp->inp_fport; pn->snd_cwnd = tp->snd_cwnd; pn->snd_wnd = tp->snd_wnd; pn->rcv_wnd = tp->rcv_wnd;