TCP was missing a couple of send and receive probes for dtrace, mostly in the syn-cache handling and the handling of the TIMEWAIT state. This patch fixes that.
Details
Details
- Reviewers
dteske markj rrs - Group Reviewers
transport - Commits
- rS347157: MFC r336932:
rS336932: Add missing send/recv dtrace probes for TCP.
Execute the tests from D16288.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sys/netinet/tcp_timewait.c | ||
|---|---|---|
| 458 ↗ | (On Diff #45626) | I would use an "else" here instead of adding an extra label and goto. |
| sys/netinet/tcp_timewait.c | ||
|---|---|---|
| 458 ↗ | (On Diff #45626) | So you would prefer: /*
* Acknowledge the segment if it has data or is not a duplicate ACK.
*/
if (thflags != TH_ACK || tlen != 0 ||
th->th_seq != tw->rcv_nxt || th->th_ack != tw->snd_nxt) {
TCP_PROBE5(receive, NULL, NULL, m, NULL, th);
tcp_twrespond(tw, TH_ACK);
} else {
drop:
TCP_PROBE5(receive, NULL, NULL, m, NULL, th);
}
INP_WUNLOCK(inp);
m_freem(m);
return (0);
}I thought about it, but didn't like the drop label inside an else clause... |
| sys/netinet/tcp_timewait.c | ||
|---|---|---|
| 458 ↗ | (On Diff #45626) | I don't prefer it strongly enough to insist upon it, especially since I don't work on TCP. :) The version here is fine with me. |
| sys/netinet/tcp_timewait.c | ||
|---|---|---|
| 458 ↗ | (On Diff #45626) | I like it with the label. The drop inside the else is not something |