Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F170747928
D59453.id185952.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D59453.id185952.diff
View Options
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -2479,10 +2479,8 @@
* say srtt etc into the general one used by other stacks.
*/
if (tp->t_rttupdated >= 4) {
- struct tcp_hc_metrics metrics;
uint32_t ssthresh;
- bzero(&metrics, sizeof(metrics));
/*
* Update the ssthresh always when the conditions below
* are satisfied. This gives us better new start value
@@ -2510,15 +2508,14 @@
);
} else
ssthresh = 0;
- metrics.hc_ssthresh = ssthresh;
-
- metrics.hc_rtt = tp->t_srtt;
- metrics.hc_rttvar = tp->t_rttvar;
- metrics.hc_cwnd = tp->snd_cwnd;
- metrics.hc_sendpipe = so->so_snd.sb_hiwat;
- metrics.hc_recvpipe = so->so_rcv.sb_hiwat;
-
- tcp_hc_update(&inp->inp_inc, &metrics);
+ tcp_hc_update(&inp->inp_inc, &(struct tcp_hc_metrics){
+ .hc_ssthresh = ssthresh,
+ .hc_rtt = tp->t_srtt,
+ .hc_rttvar = tp->t_rttvar,
+ .hc_cwnd = tp->snd_cwnd,
+ .hc_sendpipe = so->so_snd.sb_hiwat,
+ .hc_recvpipe = so->so_rcv.sb_hiwat,
+ });
}
refcount_release(&tp->t_fb->tfb_refcnt);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Sep 7, 9:41 AM (4 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38429485
Default Alt Text
D59453.id185952.diff (1 KB)
Attached To
Mode
D59453: tcp: use sparse initializer for host cache metrics
Attached
Detach File
Event Timeline
Log In to Comment